1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Added the support for 1.13

This commit is contained in:
LinoxGH 2020-06-24 01:17:14 +03:00
parent 3278457441
commit 573068283a
3 changed files with 17 additions and 14 deletions

View File

@ -40,10 +40,15 @@ public class MagicPills extends SimpleSlimefunItem<EntityInteractHandler> {
p.playSound(p.getLocation(), Sound.ENTITY_ZOMBIE_VILLAGER_CONVERTED, 1, 1);
ZombieVillager zombieVillager = (ZombieVillager) entity;
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);
}
}
};
}

View File

@ -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));
}
}
}

View File

@ -779,7 +779,6 @@ 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));
@ -788,7 +787,6 @@ public final class SlimefunItemSetup {
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})