fixed crash on startup
@@ -75,7 +75,7 @@ public class AutoEatMod extends ToggleMod {
private ItemFood food = null;
private boolean eating = false;
- private int eatingTicks = -1;
+ private int eatingTicks = 0;
private int selectedTicks = 0;
private int lastHotbarIndex = -1;
@@ -87,7 +87,7 @@ public class AutoEatMod extends ToggleMod {
if(eatingTicks > 0) MC.addScheduledTask(() -> MinecraftForge.EVENT_BUS.post(new ForgeHaxEvent(Type.EATING_STOP)));
food = null;
eating = false;
- eatingTicks = -1;
+ eatingTicks = 0;
selectedTicks = 0;
}
@@ -157,7 +157,7 @@ public class AutoEatMod extends ToggleMod {
protected void onEnabled() {
reset();
selectedTicks = 0;
- lastHotbarIndex = LocalPlayerInventory.getInventory() != null ? LocalPlayerInventory.getInventory().currentItem : -1;
+ lastHotbarIndex = -1;
}
@SubscribeEvent
