From f39ff51ca89948348df87e1fda05624500fbbd90 Mon Sep 17 00:00:00 2001 From: Nedelosk Date: Wed, 28 Dec 2016 23:57:57 +0100 Subject: [PATCH] Fix #1554 1.10.2 Game Crash and Ticking Block Exception when using Reanimation effect on Skeleton and Zombie Drops --- src/main/java/forestry/core/utils/EntityUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/forestry/core/utils/EntityUtil.java b/src/main/java/forestry/core/utils/EntityUtil.java index 91445dd5b..6f156fee7 100644 --- a/src/main/java/forestry/core/utils/EntityUtil.java +++ b/src/main/java/forestry/core/utils/EntityUtil.java @@ -17,6 +17,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLiving; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; import net.minecraftforge.fml.common.registry.EntityRegistry; @@ -35,7 +36,7 @@ public abstract class EntityUtil { living.setLocationAndAngles(x, y, z, MathHelper.wrapDegrees(world.rand.nextFloat() * 360.0f), 0.0f); living.rotationYawHead = living.rotationYaw; living.renderYawOffset = living.rotationYaw; - living.onInitialSpawn(null, null); + living.onInitialSpawn(world.getDifficultyForLocation(new BlockPos(x, y, z)), null); world.spawnEntity(living); living.playLivingSound(); return living;