mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
parent
6ef4e2daae
commit
e4e3d2a72c
1 changed files with 3 additions and 2 deletions
|
@ -21,6 +21,7 @@ import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.chunk.Chunk;
|
import net.minecraft.world.chunk.Chunk;
|
||||||
|
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||||
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -83,8 +84,8 @@ public class AnimalEffect implements IDrainSpotEffect {
|
||||||
ItemStack stack = item.getItem();
|
ItemStack stack = item.getItem();
|
||||||
if (!(stack.getItem() instanceof EggItem))
|
if (!(stack.getItem() instanceof EggItem))
|
||||||
continue;
|
continue;
|
||||||
// The getAge() method is private for absolutely no reason but I want it so I don't care
|
// The getAge() method is client-side only for absolutely no reason but I want it so I don't care
|
||||||
int age = item.getAge();
|
int age = ObfuscationReflectionHelper.getPrivateValue(ItemEntity.class, item, "field_70292_b");
|
||||||
if (age < item.lifespan / 2)
|
if (age < item.lifespan / 2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue