From 93e18d17216c2f0b7ec348af240c4170f3a29323 Mon Sep 17 00:00:00 2001 From: LAX1DUDE Date: Thu, 10 Mar 2022 14:16:17 -0800 Subject: [PATCH] fixed eating glitch --- src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java | 2 +- src/main/java/net/minecraft/src/EntityLiving.java | 2 +- src/main/java/net/minecraft/src/EntityPlayer.java | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java b/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java index 8120073..fbd9455 100644 --- a/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java +++ b/src/main/java/net/lax1dude/eaglercraft/ConfigConstants.java @@ -4,7 +4,7 @@ public class ConfigConstants { public static boolean profanity = false; - public static final String version = "22w10b"; + public static final String version = "22w10c"; public static final String mainMenuString = "eaglercraft " + version; public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft"; diff --git a/src/main/java/net/minecraft/src/EntityLiving.java b/src/main/java/net/minecraft/src/EntityLiving.java index 62759a2..27de0a4 100644 --- a/src/main/java/net/minecraft/src/EntityLiving.java +++ b/src/main/java/net/minecraft/src/EntityLiving.java @@ -1750,7 +1750,7 @@ public abstract class EntityLiving extends Entity { Integer var2 = (Integer) var1.next(); PotionEffect var3 = (PotionEffect) this.activePotionsMap.get(var2); - if (var3.onUpdate(this)) { + if (var3.onUpdate(this) && var3.getDuration() % 600 == 0) { this.onChangedPotionEffect(var3); } } diff --git a/src/main/java/net/minecraft/src/EntityPlayer.java b/src/main/java/net/minecraft/src/EntityPlayer.java index 4285239..2b84d1b 100644 --- a/src/main/java/net/minecraft/src/EntityPlayer.java +++ b/src/main/java/net/minecraft/src/EntityPlayer.java @@ -222,6 +222,8 @@ public abstract class EntityPlayer extends EntityLiving implements ICommandSende } super.onUpdate(); + + --this.itemInUseCount; if (this.isBurning() && this.capabilities.disableDamage) { this.extinguish();