Fixed an issue with zombie pigmen and spawners.

This commit is contained in:
Brianna 2019-10-20 11:54:17 -04:00
parent 50e4cdef31
commit 57735defa4
1 changed files with 3 additions and 1 deletions

View File

@ -82,7 +82,9 @@ public class SpawnerListeners implements Listener {
EntityType entityType;
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13))
entityType = EntityType.valueOf(itemType.name().replace("_SPAWN_EGG", "").replace("MOOSHROOM", "MUSHROOM_COW"));
entityType = EntityType.valueOf(itemType.name().replace("_SPAWN_EGG", "")
.replace("MOOSHROOM", "MUSHROOM_COW")
.replace("ZOMBIE_PIGMAN", "PIG_ZOMBIE"));
else if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_12)) {
String str = Reflection.getNBTTagCompound(Reflection.getNMSItemStack(event.getItem())).toString();
if (str.contains("minecraft:"))