mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +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.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
@ -83,8 +84,8 @@ public class AnimalEffect implements IDrainSpotEffect {
|
|||
ItemStack stack = item.getItem();
|
||||
if (!(stack.getItem() instanceof EggItem))
|
||||
continue;
|
||||
// The getAge() method is private for absolutely no reason but I want it so I don't care
|
||||
int age = item.getAge();
|
||||
// The getAge() method is client-side only for absolutely no reason but I want it so I don't care
|
||||
int age = ObfuscationReflectionHelper.getPrivateValue(ItemEntity.class, item, "field_70292_b");
|
||||
if (age < item.lifespan / 2)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in a new issue