Skip to content

Instantly share code, notes, and snippets.

@GaeaKat
Created June 28, 2015 12:13
Show Gist options
  • Save GaeaKat/6c08ce82570a09d4b78f to your computer and use it in GitHub Desktop.
Save GaeaKat/6c08ce82570a09d4b78f to your computer and use it in GitHub Desktop.
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