simon816 / Command-Block-Assembly

Compile high-level code into Minecraft commands
https://www.simon816.com/minecraft/assembler
MIT License
272 stars 29 forks source link

Could i read a tag from entity or an other way of storing other types than int (This case string) #8

Closed artemking4 closed 5 years ago

artemking4 commented 5 years ago

Could i read a tag from entity and store it in a var? Or an other way of storing string somewhere?

simon816 commented 5 years ago

Strings are quite limited using the techniques we have for using them. It should be possible to use NBT to store and retrieve strings. However I am unaware of a technique to manipulate them (e.g. append string). Using Command IR this should be possible - https://github.com/simon816/Command-Block-Assembly/wiki/Command-IR-Instruction-Reference#nbt-instructions In the assembly language / C compiler there isn't explicit support, but you can construct a /data command to store/retrieve strings

artemking4 commented 5 years ago

Thank you much for the info.