diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/MagicPills.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/MagicPills.java index 5f6248b60..3d30b3b9f 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/MagicPills.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/MagicPills.java @@ -40,9 +40,14 @@ public class MagicPills extends SimpleSlimefunItem { p.playSound(p.getLocation(), Sound.ENTITY_ZOMBIE_VILLAGER_CONVERTED, 1, 1); ZombieVillager zombieVillager = (ZombieVillager) entity; - zombieVillager.setConversionTime(1); - if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_15)) { - zombieVillager.setConversionPlayer(p); + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { + zombieVillager.setConversionTime(1); + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_15)) { + zombieVillager.setConversionPlayer(p); + } + + } else { + zombieVillager.setVillager(true); } } }; diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PlayerInteractEntityListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PlayerInteractEntityListener.java index 82d7665cc..fd8e98e7c 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PlayerInteractEntityListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PlayerInteractEntityListener.java @@ -42,7 +42,7 @@ public class PlayerInteractEntityListener implements Listener { if (sfItem == null) return; if (Slimefun.hasUnlocked(e.getPlayer(), sfItem, true)) { - sfItem.callItemHandler(EntityInteractHandler.class, handler -> handler.onInteract(e, itemStack)); + sfItem.callItemHandler(EntityInteractHandler.class, handler -> handler.onInteract(e.getPlayer(), e.getRightClicked(), itemStack, e.getHand() == EquipmentSlot.OFF_HAND)); } } } \ No newline at end of file diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/SlimefunItemSetup.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/SlimefunItemSetup.java index 3320d0bc1..1579b5dc5 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/SlimefunItemSetup.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/SlimefunItemSetup.java @@ -779,16 +779,14 @@ public final class SlimefunItemSetup { .register(plugin); } - if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { - ItemStack magicPillsRecipePotion = new ItemStack(Material.POTION); - PotionMeta meta = (PotionMeta) magicPillsRecipePotion.getItemMeta(); - meta.setBasePotionData(new PotionData(PotionType.WEAKNESS, false, false)); - magicPillsRecipePotion.setItemMeta(meta); - new MagicPills(categories.magicalGadgets, SlimefunItems.MAGIC_PILLS, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {new ItemStack(Material.GOLD_INGOT), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GOLD_INGOT), new ItemStack(Material.APPLE), magicPillsRecipePotion, new ItemStack(Material.APPLE), new ItemStack(Material.GOLD_INGOT), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GOLD_INGOT)}, - new CustomItem(SlimefunItems.MAGIC_PILLS, 4)) - .register(plugin); - } + ItemStack magicPillsRecipePotion = new ItemStack(Material.POTION); + PotionMeta meta = (PotionMeta) magicPillsRecipePotion.getItemMeta(); + meta.setBasePotionData(new PotionData(PotionType.WEAKNESS, false, false)); + magicPillsRecipePotion.setItemMeta(meta); + new MagicPills(categories.magicalGadgets, SlimefunItems.MAGIC_PILLS, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {new ItemStack(Material.GOLD_INGOT), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GOLD_INGOT), new ItemStack(Material.APPLE), magicPillsRecipePotion, new ItemStack(Material.APPLE), new ItemStack(Material.GOLD_INGOT), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GOLD_INGOT)}, + new CustomItem(SlimefunItems.MAGIC_PILLS, 4)) + .register(plugin); new SmeltersPickaxe(categories.tools, SlimefunItems.SMELTERS_PICKAXE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.LAVA_CRYSTAL, SlimefunItems.LAVA_CRYSTAL, SlimefunItems.LAVA_CRYSTAL, null, SlimefunItems.FERROSILICON, null, null, SlimefunItems.FERROSILICON, null})