Fix #1554 1.10.2 Game Crash and Ticking Block Exception when using Reanimation effect on Skeleton and Zombie Drops

This commit is contained in:
Nedelosk authored and mezz committed 2016-12-28 18:35:40 -08:00
1 parent 35f9b95f37
commit 1fa461430e
1 file changed
+2 -1
@@ -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;