Skip to content

Commit

Permalink
Add 1.15.2 Compaitbility issue with pig_zombie egg.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jul 9, 2020
1 parent d69049b commit 6a79351
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/world/bentobox/challenges/utils/GuiUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ public static ItemStack getEntityEgg(EntityType entity, int amount)

switch (entity)
{
case PIG_ZOMBIE:
itemStack = new ItemStack(Material.ZOMBIE_PIGMAN_SPAWN_EGG);
break;
case ENDER_DRAGON:
itemStack = new ItemStack(Material.DRAGON_EGG);
break;
Expand Down Expand Up @@ -153,6 +150,12 @@ public static ItemStack getEntityEgg(EntityType entity, int amount)
break;
}

if (entity.name().equals("PIG_ZOMBIE"))
{
// If pig zombie exist, then pigman spawn egg exists too.
itemStack = new ItemStack(Material.getMaterial("ZOMBIE_PIGMAN_SPAWN_EGG"));
}

itemStack.setAmount(amount);

return itemStack;
Expand Down

0 comments on commit 6a79351

Please sign in to comment.