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:
parent
3278457441
commit
573068283a
@ -40,9 +40,14 @@ public class MagicPills extends SimpleSlimefunItem<EntityInteractHandler> {
|
||||
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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user