方块实体的NBT保存问题 #104
方块实体的NBT保存问题
#104
Replies: 2 comments 7 replies
-
请保证 TileEntity 类型含有一个零参数构造器。 |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
SeraphJACK
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我按照教程对
readFromNBT
和writeToNBT
进行了覆写,但重新载入地图后nbt还是会被清空。我开始尝试各种方法找原因,我先是尝试了数据同步,结果还是不行。之后我通过调试发现
writeToNBT
虽然能正常调用但每次tag
都是空的,我开始怀疑问题的原因是writeToNBT
没有保存,但我没办法确认他是不是真的没有保存 因为我不知道成功的情况下tag
是否也是空的,这是我的代码:Beta Was this translation helpful? Give feedback.
All reactions