Fix pinkinator not keeping custom name of wither

This commit is contained in:
Vincent Lee committed 2019-10-29 11:13:39 -05:00
1 parent 25b8b8ee2f
commit 949dee7dd7
1 file changed
+5
@@ -63,6 +63,11 @@ public class ItemPinkinator extends ItemMod {
wither.remove();
EntityPinkWither pink = new EntityPinkWither(world);
pink.setLocationAndAngles(wither.posX, wither.posY, wither.posZ, wither.rotationYaw, wither.rotationPitch);
pink.setNoAI(wither.isAIDisabled());
if (wither.hasCustomName()) {
pink.setCustomName(wither.getCustomName());
pink.setCustomNameVisible(wither.isCustomNameVisible());
}
pink.onInitialSpawn(world, world.getDifficultyForLocation(new BlockPos(pink)), SpawnReason.CONVERSION, null, null);
world.addEntity(pink);
pink.spawnExplosionParticle();