[MC-4020] Rotation of beacon beams are serverside Created: 01/Dec/12 Updated: 29/Mar/13 Resolved: 29/Mar/13 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.4, Minecraft 1.4.5 |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Robert Tulley | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Environment: |
In Bukkit servers, but Bukkit is still serverside. I haven't played on big servers that aren't Bukkit. |
||
| Issue Links: |
|
||||||||
| Confirmation Status: | Unconfirmed | ||||||||
| Description |
|
This lags the turning of beacon beams. I'm almost certain it's server-side, since the rotation lags when I go into big servers. |
| Comments |
| Comment by Tails [ 29/Mar/13 ] |
|
Duplicate of |
| Comment by score [ 29/Mar/13 ] |
|
Tails, please re-open this issue. This is a real issue, caused by a clientside rounding error when the world uptime is cast to float. Edit: "I'm almost certain it's serverside" - the description of the bug is guesswork, the real cause is the server sending a world time that is large, and because of how floating-point ( https://en.wikipedia.org/wiki/Single-precision_floating-point_format ) calculations are made, adding a tiny number (rotation amount) to a huge number (world uptime) tends to round down so far that it has literally no effect on the resulting number whatsoever. For an example of this, if you store the number 10000000000000000 as a single-precision floating point number, it rounds to 10000000272564224. Try to add 1000000 to this? The result is 10000000272564224, which is exactly the same as what we started with. If the rounding error is fixed in the client (the fix I propose to craftbukkit is a hack to avoid the rounding error entirely, and is not the "real" fix), then beacons will rotate properly again. A cast to double would fix* this but that's cheating IMHO. The best solution would probably be to add the amount of ticks elapsed since last check to a tick counter (as float or double), instead of using the total world time, and then if it exceeds k (where k = 2pi / 1.5 / 0.025, determined from Minecraft's code as the rotation period of a beacon beam in ticks) subtract k from it. Saying that, since beacons have rotational symmetry every 90 degrees you could probably get away with k/4, but since there's very little granularity with numbers that small anyway, saving 2 mantissa bits won't really net you much benefit. *Casting to double as the solution would mean it still suffers rounding errors, it'd just take much longer until it happens. |
| Comment by Tails [ 02/Dec/12 ] |
|
If you can recreate this on an unmodded server, I can reopen. This ticket is invalid as it relates to a modded or 3rd party client/server.
|