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 committed 2016-12-28 23:57:57 +01:00
1 parent b2d4e6eaba
commit f39ff51ca8
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;