The bug
You can't see the blockdata of a flower pot change after using a /blockdata
command.
How to reproduce
Place down an empty flower pot
Use
/blockdata x y z {Item:"cactus"}
→ Nothing happensPress
F3
+A
(to reload all chunks), or force a block update, or log out and log back in
→ Now the flower pot has a cactus in it
Why this should be fixed
If a custom map maker has a flower pot on a piston head (a block that will disappear if there is a block update) then setblock
would not be an option since the piston head will disappear. Blockdata doesn't make the piston head disappear but it does require a client-side refresh.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 1
relates to 1
Comments 13
Also on step 4, you can do any form of a block update where the pot is, such as placing a block next to the pot.
Please link to this comment in the description
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this happens is very likely that changes to the NBT data do not cause a description packet of the tile entity being send. This makes sense because in some situations the NBT data has no effect on the client and only increases the packet size. For the brewing stand for example this seems to be solved by having the property net.minecraft.block.BlockBrewingStand.HAS_BOTTLE
for the block state. Setting this causes a packet to be send to the client. For flower pots no property is used and no method is called to send the data to the player.
Picture 1: Empty Flower Pot
Picture 2: Command
Picture 3: Notice it SAYS there is a cactus on right hand side of F3 Menu
Picture 4: AFTER pressing F3+A