Created
June 28, 2015 12:13
-
-
Save GaeaKat/6c08ce82570a09d4b78f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(Loader.isModLoaded("HungerOverhaul")) | |
{ | |
if (fakePlayer.getActivePotionEffects().size() > 1) { | |
foodCache.put(foodName.toLowerCase(), false); | |
return false; | |
} | |
Class<?> clazz=Class.forName("iguanaman.hungeroverhaul.HungerOverhaul"); | |
Field fields=clazz.getField("potionWellFed"); | |
Potion effect= (Potion)fields.get(null); | |
if(effect!=null) { | |
if(fakePlayer.getActivePotionEffect(effect)==null) | |
{ | |
foodCache.put(foodName.toLowerCase(), false); | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment