GlowstoneMC / Glowstone

A fast, customizable and compatible open source server for Minecraft: Java Edition
https://glowstone.net
Other
1.88k stars 270 forks source link

Implement blockdata command #1056

Closed clabe45 closed 3 years ago

clabe45 commented 4 years ago

Implements the /blockdata for 1.12.

Since BlockEntity#loadNbt isn't fully implemented, this command does not work. When loadNbt is done, this should work, but I can update it if not.

clabe45 commented 4 years ago

I now understand that BlockEntity#loadNbt is meant to be overriden, and that ChestEntity#loadNbt is not implemented. Since I was only testing with chests, it didn't work.

I will test with blocks that do implement it.

aramperes commented 4 years ago

ChestEntity#loadNbt is inherited from ContainerEntity#loadNbt, which properly reads the "Items" tag. I'm not aware of any issue with loadNbt.