Animania Cats & Dogs

Animania Cats & Dogs

454k Downloads

[Bug] Animania Food gives full heal restore

MidnightBree opened this issue ยท 2 comments

commented

Expected Behavior

Eating food gives a health restore similar to health potions. I.E. Instant Health I should give 2 hearts (4 HP), Instant Health II should give 4 hearts (8 HP), etc.

Actual Behavior

https://www.youtube.com/watch?v=IFefM8nuzT4
I've given myself a health boost in this demonstration, just to show how even the Instant Health I food gives way too much.

Steps to Reproduce

Get low health, and eat a healing food item.

Version of Minecraft, version of Animania, Single Player or Server

1.12.2 MC, Animania 1.7.3, Singleplayer and Server (tested on both)

Screenshots encouraged

See above for video

commented

You are right, thanks for going through this ๐Ÿ‘

commented

The following foods give Instant Health potion effects that last for multiple ticks, hence why they heal so much more than expected:

cheese_omelette (2 * 16 = 32 HP restored)

cheeseOmelette = new ItemAnimaniaFood(5, 0.7f, "cheese_omelette", new PotionEffect(MobEffects.INSTANT_HEALTH, 2, 2, false, false));

cooked_prime_beef (10 * 8 = 80 HP restored)
cooked_prime_steak (5 * 8 = 40 HP restored)
cookedPrimeBeef = new ItemAnimaniaFood(12, 0.5f, "cooked_prime_beef", true, new PotionEffect(MobEffects.INSTANT_HEALTH, 10, 1, false, false));
rawPrimeSteak = new ItemAnimaniaFoodRaw("raw_prime_steak", true);
cookedPrimeSteak = new ItemAnimaniaFood(8, 0.5f, "cooked_prime_steak", true, new PotionEffect(MobEffects.INSTANT_HEALTH, 5, 1, false, false));

cooked_prime_mutton (5 * 8 = 40 HP restored)
cookedPrimeMutton = new ItemAnimaniaFood(12, 0.5f, "cooked_prime_mutton", new PotionEffect(MobEffects.INSTANT_HEALTH, 5, 1, false, false));

friesian_cheese_wedge (6 * 16 = 96 HP restored)
holstein_cheese_wedge (12 * 16 = 192 HP restored)
jersey_cheese_wedge (10 * 16 = 160 HP restored)
sheep_cheese_wedge (10 * 4 = 40 HP restored)
cheeseWedgeFriesian = new ItemAnimaniaFood(3, 0.9f, "friesian_cheese_wedge", new PotionEffect(MobEffects.INSTANT_HEALTH, 6, 2, false, false));
cheeseWedgeHolstein = new ItemAnimaniaFood(3, 0.9f, "holstein_cheese_wedge", new PotionEffect(MobEffects.INSTANT_HEALTH, 12, 2, false, false));
cheeseWedgeJersey = new ItemAnimaniaFood(3, 0.9f, "jersey_cheese_wedge", new PotionEffect(MobEffects.INSTANT_HEALTH, 10, 2, false, false));
cheeseWedgeGoat = new ItemAnimaniaFood(3, 0.9f, "goat_cheese_wedge", new PotionEffect(MobEffects.RESISTANCE, 1200, 0, false, false));
cheeseWedgeSheep = new ItemAnimaniaFood(3, 0.9f, "sheep_cheese_wedge", new PotionEffect(MobEffects.INSTANT_HEALTH, 10, 0, false, false));

Block forms of the above cheese wedges give same Instant Health effects.
if (this == FarmAddonBlockHandler.blockCheeseFriesian)
player.addPotionEffect(new PotionEffect(MobEffects.INSTANT_HEALTH, 6, 2, false, false));
else if (this == FarmAddonBlockHandler.blockCheeseGoat)
player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 1200, 0, false, false));
else if (this == FarmAddonBlockHandler.blockCheeseSheep)
player.addPotionEffect(new PotionEffect(MobEffects.INSTANT_HEALTH, 10, 0, false, false));
else
player.addPotionEffect(new PotionEffect(MobEffects.INSTANT_HEALTH, 12, 2, false, false));

Note that the Forge documents have the argument order as new PotionEffect(Potion potionIn, int durationIn, int amplifierIn, boolean ambientIn, boolean showParticlesIn).