mojira.dev
MC-35127

Wrong NBT TAG Type for fallTime in FallingSand Entities

The Time variable in FallingSand entities contains the time of how long the Entity exists. In Minecraft itself it is an integer but the NBT TAG type is only a byte.

This results:
Wrong saving: Technically you could keep a FallingSand Entity forever alive (if you can hold it in the air) by just reloading the world, the time TAG would be maximum 127 but FallingSand entites get only deleted when the time is greater than 600, so this part of the code is never going to be executed.

No full control of FallingSand entities when spawning with summon command: Because no matter what number you will put in for Time, the maximum is 127. This is important if you want for example an entity to appear for a certain amount of time and disappear. An example of why this technique is so important http://www.minecraftforum.net/topic/2003346-animated-walking-man-13w39b/

Possible Fixes:
It isn't needed to change the acutual TAG type in the save files, except you want to fix the first mentioned problem. Interpreting the right type out of the summon command is more important (to me 🙂 ). So numbers greater than 127 take actual effect.

Linked issues

Comments 10

Is this still a concern in the latest Minecraft version 13w48b? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Can confirm this for 1.7.4.

Is this still a concern in the current Minecraft version 1.8.1 Prerelease 3 / Launcher version 1.5.3 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Relates to MC-77409

Is there a way to figure out the variable type Minecraft is using?

Decompile the code? As of 1.7.10, it's using an int internally, but still writes and reads the NBT as a byte.

Can confirm for 1.8.3.

And how do you figure out which part of the code is for FallingSand?

Confirmed for 15w51b. Still a problem.

Confirmed fixed for 1.9-pre2

Ikean Awesome

Erik Broes

Confirmed

NBT, falling_block

Minecraft 1.5.2, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w39b, Minecraft 13w41a, Minecraft 13w41b, Minecraft 1.7.5, Minecraft 1.8.3, Minecraft 15w51b

Minecraft 1.9 Pre-Release 2

Retrieved