mojira.dev
MC-11601

Packet 26 (EXP orb entity spawn) send/receive disparity

Packet 26, EXP orb spawn, sends the position of the exp orb multiplied by 32. However, the client receives it and does not divide the position by 32, meaning the server must send an entity teleport packet to the client to correct the exp orb's position.

I suggest each of these packet classes have getters to ensure that the correct position is being used, rather than keeping the 'encoding' of the position inside the packet class then having the 'decoding' inexplicably take place elsewhere.

This was found when attempting to debug a related issue, that when joining another person's server I was unable to target certain mobs and minecarts until they moved into another chunk (that is: I believe the issue to be with a modification they have made to their server software, but despite this I do not think the client should react in such a way).

Related issues

Comments

migrated

Cause of MC-460?

migrated

As far as I'm aware MC-460 would be a granularity issue - Not only are imprecise positions are exchanged between the server and client, but since the exp orb accelerates with a value relative to the difference between a fixed distance and the nearest player's distance, any lag (e.g. the player spending longer close to the orb clientside than serverside) would quickly desynchronise the positions of the orb between the client and server.

It is frankly dumb luck that XP orbs (usually) aren't invisible for the first second after spawning: the only reason the position is corrected clientside so fast is because there's a special exception given in the entity tracker stating that all entities which have only just changed velocity should be updated to all clients as fast as possible.

migrated

Still affects all current versions (13w38c and beyond)
Direct cause of MC-12013

migrated

Is this still a concern in the current Minecraft version 1.7.4 / Launcher version 1.3.8 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.

migrated

Is this still a concern in the current Minecraft version *14w11b / Launcher version 1.3.11 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.

migrated

Is this still a concern in the current Minecraft version 14w21b / Launcher version 1.4.4 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.

migrated

Affects all versions up to and including release 1.8

migrated

Does this affect the most recent snapshot?

marcono1234

Can very likely not confirm for 16w06a

In 16w06a the net.minecraft.client.network.NetHandlerPlayClient is bkq.class and net.minecraft.network.play.server.S11PacketSpawnExperienceOrb is fk.class. While there is still no conversion back, it looks as if the coordinates are also not multiplied with 32.0D anymore.

migrated

This was fixed a long time ago...

yup MC-12013 (caused directly by this issue) was fixed in 1.8.1

migrated

(Unassigned)

Community Consensus

entity, experience, packets

Minecraft 1.4.7, Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.5.2, Minecraft 1.6.2, Minecraft 13w38a, Minecraft 13w38b, Minecraft 13w38c, Minecraft 1.8

Retrieved