From 0ea32ba4a53118700fbf0d460326277bd5940c24 Mon Sep 17 00:00:00 2001 From: Pelotrio <45769595+Pelotrio@users.noreply.github.com> Date: Fri, 8 Oct 2021 23:42:32 +0200 Subject: [PATCH] Fix alchemy tablet breaking after 10 days of existing 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. --- .../teamroots/embers/tileentity/TileEntityAlchemyTablet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/teamroots/embers/tileentity/TileEntityAlchemyTablet.java b/src/main/java/teamroots/embers/tileentity/TileEntityAlchemyTablet.java index def7b326..fd2bbff1 100644 --- a/src/main/java/teamroots/embers/tileentity/TileEntityAlchemyTablet.java +++ b/src/main/java/teamroots/embers/tileentity/TileEntityAlchemyTablet.java @@ -295,7 +295,7 @@ public int getNearbyAsh(List pedestals) { @Override public void update() { - angle += 1.0f; + angle += 1; List upgrades = UpgradeUtil.getUpgrades(world, pos, new EnumFacing[]{EnumFacing.DOWN}); //Defer to when events are added to the upgrade system UpgradeUtil.verifyUpgrades(this, upgrades); if (getWorld().isRemote)