From 43ea52eb08947cfd96ef4e6f3185d6ae9a2d499e Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sun, 26 Jul 2020 12:37:23 -0500 Subject: [PATCH] Fixed a bug with draedon fuel factories --- TileEntities/TEDraedonFuelFactory.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TileEntities/TEDraedonFuelFactory.cs b/TileEntities/TEDraedonFuelFactory.cs index cd7f4ac725..b96799bc03 100644 --- a/TileEntities/TEDraedonFuelFactory.cs +++ b/TileEntities/TEDraedonFuelFactory.cs @@ -31,8 +31,9 @@ namespace CalamityMod.TileEntities } Time++; + // Sometimes the item gets fucked up and it gets a maxStack of 0. Using it as a max can be unreliable as a result. bool rightTimeToMakeCell = Time % 5 == 4 && Main.tileFrame[Main.tile[Position.X, Position.Y].type] == 43; - if (HeldItem.stack < HeldItem.maxStack && rightTimeToMakeCell) + if (HeldItem.stack < 999 && rightTimeToMakeCell) { HeldItem.stack++; }