Carpet

Carpet

2M Downloads

[suggestion] about the function: encode_nbt

17183248569 opened this issue ยท 0 comments

commented

abbccef98d5e7b14
now the 2nd argument can only be true or false.
i suggest to make it accept "short" "int" "long" "byte" "float" "double" "int_array" "byte_array" "long_array" as well, to tell the functions the target NBT type.

now, if i call encode_nbt(2), it cannot be 2.0f or 2L. sometimes NBT need to be a certain type. which is painful. you have to write something like nbt('2.0f') to create a float tag of 2. ๐Ÿ˜”

i hope it could be encode_nbt(2,'float') or encode_nbt(2,'long')

if this is accept, we can also write encode_nbt([2,3,3,2,3,3],'int_array') instead of nbt('[I;2,3,3,2,3,3]')