- 1,218
- 27
- 174
Написав небольшой класс я смог произвольно строить в код подобные конструкции:
Код:
val nbt: NBTTagCompound =
nbt{
compound("test1"){
compound("test1#inner1"){
int("lifespan", 3600)
byte("wither", 1)
}
compound("test1#inner2"){
short("ench", 35)
short("lvl", 4)
}
}
compound("test2"){
string("name", "anti344")
}
}