mojira.dev
MCPE-21020

Effects don't wrap around into the negatives at 128

  • In the java version , using commands to get an effect with the amplifier between 128 and 255 makes it negative. This is very useful as it's the only way to reduce jump height. However , I tried to make a command block which makes you unable to jump via jump_boost 50 128 But there is no wrap around into the negatives on pocket edition. Instead , it makes you jump even higher than the maximum jump height of 127 in Java.Please fix this bug so i can be able to make a command block which makes you unable to jump. Also it's 1.0.5 but I can't figure out how to set the version affected to 1.0.5 so I did 1.0.5.54 because it's the closest thing I could figure out how to do.

Comments 2

Firstly, high amplifiers are not supported in Java edition (MC-10755).

I'd like to clarify that what happens in Java edition is a client-side desync bug caused by overflow when sending the amplifier to the client (stored on the server as an int, sent to client as a byte). Since the client controls movement and thinks they have a negative amplifier, their jump height is reduced.

However, the server is expecting them to go extremely high into the air, so when the player takes damage (while jumping), the server resyncs their position and the client then sees themselves high in the air.

When the player data is saved to NBT, the integer amplifier from the server is typecasted to byte (into the Amplifier tag). When the player logs back in, both the server and client will agree on the amplifier's value now that it's within byte range for both and desyncing no longer occurs.

Except that in 1.11, the Amplifier byte tag will only have its value read as 0 or higher. If it were -4 due to overflow, it will be considered as 0 instead, effectively changing what the effect does when relogging.

Thus a single command with a 128+ amplifier has three issues in Java edition: client desync, overflow on save, and read differently after relogging.

Cleaning up old tickets: This ticket has not been updated recently (1 year+) so is being closed as Cannot Reproduce. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines.

Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Feedback – 📖 Game Wiki

Anomonous Anomonous

(Unassigned)

Unconfirmed

Tablet - iOS - iPad Air 2

iOS 10

1.0.5.54

Retrieved