Skip to content

Fix alchemy tablet breaking after 10 days of existing#299

Open
Pelotrio wants to merge 1 commit intoDaedalusGame:rekindledfrom
Pelotrio:patch-1
Open

Fix alchemy tablet breaking after 10 days of existing#299
Pelotrio wants to merge 1 commit intoDaedalusGame:rekindledfrom
Pelotrio:patch-1

Conversation

@Pelotrio
Copy link

@Pelotrio Pelotrio commented Oct 8, 2021

The alchemy tablet seizes to function after existing for 16777216 ticks. This happens because the angle field gets incremented by a float value instead of an int value. The number of ticks is the maximum number a 24 bit value can represent and after this it does not increment anymore. If this happens the value will forever be stuck at 16777216 and the condition angle % 10 == 0 will never be true, thus preventing any recipe from ever finishing. We noticed this because we used tile entity acceleration and it broke after roughly 4.5 hours every time.

This behavior can be seen in this video:

ug1rCKR79C.mp4

The alchemy tablet seizes to function after existing for 16777216 ticks. This happens because the angle field gets incremented by a float value instead of an int value. The number of ticks is the maximum number a 24 bit value can represent and after this it does not increment anymore. If this happens the value will forever be stuck at 16777216 and the condition `angle % 10 == 0` will never be true, thus preventing any recipe from ever finishing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant