mojira.dev
MC-229293

Casting issue: Broken blocks drop items in the wrong position at high distances

This problem becomes visible over 8,388,608 blocks, where items start dropping at the edges or corners of a block instead of at the center, and after 16,777,216 the position can be offset by as much as 2 blocks. The cause is most likely the block position being cast to float instead of double in the code that determines where tile drops are spawned.

Related issues

Attachments

Comments

migrated
[media][media]
migrated

I don't think so. MC-4 is a desync between client and server, this bug is caused by floating point precision errors. These are completely different issues.

ampolive

Can confirm. This does not relate to MC-4.

ampolive

Relates to MC-164352, MC-186362, MC-191170 and MC-192718, as all of these issues are casting issues caused by precision loss at high coordinates.

migrated

Can confirm, happens on modified servers too.

ampolive

Can confirm in 21w40a.

muzikbike

Well this is certainly a new one - I don't remember this occurring in 1.16.5, or indeed any earlier version, and yes, that includes the very start of Infdev (although items from broken containers were subject to this up until 14w28a). I'll need to throw some research at this to figure out when it started as well as so it can be added to the behemoth that is the Java Edition distance effects page on the wiki.

Can confirm this behaviour in 1.18 pre-release 1:

[media]

As the owner of all other currently-open float casting issues, can I request ownership of this ticket so I can test it on a weekly basis once my new testing world is complete?

migrated

I would gladly do so, but I'm unaware of any way for me to transfer ownership; from what I understand, a moderator has to do it.

Jurta

can confirm for 23w07a!

muzikbike

Panda4994

Confirmed

Important

Items

precision-loss

1.17, 1.17.1 Pre-release 1, 1.17.1 Pre-release 3, 1.17.1 Release Candidate 1, 1.17.1 Release Candidate 2, ..., 1.19 Pre-release 5, 1.19, 1.19.1 Pre-release 4, 1.19.2, 23w07a

1.19.4 Pre-release 2

Retrieved