From 6de4130d05b06942140ea6fbd7be9ff7072523ab Mon Sep 17 00:00:00 2001 From: poma123 Date: Wed, 5 Aug 2020 12:41:48 +0200 Subject: [PATCH 01/65] Fixed prevention when brewing with slimefun items --- .../listeners/VanillaMachinesListener.java | 21 ++++++++++++++++--- src/main/resources/languages/messages_en.yml | 3 +++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VanillaMachinesListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VanillaMachinesListener.java index ed660f5cc..dcc2c8969 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VanillaMachinesListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VanillaMachinesListener.java @@ -6,6 +6,7 @@ import org.bukkit.event.Event.Result; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.CraftItemEvent; +import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.PrepareItemCraftEvent; @@ -95,10 +96,24 @@ public class VanillaMachinesListener implements Listener { @EventHandler(ignoreCancelled = true) public void onPreBrew(InventoryClickEvent e) { - Inventory inventory = e.getInventory(); + Inventory inventory = e.getClickedInventory(); + Inventory topInventory = e.getView().getTopInventory(); - if (inventory.getType() == InventoryType.BREWING && e.getRawSlot() < inventory.getSize() && inventory.getHolder() instanceof BrewingStand) { - e.setCancelled(isUnallowed(SlimefunItem.getByItem(e.getCursor()))); + if (inventory != null && topInventory.getType() == InventoryType.BREWING && topInventory.getHolder() instanceof BrewingStand) { + if (e.getAction() == InventoryAction.HOTBAR_SWAP) { + e.setCancelled(true); + return; + } + + if (inventory.getType() == InventoryType.BREWING) { + e.setCancelled(isUnallowed(SlimefunItem.getByItem(e.getCursor()))); + } else { + e.setCancelled(isUnallowed(SlimefunItem.getByItem(e.getCurrentItem()))); + } + + if (e.getResult() == Result.DENY) { + SlimefunPlugin.getLocalization().sendMessage((Player) e.getWhoClicked(), "brewing_stand.not-working", true); + } } } diff --git a/src/main/resources/languages/messages_en.yml b/src/main/resources/languages/messages_en.yml index 099dd5281..1298dcb36 100644 --- a/src/main/resources/languages/messages_en.yml +++ b/src/main/resources/languages/messages_en.yml @@ -232,6 +232,9 @@ machines: anvil: not-working: '&4You cannot use Slimefun Items in an anvil!' +brewing_stand: + not-working: '&4You cannot use Slimefun Items in a brewing stand!' + backpack: already-open: '&cSorry, this Backpack is open somewhere else!' no-stack: '&cYou cannot stack Backpacks' From 9454c890ea71d970a9e545c35e2cfdf7cb2a5639 Mon Sep 17 00:00:00 2001 From: poma123 Date: Wed, 5 Aug 2020 13:02:35 +0200 Subject: [PATCH 02/65] Refactoring --- .../implementation/listeners/VanillaMachinesListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VanillaMachinesListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VanillaMachinesListener.java index dcc2c8969..bdb8d367f 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VanillaMachinesListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VanillaMachinesListener.java @@ -96,16 +96,16 @@ public class VanillaMachinesListener implements Listener { @EventHandler(ignoreCancelled = true) public void onPreBrew(InventoryClickEvent e) { - Inventory inventory = e.getClickedInventory(); + Inventory clickedInventory = e.getClickedInventory(); Inventory topInventory = e.getView().getTopInventory(); - if (inventory != null && topInventory.getType() == InventoryType.BREWING && topInventory.getHolder() instanceof BrewingStand) { + if (clickedInventory != null && topInventory.getType() == InventoryType.BREWING && topInventory.getHolder() instanceof BrewingStand) { if (e.getAction() == InventoryAction.HOTBAR_SWAP) { e.setCancelled(true); return; } - if (inventory.getType() == InventoryType.BREWING) { + if (clickedInventory.getType() == InventoryType.BREWING) { e.setCancelled(isUnallowed(SlimefunItem.getByItem(e.getCursor()))); } else { e.setCancelled(isUnallowed(SlimefunItem.getByItem(e.getCurrentItem()))); From c168497e79800adcfcfe2a37c2be7ec370eaa164 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Wed, 5 Aug 2020 13:31:35 +0200 Subject: [PATCH 03/65] [CI skip] Reduced technical debt --- CHANGELOG.md | 1 + .../items/cargo/AbstractCargoNode.java | 82 ++++++++++ .../items/cargo/AbstractFilterNode.java | 140 ++++++++++++++++ .../items/cargo/AdvancedCargoOutputNode.java | 149 +---------------- .../items/cargo/CargoInputNode.java | 154 ++---------------- .../items/cargo/CargoOutputNode.java | 61 +------ .../slimefun4/utils/HeadTexture.java | 5 +- 7 files changed, 248 insertions(+), 344 deletions(-) create mode 100644 src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractFilterNode.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 6030626c9..41d84540a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ * Fixed #2183 * Fixed #2181 * Fixed #2180 +* Fixed #2122 ## Release Candidate 15 (01 Aug 2020) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractCargoNode.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractCargoNode.java index 79f38daa7..fac303f2f 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractCargoNode.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractCargoNode.java @@ -2,19 +2,33 @@ package io.github.thebusybiscuit.slimefun4.implementation.items.cargo; import org.bukkit.block.Block; import org.bukkit.entity.Player; +import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.inventory.ItemStack; +import io.github.thebusybiscuit.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.cscorelib2.materials.MaterialCollections; import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction; +import io.github.thebusybiscuit.slimefun4.core.handlers.BlockPlaceHandler; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.utils.ChatUtils; +import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; +import io.github.thebusybiscuit.slimefun4.utils.HeadTexture; +import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; +import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; import me.mrCookieSlime.Slimefun.api.item_transport.ItemTransportFlow; +/** + * This abstract class is the super class of all cargo nodes. + * + * @author TheBusyBiscuit + * + */ abstract class AbstractCargoNode extends SlimefunItem { protected static final String FREQUENCY = "frequency"; @@ -22,6 +36,21 @@ abstract class AbstractCargoNode extends SlimefunItem { public AbstractCargoNode(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput) { super(category, item, recipeType, recipe, recipeOutput); + addItemHandler(new BlockPlaceHandler(false) { + + @Override + public void onPlayerPlace(BlockPlaceEvent e) { + Block b = e.getBlock(); + + // The owner and frequency are required by every node + BlockStorage.addBlockInfo(b, "owner", e.getPlayer().getUniqueId().toString()); + BlockStorage.addBlockInfo(b, FREQUENCY, "0"); + + onPlace(e); + } + + }); + new BlockMenuPreset(getID(), ChatUtils.removeColorCodes(item.getItemMeta().getDisplayName())) { @Override @@ -46,6 +75,59 @@ abstract class AbstractCargoNode extends SlimefunItem { }; } + protected void addChannelSelector(Block b, BlockMenu menu, int slotPrev, int slotCurrent, int slotNext) { + boolean isChestTerminalInstalled = SlimefunPlugin.getThirdPartySupportService().isChestTerminalInstalled(); + + menu.replaceExistingItem(slotPrev, new CustomItem(SlimefunUtils.getCustomHead(HeadTexture.CARGO_ARROW_LEFT.getTexture()), "&bPrevious Channel", "", "&e> Click to decrease the Channel ID by 1")); + menu.addMenuClickHandler(slotPrev, (p, slot, item, action) -> { + int channel = Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)) - 1; + + if (channel < 0) { + if (isChestTerminalInstalled) { + channel = 16; + } + else { + channel = 15; + } + } + + BlockStorage.addBlockInfo(b, FREQUENCY, String.valueOf(channel)); + updateBlockMenu(menu, b); + return false; + }); + + int channel = ((!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY) == null) ? 0 : (Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)))); + + if (channel == 16) { + menu.replaceExistingItem(slotCurrent, new CustomItem(SlimefunUtils.getCustomHead(HeadTexture.CHEST_TERMINAL.getTexture()), "&bChannel ID: &3" + (channel + 1))); + menu.addMenuClickHandler(slotCurrent, ChestMenuUtils.getEmptyClickHandler()); + } + else { + menu.replaceExistingItem(slotCurrent, new CustomItem(MaterialCollections.getAllWoolColors().get(channel), "&bChannel ID: &3" + (channel + 1))); + menu.addMenuClickHandler(slotCurrent, ChestMenuUtils.getEmptyClickHandler()); + } + + menu.replaceExistingItem(slotNext, new CustomItem(SlimefunUtils.getCustomHead(HeadTexture.CARGO_ARROW_RIGHT.getTexture()), "&bNext Channel", "", "&e> Click to increase the Channel ID by 1")); + menu.addMenuClickHandler(slotNext, (p, slot, item, action) -> { + int channeln = Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)) + 1; + + if (isChestTerminalInstalled) { + if (channeln > 16) { + channeln = 0; + } + } + else if (channeln > 15) { + channeln = 0; + } + + BlockStorage.addBlockInfo(b, FREQUENCY, String.valueOf(channeln)); + updateBlockMenu(menu, b); + return false; + }); + } + + protected abstract void onPlace(BlockPlaceEvent e); + protected abstract void createBorder(BlockMenuPreset preset); protected abstract void updateBlockMenu(BlockMenu menu, Block b); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractFilterNode.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractFilterNode.java new file mode 100644 index 000000000..c93b1b37e --- /dev/null +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AbstractFilterNode.java @@ -0,0 +1,140 @@ +package io.github.thebusybiscuit.slimefun4.implementation.items.cargo; + +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.inventory.ItemFlag; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.Damageable; +import org.bukkit.inventory.meta.ItemMeta; + +import io.github.thebusybiscuit.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; +import me.mrCookieSlime.Slimefun.Lists.RecipeType; +import me.mrCookieSlime.Slimefun.Objects.Category; +import me.mrCookieSlime.Slimefun.api.BlockStorage; +import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; +import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; +import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; + +/** + * This abstract super class represents all filtered Cargo nodes. + * + * @author TheBusyBiscuit + * + * @see CargoInputNode + * @see AdvancedCargoOutputNode + * + */ +abstract class AbstractFilterNode extends AbstractCargoNode { + + protected static final int[] SLOTS = { 19, 20, 21, 28, 29, 30, 37, 38, 39 }; + + public AbstractFilterNode(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput) { + super(category, item, recipeType, recipe, recipeOutput); + + registerBlockHandler(getID(), (p, b, stack, reason) -> { + BlockMenu inv = BlockStorage.getInventory(b); + + if (inv != null) { + inv.dropItems(b.getLocation(), SLOTS); + } + + return true; + }); + } + + protected abstract int[] getBorder(); + + @Override + protected void onPlace(BlockPlaceEvent e) { + Block b = e.getBlock(); + BlockStorage.addBlockInfo(b, "index", "0"); + BlockStorage.addBlockInfo(b, "filter-type", "whitelist"); + BlockStorage.addBlockInfo(b, "filter-lore", String.valueOf(true)); + BlockStorage.addBlockInfo(b, "filter-durability", String.valueOf(false)); + } + + @Override + protected void createBorder(BlockMenuPreset preset) { + for (int i : getBorder()) { + preset.addItem(i, new CustomItem(Material.CYAN_STAINED_GLASS_PANE, " "), ChestMenuUtils.getEmptyClickHandler()); + } + + preset.addItem(2, new CustomItem(Material.PAPER, "&3Items", "", "&bPut in all Items you want to", "&bblacklist/whitelist"), ChestMenuUtils.getEmptyClickHandler()); + } + + @Override + protected void updateBlockMenu(BlockMenu menu, Block b) { + String filterType = BlockStorage.getLocationInfo(b.getLocation(), "filter-type"); + + if (!BlockStorage.hasBlockInfo(b) || filterType == null || filterType.equals("whitelist")) { + menu.replaceExistingItem(15, new CustomItem(Material.WHITE_WOOL, "&7Type: &rWhitelist", "", "&e> Click to change it to Blacklist")); + menu.addMenuClickHandler(15, (p, slot, item, action) -> { + BlockStorage.addBlockInfo(b, "filter-type", "blacklist"); + updateBlockMenu(menu, b); + return false; + }); + } + else { + menu.replaceExistingItem(15, new CustomItem(Material.BLACK_WOOL, "&7Type: &8Blacklist", "", "&e> Click to change it to Whitelist")); + menu.addMenuClickHandler(15, (p, slot, item, action) -> { + BlockStorage.addBlockInfo(b, "filter-type", "whitelist"); + updateBlockMenu(menu, b); + return false; + }); + } + + String durability = BlockStorage.getLocationInfo(b.getLocation(), "filter-durability"); + + if (!BlockStorage.hasBlockInfo(b) || durability == null || durability.equals(String.valueOf(false))) { + ItemStack is = new ItemStack(Material.STONE_SWORD); + ItemMeta meta = is.getItemMeta(); + meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES); + is.setItemMeta(meta); + + menu.replaceExistingItem(16, new CustomItem(is, "&7Include Sub-IDs/Durability: &4\u2718", "", "&e> Click to toggle whether the Durability has to match")); + menu.addMenuClickHandler(16, (p, slot, item, action) -> { + BlockStorage.addBlockInfo(b, "filter-durability", String.valueOf(true)); + updateBlockMenu(menu, b); + return false; + }); + } + else { + ItemStack is = new ItemStack(Material.GOLDEN_SWORD); + ItemMeta meta = is.getItemMeta(); + meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES); + ((Damageable) meta).setDamage(20); + is.setItemMeta(meta); + + menu.replaceExistingItem(16, new CustomItem(is, "&7Include Sub-IDs/Durability: &2\u2714", "", "&e> Click to toggle whether the Durability has to match")); + menu.addMenuClickHandler(16, (p, slot, item, action) -> { + BlockStorage.addBlockInfo(b, "filter-durability", String.valueOf(false)); + updateBlockMenu(menu, b); + return false; + }); + } + + String lore = BlockStorage.getLocationInfo(b.getLocation(), "filter-lore"); + + if (!BlockStorage.hasBlockInfo(b) || lore == null || lore.equals(String.valueOf(true))) { + menu.replaceExistingItem(25, new CustomItem(Material.MAP, "&7Include Lore: &2\u2714", "", "&e> Click to toggle whether the Lore has to match")); + menu.addMenuClickHandler(25, (p, slot, item, action) -> { + BlockStorage.addBlockInfo(b, "filter-lore", String.valueOf(false)); + updateBlockMenu(menu, b); + return false; + }); + } + else { + menu.replaceExistingItem(25, new CustomItem(Material.MAP, "&7Include Lore: &4\u2718", "", "&e> Click to toggle whether the Lore has to match")); + menu.addMenuClickHandler(25, (p, slot, item, action) -> { + BlockStorage.addBlockInfo(b, "filter-lore", String.valueOf(true)); + updateBlockMenu(menu, b); + return false; + }); + } + + addChannelSelector(b, menu, 41, 42, 43); + } + +} diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AdvancedCargoOutputNode.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AdvancedCargoOutputNode.java index db54c90b0..a8f42c3bf 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AdvancedCargoOutputNode.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AdvancedCargoOutputNode.java @@ -1,165 +1,22 @@ package io.github.thebusybiscuit.slimefun4.implementation.items.cargo; -import org.bukkit.Material; -import org.bukkit.block.Block; -import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.Damageable; -import org.bukkit.inventory.meta.ItemMeta; -import io.github.thebusybiscuit.cscorelib2.item.CustomItem; -import io.github.thebusybiscuit.cscorelib2.materials.MaterialCollections; -import io.github.thebusybiscuit.slimefun4.core.handlers.BlockPlaceHandler; -import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; -import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; -import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; -import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; -import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; -import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; -public class AdvancedCargoOutputNode extends AbstractCargoNode { +public class AdvancedCargoOutputNode extends AbstractFilterNode { private static final int[] BORDER = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 22, 23, 24, 26, 27, 31, 32, 33, 34, 35, 36, 40, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }; - private static final int[] SLOTS = { 19, 20, 21, 28, 29, 30, 37, 38, 39 }; public AdvancedCargoOutputNode(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput) { super(category, item, recipeType, recipe, recipeOutput); - - addItemHandler(onPlace()); - registerBlockHandler(getID(), (p, b, stack, reason) -> { - BlockMenu inv = BlockStorage.getInventory(b); - - if (inv != null) { - inv.dropItems(b.getLocation(), SLOTS); - } - return true; - }); - } - - private BlockPlaceHandler onPlace() { - return new BlockPlaceHandler(false) { - - @Override - public void onPlayerPlace(BlockPlaceEvent e) { - Block b = e.getBlock(); - BlockStorage.addBlockInfo(b, "owner", e.getPlayer().getUniqueId().toString()); - BlockStorage.addBlockInfo(b, "index", "0"); - BlockStorage.addBlockInfo(b, FREQUENCY, "0"); - BlockStorage.addBlockInfo(b, "filter-type", "whitelist"); - BlockStorage.addBlockInfo(b, "filter-lore", String.valueOf(true)); - BlockStorage.addBlockInfo(b, "filter-durability", String.valueOf(false)); - } - }; } @Override - protected void createBorder(BlockMenuPreset preset) { - for (int i : BORDER) { - preset.addItem(i, new CustomItem(Material.CYAN_STAINED_GLASS_PANE, " "), ChestMenuUtils.getEmptyClickHandler()); - } - - preset.addItem(2, new CustomItem(Material.PAPER, "&3Items", "", "&bPut in all Items you want to", "&bblacklist/whitelist"), ChestMenuUtils.getEmptyClickHandler()); - } - - @Override - protected void updateBlockMenu(BlockMenu menu, Block b) { - if (!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), "filter-type") == null || BlockStorage.getLocationInfo(b.getLocation(), "filter-type").equals("whitelist")) { - menu.replaceExistingItem(15, new CustomItem(Material.WHITE_WOOL, "&7Type: &rWhitelist", "", "&e> Click to change it to Blacklist")); - menu.addMenuClickHandler(15, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-type", "blacklist"); - updateBlockMenu(menu, b); - return false; - }); - } - else { - menu.replaceExistingItem(15, new CustomItem(Material.BLACK_WOOL, "&7Type: &8Blacklist", "", "&e> Click to change it to Whitelist")); - menu.addMenuClickHandler(15, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-type", "whitelist"); - updateBlockMenu(menu, b); - return false; - }); - } - - if (!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), "filter-durability") == null || BlockStorage.getLocationInfo(b.getLocation(), "filter-durability").equals(String.valueOf(false))) { - menu.replaceExistingItem(16, new CustomItem(Material.STONE_SWORD, "&7Include Sub-IDs/Durability: &4\u2718", "", "&e> Click to toggle whether the Durability has to match")); - menu.addMenuClickHandler(16, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-durability", String.valueOf(true)); - updateBlockMenu(menu, b); - return false; - }); - } - else { - ItemStack is = new ItemStack(Material.GOLDEN_SWORD); - Damageable dmg = (Damageable) is.getItemMeta(); - dmg.setDamage(20); - is.setItemMeta((ItemMeta) dmg); - - menu.replaceExistingItem(16, new CustomItem(is, "&7Include Sub-IDs/Durability: &2\u2714", "", "&e> Click to toggle whether the Durability has to match")); - menu.addMenuClickHandler(16, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-durability", String.valueOf(false)); - updateBlockMenu(menu, b); - return false; - }); - } - - if (!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), "filter-lore") == null || BlockStorage.getLocationInfo(b.getLocation(), "filter-lore").equals(String.valueOf(true))) { - menu.replaceExistingItem(25, new CustomItem(Material.MAP, "&7Include Lore: &2\u2714", "", "&e> Click to toggle whether the Lore has to match")); - menu.addMenuClickHandler(25, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-lore", String.valueOf(false)); - updateBlockMenu(menu, b); - return false; - }); - } - else { - menu.replaceExistingItem(25, new CustomItem(Material.MAP, "&7Include Lore: &4\u2718", "", "&e> Click to toggle whether the Lore has to match")); - menu.addMenuClickHandler(25, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-lore", String.valueOf(true)); - updateBlockMenu(menu, b); - return false; - }); - } - - menu.replaceExistingItem(41, new CustomItem(SlimefunUtils.getCustomHead("f2599bd986659b8ce2c4988525c94e19ddd39fad08a38284a197f1b70675acc"), "&bChannel", "", "&e> Click to decrease the Channel ID by 1")); - menu.addMenuClickHandler(41, (p, slot, item, action) -> { - int channel = Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)) - 1; - if (channel < 0) { - if (SlimefunPlugin.getThirdPartySupportService().isChestTerminalInstalled()) channel = 16; - else channel = 15; - } - BlockStorage.addBlockInfo(b, FREQUENCY, String.valueOf(channel)); - updateBlockMenu(menu, b); - return false; - }); - - int channel = ((!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY) == null) ? 0 : (Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)))); - - if (channel == 16) { - menu.replaceExistingItem(42, new CustomItem(SlimefunUtils.getCustomHead("7a44ff3a5f49c69cab676bad8d98a063fa78cfa61916fdef3e267557fec18283"), "&bChannel ID: &3" + (channel + 1))); - menu.addMenuClickHandler(42, ChestMenuUtils.getEmptyClickHandler()); - } - else { - menu.replaceExistingItem(42, new CustomItem(MaterialCollections.getAllWoolColors().get(channel), "&bChannel ID: &3" + (channel + 1))); - menu.addMenuClickHandler(42, ChestMenuUtils.getEmptyClickHandler()); - } - - menu.replaceExistingItem(43, new CustomItem(SlimefunUtils.getCustomHead("c2f910c47da042e4aa28af6cc81cf48ac6caf37dab35f88db993accb9dfe516"), "&bChannel", "", "&e> Click to increase the Channel ID by 1")); - menu.addMenuClickHandler(43, (p, slot, item, action) -> { - int channeln = Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)) + 1; - - if (SlimefunPlugin.getThirdPartySupportService().isChestTerminalInstalled()) { - if (channeln > 16) channeln = 0; - } - else { - if (channeln > 15) channeln = 0; - } - - BlockStorage.addBlockInfo(b, FREQUENCY, String.valueOf(channeln)); - updateBlockMenu(menu, b); - return false; - }); + protected int[] getBorder() { + return BORDER; } } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/CargoInputNode.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/CargoInputNode.java index 7dbc91c49..f0876b835 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/CargoInputNode.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/CargoInputNode.java @@ -1,114 +1,44 @@ package io.github.thebusybiscuit.slimefun4.implementation.items.cargo; -import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.Damageable; -import org.bukkit.inventory.meta.ItemMeta; import io.github.thebusybiscuit.cscorelib2.item.CustomItem; -import io.github.thebusybiscuit.cscorelib2.materials.MaterialCollections; -import io.github.thebusybiscuit.slimefun4.core.handlers.BlockPlaceHandler; -import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; -import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; +import io.github.thebusybiscuit.slimefun4.utils.HeadTexture; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; -import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; -public class CargoInputNode extends AbstractCargoNode { +public class CargoInputNode extends AbstractFilterNode { private static final int[] BORDER = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 22, 23, 26, 27, 31, 32, 33, 34, 35, 36, 40, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }; - private static final int[] SLOTS = { 19, 20, 21, 28, 29, 30, 37, 38, 39 }; public CargoInputNode(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput) { super(category, item, recipeType, recipe, recipeOutput); - - addItemHandler(onPlace()); - registerBlockHandler(getID(), (p, b, stack, reason) -> { - BlockMenu inv = BlockStorage.getInventory(b); - - if (inv != null) { - inv.dropItems(b.getLocation(), SLOTS); - } - - return true; - }); - } - - private BlockPlaceHandler onPlace() { - return new BlockPlaceHandler(false) { - - @Override - public void onPlayerPlace(BlockPlaceEvent e) { - Block b = e.getBlock(); - BlockStorage.addBlockInfo(b, "owner", e.getPlayer().getUniqueId().toString()); - BlockStorage.addBlockInfo(b, "index", "0"); - BlockStorage.addBlockInfo(b, FREQUENCY, "0"); - BlockStorage.addBlockInfo(b, "filter-type", "whitelist"); - BlockStorage.addBlockInfo(b, "filter-lore", String.valueOf(true)); - BlockStorage.addBlockInfo(b, "filter-durability", String.valueOf(false)); - BlockStorage.addBlockInfo(b, "round-robin", String.valueOf(false)); - } - }; } @Override - protected void createBorder(BlockMenuPreset preset) { - for (int i : BORDER) { - preset.addItem(i, new CustomItem(Material.CYAN_STAINED_GLASS_PANE, " "), ChestMenuUtils.getEmptyClickHandler()); - } + protected int[] getBorder() { + return BORDER; + } - preset.addItem(2, new CustomItem(Material.PAPER, "&3Items", "", "&bPut in all Items you want to", "&bblacklist/whitelist"), ChestMenuUtils.getEmptyClickHandler()); + @Override + protected void onPlace(BlockPlaceEvent e) { + super.onPlace(e); + BlockStorage.addBlockInfo(e.getBlock(), "round-robin", String.valueOf(false)); } @Override protected void updateBlockMenu(BlockMenu menu, Block b) { - if (!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), "filter-type") == null || BlockStorage.getLocationInfo(b.getLocation(), "filter-type").equals("whitelist")) { - menu.replaceExistingItem(15, new CustomItem(Material.WHITE_WOOL, "&7Type: &rWhitelist", "", "&e> Click to change it to Blacklist")); - menu.addMenuClickHandler(15, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-type", "blacklist"); - updateBlockMenu(menu, b); - return false; - }); - } - else { - menu.replaceExistingItem(15, new CustomItem(Material.BLACK_WOOL, "&7Type: &8Blacklist", "", "&e> Click to change it to Whitelist")); - menu.addMenuClickHandler(15, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-type", "whitelist"); - updateBlockMenu(menu, b); - return false; - }); - } + super.updateBlockMenu(menu, b); - if (!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), "filter-durability") == null || BlockStorage.getLocationInfo(b.getLocation(), "filter-durability").equals(String.valueOf(false))) { - menu.replaceExistingItem(16, new CustomItem(Material.STONE_SWORD, "&7Include Sub-IDs/Durability: &4\u2718", "", "&e> Click to toggle whether the Durability has to match")); - menu.addMenuClickHandler(16, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-durability", String.valueOf(true)); - updateBlockMenu(menu, b); - return false; - }); - } - else { - ItemStack is = new ItemStack(Material.GOLDEN_SWORD); - Damageable dmg = (Damageable) is.getItemMeta(); - dmg.setDamage(20); - is.setItemMeta((ItemMeta) dmg); - - menu.replaceExistingItem(16, new CustomItem(is, "&7Include Sub-IDs/Durability: &2\u2714", "", "&e> Click to toggle whether the Durability has to match")); - menu.addMenuClickHandler(16, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-durability", String.valueOf(false)); - updateBlockMenu(menu, b); - return false; - }); - } - - if (!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), "round-robin") == null || BlockStorage.getLocationInfo(b.getLocation(), "round-robin").equals(String.valueOf(false))) { - menu.replaceExistingItem(24, new CustomItem(SlimefunUtils.getCustomHead("d78f2b7e5e75639ea7fb796c35d364c4df28b4243e66b76277aadcd6261337"), "&7Round-Robin Mode: &4\u2718", "", "&e> Click to enable Round Robin Mode", "&e(Items will be equally distributed on the Channel)")); + String roundRobinMode = BlockStorage.getLocationInfo(b.getLocation(), "round-robin"); + if (!BlockStorage.hasBlockInfo(b) || roundRobinMode == null || roundRobinMode.equals(String.valueOf(false))) { + menu.replaceExistingItem(24, new CustomItem(SlimefunUtils.getCustomHead(HeadTexture.ENERGY_REGULATOR.getTexture()), "&7Round-Robin Mode: &4\u2718", "", "&e> Click to enable Round Robin Mode", "&e(Items will be equally distributed on the Channel)")); menu.addMenuClickHandler(24, (p, slot, item, action) -> { BlockStorage.addBlockInfo(b, "round-robin", String.valueOf(true)); updateBlockMenu(menu, b); @@ -116,69 +46,13 @@ public class CargoInputNode extends AbstractCargoNode { }); } else { - menu.replaceExistingItem(24, new CustomItem(SlimefunUtils.getCustomHead("d78f2b7e5e75639ea7fb796c35d364c4df28b4243e66b76277aadcd6261337"), "&7Round-Robin Mode: &2\u2714", "", "&e> Click to disable Round Robin Mode", "&e(Items will be equally distributed on the Channel)")); + menu.replaceExistingItem(24, new CustomItem(SlimefunUtils.getCustomHead(HeadTexture.ENERGY_REGULATOR.getTexture()), "&7Round-Robin Mode: &2\u2714", "", "&e> Click to disable Round Robin Mode", "&e(Items will be equally distributed on the Channel)")); menu.addMenuClickHandler(24, (p, slot, item, action) -> { BlockStorage.addBlockInfo(b, "round-robin", String.valueOf(false)); updateBlockMenu(menu, b); return false; }); } - - if (!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), "filter-lore") == null || BlockStorage.getLocationInfo(b.getLocation(), "filter-lore").equals(String.valueOf(true))) { - menu.replaceExistingItem(25, new CustomItem(Material.MAP, "&7Include Lore: &2\u2714", "", "&e> Click to toggle whether the Lore has to match")); - menu.addMenuClickHandler(25, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-lore", String.valueOf(false)); - updateBlockMenu(menu, b); - return false; - }); - } - else { - menu.replaceExistingItem(25, new CustomItem(Material.MAP, "&7Include Lore: &4\u2718", "", "&e> Click to toggle whether the Lore has to match")); - menu.addMenuClickHandler(25, (p, slot, item, action) -> { - BlockStorage.addBlockInfo(b, "filter-lore", String.valueOf(true)); - updateBlockMenu(menu, b); - return false; - }); - } - - menu.replaceExistingItem(41, new CustomItem(SlimefunUtils.getCustomHead("f2599bd986659b8ce2c4988525c94e19ddd39fad08a38284a197f1b70675acc"), "&bChannel", "", "&e> Click to decrease the Channel ID by 1")); - menu.addMenuClickHandler(41, (p, slot, item, action) -> { - int channel = Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)) - 1; - if (channel < 0) { - if (SlimefunPlugin.getThirdPartySupportService().isChestTerminalInstalled()) channel = 16; - else channel = 15; - } - BlockStorage.addBlockInfo(b, FREQUENCY, String.valueOf(channel)); - updateBlockMenu(menu, b); - return false; - }); - - int channel = ((!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY) == null) ? 0 : (Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)))); - - if (channel == 16) { - menu.replaceExistingItem(42, new CustomItem(SlimefunUtils.getCustomHead("7a44ff3a5f49c69cab676bad8d98a063fa78cfa61916fdef3e267557fec18283"), "&bChannel ID: &3" + (channel + 1))); - menu.addMenuClickHandler(42, ChestMenuUtils.getEmptyClickHandler()); - } - else { - menu.replaceExistingItem(42, new CustomItem(new ItemStack(MaterialCollections.getAllWoolColors().get(channel)), "&bChannel ID: &3" + (channel + 1))); - menu.addMenuClickHandler(42, ChestMenuUtils.getEmptyClickHandler()); - } - - menu.replaceExistingItem(43, new CustomItem(SlimefunUtils.getCustomHead("c2f910c47da042e4aa28af6cc81cf48ac6caf37dab35f88db993accb9dfe516"), "&bChannel", "", "&e> Click to increase the Channel ID by 1")); - menu.addMenuClickHandler(43, (p, slot, item, action) -> { - int channeln = Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)) + 1; - - if (SlimefunPlugin.getThirdPartySupportService().isChestTerminalInstalled()) { - if (channeln > 16) channeln = 0; - } - else { - if (channeln > 15) channeln = 0; - } - - BlockStorage.addBlockInfo(b, FREQUENCY, String.valueOf(channeln)); - updateBlockMenu(menu, b); - return false; - }); } } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/CargoOutputNode.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/CargoOutputNode.java index f92e6fdfa..31ea4dcd8 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/CargoOutputNode.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/CargoOutputNode.java @@ -6,14 +6,9 @@ import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.inventory.ItemStack; import io.github.thebusybiscuit.cscorelib2.item.CustomItem; -import io.github.thebusybiscuit.cscorelib2.materials.MaterialCollections; -import io.github.thebusybiscuit.slimefun4.core.handlers.BlockPlaceHandler; -import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; -import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; -import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; @@ -24,20 +19,11 @@ public class CargoOutputNode extends AbstractCargoNode { public CargoOutputNode(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput) { super(category, item, recipeType, recipe, recipeOutput); - - addItemHandler(onPlace()); } - private BlockPlaceHandler onPlace() { - return new BlockPlaceHandler(false) { - - @Override - public void onPlayerPlace(BlockPlaceEvent e) { - Block b = e.getBlock(); - BlockStorage.addBlockInfo(b, "owner", e.getPlayer().getUniqueId().toString()); - BlockStorage.addBlockInfo(b, FREQUENCY, "0"); - } - }; + @Override + protected void onPlace(BlockPlaceEvent e) { + // We only require the default values } @Override @@ -49,46 +35,7 @@ public class CargoOutputNode extends AbstractCargoNode { @Override protected void updateBlockMenu(BlockMenu menu, Block b) { - menu.replaceExistingItem(12, new CustomItem(SlimefunUtils.getCustomHead("f2599bd986659b8ce2c4988525c94e19ddd39fad08a38284a197f1b70675acc"), "&bChannel", "", "&e> Click to decrease the Channel ID by 1")); - menu.addMenuClickHandler(12, (p, slot, item, action) -> { - int channel = Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)) - 1; - - if (channel < 0) { - if (SlimefunPlugin.getThirdPartySupportService().isChestTerminalInstalled()) channel = 16; - else channel = 15; - } - - BlockStorage.addBlockInfo(b, FREQUENCY, String.valueOf(channel)); - updateBlockMenu(menu, b); - return false; - }); - - int channel = ((!BlockStorage.hasBlockInfo(b) || BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY) == null) ? 0 : (Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)))); - - if (channel == 16) { - menu.replaceExistingItem(13, new CustomItem(SlimefunUtils.getCustomHead("7a44ff3a5f49c69cab676bad8d98a063fa78cfa61916fdef3e267557fec18283"), "&bChannel ID: &3" + (channel + 1))); - menu.addMenuClickHandler(13, ChestMenuUtils.getEmptyClickHandler()); - } - else { - menu.replaceExistingItem(13, new CustomItem(MaterialCollections.getAllWoolColors().get(channel), "&bChannel ID: &3" + (channel + 1))); - menu.addMenuClickHandler(13, ChestMenuUtils.getEmptyClickHandler()); - } - - menu.replaceExistingItem(14, new CustomItem(SlimefunUtils.getCustomHead("c2f910c47da042e4aa28af6cc81cf48ac6caf37dab35f88db993accb9dfe516"), "&bChannel", "", "&e> Click to increase the Channel ID by 1")); - menu.addMenuClickHandler(14, (p, slot, item, action) -> { - int channeln = Integer.parseInt(BlockStorage.getLocationInfo(b.getLocation(), FREQUENCY)) + 1; - - if (SlimefunPlugin.getThirdPartySupportService().isChestTerminalInstalled()) { - if (channeln > 16) channeln = 0; - } - else { - if (channeln > 15) channeln = 0; - } - - BlockStorage.addBlockInfo(b, FREQUENCY, String.valueOf(channeln)); - updateBlockMenu(menu, b); - return false; - }); + addChannelSelector(b, menu, 12, 13, 14); } } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java index d8aecf27e..87e9f49e1 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java @@ -96,7 +96,10 @@ public enum HeadTexture { NETHER_STAR_REACTOR("a11ed1d1b25b624665ecdddc3d3a5dff0b9f35e3de77a12f516e60fe8501cc8d"), UNKNOWN("46ba63344f49dd1c4f5488e926bf3d9e2b29916a6c50d610bb40a5273dc8c82"), MISSING_TEXTURE("e9eb9da26cf2d3341397a7f4913ba3d37d1ad10eae30ab25fa39ceb84bc"), - MINECRAFT_CHUNK("8449b9318e33158e64a46ab0de121c3d40000e3332c1574932b3c849d8fa0dc2"); + MINECRAFT_CHUNK("8449b9318e33158e64a46ab0de121c3d40000e3332c1574932b3c849d8fa0dc2"), + CHEST_TERMINAL("7a44ff3a5f49c69cab676bad8d98a063fa78cfa61916fdef3e267557fec18283"), + CARGO_ARROW_LEFT("f2599bd986659b8ce2c4988525c94e19ddd39fad08a38284a197f1b70675acc"), + CARGO_ARROW_RIGHT("c2f910c47da042e4aa28af6cc81cf48ac6caf37dab35f88db993accb9dfe516"); private final String texture; From 7c3599c8625ed6449c37622981a059afc4e0edf4 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Wed, 5 Aug 2020 16:44:43 +0200 Subject: [PATCH 04/65] [CI skip] Reduced technical debt --- CHANGELOG.md | 1 + .../api/events/BlockPlacerPlaceEvent.java | 2 + .../core/attributes/PiglinBarterDrop.java | 3 +- .../items/androids/ProgrammableAndroid.java | 4 +- .../items/electric/machines/AutoDrier.java | 109 ++++------------- .../implementation/items/medical/Bandage.java | 15 ++- .../implementation/items/medical/Rag.java | 47 -------- .../setup/SlimefunItemSetup.java | 111 +++++++----------- 8 files changed, 85 insertions(+), 207 deletions(-) delete mode 100644 src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Rag.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 41d84540a..df82aa2e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ * Performance improvements for miner talismans * Performance improvements for idling Enhanced Furnaces when using Paper * Performance improvements for Rainbow Blocks +* Crafting a Rag now yields two items #### Fixes * Fixed Programmable Androids rotating in the wrong direction diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/BlockPlacerPlaceEvent.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/BlockPlacerPlaceEvent.java index 43bc0e811..b2e30f85c 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/BlockPlacerPlaceEvent.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/events/BlockPlacerPlaceEvent.java @@ -32,6 +32,8 @@ public class BlockPlacerPlaceEvent extends BlockEvent implements Cancellable { * * @param blockPlacer * The {@link BlockPlacer} + * @param placedItem + * The {@link ItemStack} of the {@link Block} that was placed * @param block * The placed {@link Block} */ diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/attributes/PiglinBarterDrop.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/attributes/PiglinBarterDrop.java index 7cf46be4d..32a3b6449 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/attributes/PiglinBarterDrop.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/attributes/PiglinBarterDrop.java @@ -1,6 +1,7 @@ package io.github.thebusybiscuit.slimefun4.core.attributes; import org.bukkit.entity.Piglin; +import org.bukkit.event.entity.EntityDropItemEvent; import io.github.thebusybiscuit.slimefun4.implementation.listeners.PiglinListener; import me.mrCookieSlime.Slimefun.Lists.RecipeType; @@ -8,7 +9,7 @@ import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; /** * This interface, when attached to a {@link SlimefunItem}, provides a variable (0-100%) chance for - * a {@link SlimefunItem} to be dropped by a {@link Piglin} on {@link EntityItemDropEvent}. + * a {@link SlimefunItem} to be dropped by a {@link Piglin} on {@link EntityDropItemEvent}. * * @author dNiym * diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java index 725f03a46..4bd2b00e5 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java @@ -174,7 +174,9 @@ public abstract class ProgrammableAndroid extends SlimefunItem implements Invent * * @return The type of this {@link ProgrammableAndroid} */ - public abstract AndroidType getAndroidType(); + public AndroidType getAndroidType() { + return AndroidType.NONE; + } /** * This returns the {@link AndroidFuelSource} for this {@link ProgrammableAndroid}. diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/AutoDrier.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/AutoDrier.java index c25892873..43fa7d251 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/AutoDrier.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/AutoDrier.java @@ -5,22 +5,14 @@ import java.util.List; import org.bukkit.Material; import org.bukkit.Tag; -import org.bukkit.block.Block; import org.bukkit.inventory.ItemStack; -import io.github.thebusybiscuit.cscorelib2.item.CustomItem; import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems; -import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; -import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineRecipe; -import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; -import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock; -import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; /** * The {@link AutoDrier} is an implementation of {@link AContainer} that features recipes @@ -32,11 +24,15 @@ import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; */ public class AutoDrier extends AContainer implements RecipeDisplayItem { - private final List recipeList = new ArrayList<>(); + private List recipeList; public AutoDrier(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { super(category, item, recipeType, recipe); + } + @Override + protected void registerDefaultRecipes() { + recipeList = new ArrayList<>(); recipeList.add(new ItemStack(Material.ROTTEN_FLESH)); recipeList.add(new ItemStack(Material.LEATHER)); @@ -49,11 +45,11 @@ public class AutoDrier extends AContainer implements RecipeDisplayItem { recipeList.add(new ItemStack(Material.POTION)); recipeList.add(new ItemStack(Material.GLASS_BOTTLE)); - recipeList.add(new ItemStack(Material.OAK_SAPLING)); - recipeList.add(new ItemStack(Material.STICK, 2)); + recipeList.add(new ItemStack(Material.SPLASH_POTION)); + recipeList.add(new ItemStack(Material.GLASS_BOTTLE)); - recipeList.add(new ItemStack(Material.OAK_LEAVES)); - recipeList.add(new ItemStack(Material.STICK)); + recipeList.add(new ItemStack(Material.LINGERING_POTION)); + recipeList.add(new ItemStack(Material.GLASS_BOTTLE)); recipeList.add(new ItemStack(Material.WATER_BUCKET)); recipeList.add(new ItemStack(Material.BUCKET)); @@ -78,6 +74,21 @@ public class AutoDrier extends AContainer implements RecipeDisplayItem { recipeList.add(new ItemStack(Material.COOKED_SALMON)); recipeList.add(SlimefunItems.FISH_JERKY); + + for (Material sapling : Tag.SAPLINGS.getValues()) { + recipeList.add(new ItemStack(sapling)); + recipeList.add(new ItemStack(Material.STICK, 2)); + } + + for (Material leaves : Tag.LEAVES.getValues()) { + recipeList.add(new ItemStack(leaves)); + recipeList.add(new ItemStack(Material.STICK)); + } + + // Now convert them to machine recipes + for (int i = 0; i < recipeList.size(); i += 2) { + registerRecipe(6, recipeList.get(i), recipeList.get(i + 1)); + } } @Override @@ -95,78 +106,6 @@ public class AutoDrier extends AContainer implements RecipeDisplayItem { return recipeList; } - @Override - protected void tick(Block b) { - BlockMenu menu = BlockStorage.getInventory(b); - - if (isProcessing(b)) { - int timeleft = progress.get(b); - if (timeleft > 0) { - ChestMenuUtils.updateProgressbar(menu, 22, timeleft, processing.get(b).getTicks(), getProgressBar()); - - if (ChargableBlock.getCharge(b) < getEnergyConsumption()) { - return; - } - - ChargableBlock.addCharge(b, -getEnergyConsumption()); - progress.put(b, timeleft - 1); - } - else { - menu.replaceExistingItem(22, new CustomItem(new ItemStack(Material.BLACK_STAINED_GLASS_PANE), " ")); - menu.pushItem(processing.get(b).getOutput()[0], getOutputSlots()); - - progress.remove(b); - processing.remove(b); - } - } - else { - MachineRecipe r = null; - int inputSlot = -1; - - for (int slot : getInputSlots()) { - ItemStack item = menu.getItemInSlot(slot); - if (item != null) { - ItemStack output = getOutput(item); - - if (output != null) { - r = new MachineRecipe(6, new ItemStack[] { item }, new ItemStack[] { output.clone() }); - inputSlot = slot; - break; - } - } - } - - if (r != null) { - if (inputSlot == -1) return; - if (!menu.fits(r.getOutput()[0], getOutputSlots())) return; - - menu.consumeItem(inputSlot); - processing.put(b, r); - progress.put(b, r.getTicks()); - } - } - } - - private ItemStack getOutput(ItemStack item) { - for (int i = 0; i < recipeList.size(); i += 2) { - if (SlimefunUtils.isItemSimilar(item, recipeList.get(i), true)) { - return recipeList.get(i + 1); - } - } - - if (Tag.SAPLINGS.isTagged(item.getType())) { - return new ItemStack(Material.STICK, 2); - } - else if (Tag.LEAVES.isTagged(item.getType())) { - return new ItemStack(Material.STICK, 1); - } - else if (item.getType() == Material.SPLASH_POTION || item.getType() == Material.LINGERING_POTION) { - return new ItemStack(Material.GLASS_BOTTLE); - } - - return null; - } - @Override public int getEnergyConsumption() { return 5; diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Bandage.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Bandage.java index 33235a6a3..4c2acb049 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Bandage.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Bandage.java @@ -16,10 +16,21 @@ import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; +/** + * A {@link Bandage} or Rag is a medical supply which heals the {@link Player} and extinguishes + * fire. + * + * @author TheBusyBiscuit + * + */ public class Bandage extends SimpleSlimefunItem { - public Bandage(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput) { + private final int healingLevel; + + public Bandage(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput, int healingLevel) { super(category, item, recipeType, recipe, recipeOutput); + + this.healingLevel = healingLevel; } @Override @@ -37,7 +48,7 @@ public class Bandage extends SimpleSlimefunItem { } p.getWorld().playEffect(p.getLocation(), Effect.STEP_SOUND, Material.WHITE_WOOL); - p.addPotionEffect(new PotionEffect(PotionEffectType.HEAL, 1, 1)); + p.addPotionEffect(new PotionEffect(PotionEffectType.HEAL, 1, healingLevel)); p.setFireTicks(0); e.cancel(); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Rag.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Rag.java deleted file mode 100644 index 2d314ee86..000000000 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/Rag.java +++ /dev/null @@ -1,47 +0,0 @@ -package io.github.thebusybiscuit.slimefun4.implementation.items.medical; - -import org.bukkit.Effect; -import org.bukkit.GameMode; -import org.bukkit.Material; -import org.bukkit.attribute.Attribute; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; - -import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils; -import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler; -import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; -import me.mrCookieSlime.Slimefun.Lists.RecipeType; -import me.mrCookieSlime.Slimefun.Objects.Category; -import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; - -public class Rag extends SimpleSlimefunItem { - - public Rag(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { - super(category, item, recipeType, recipe); - } - - @Override - public ItemUseHandler getItemHandler() { - return e -> { - Player p = e.getPlayer(); - - // Player is neither burning nor injured - if (p.getFireTicks() <= 0 && p.getHealth() >= p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()) { - return; - } - - if (p.getGameMode() != GameMode.CREATIVE) { - ItemUtils.consumeItem(e.getItem(), false); - } - - p.getWorld().playEffect(p.getLocation(), Effect.STEP_SOUND, Material.WHITE_WOOL); - p.addPotionEffect(new PotionEffect(PotionEffectType.HEAL, 1, 0)); - p.setFireTicks(0); - - e.cancel(); - }; - } - -} 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 607c000ee..89fb366f7 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 @@ -25,7 +25,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.items.VanillaItem; import io.github.thebusybiscuit.slimefun4.implementation.items.altar.AncientAltar; import io.github.thebusybiscuit.slimefun4.implementation.items.altar.AncientPedestal; import io.github.thebusybiscuit.slimefun4.implementation.items.androids.AdvancedFarmerAndroid; -import io.github.thebusybiscuit.slimefun4.implementation.items.androids.AndroidType; import io.github.thebusybiscuit.slimefun4.implementation.items.androids.ButcherAndroid; import io.github.thebusybiscuit.slimefun4.implementation.items.androids.FarmerAndroid; import io.github.thebusybiscuit.slimefun4.implementation.items.androids.FisherAndroid; @@ -139,7 +138,6 @@ import io.github.thebusybiscuit.slimefun4.implementation.items.magical.talismans import io.github.thebusybiscuit.slimefun4.implementation.items.magical.talismans.Talisman; import io.github.thebusybiscuit.slimefun4.implementation.items.medical.Bandage; import io.github.thebusybiscuit.slimefun4.implementation.items.medical.Medicine; -import io.github.thebusybiscuit.slimefun4.implementation.items.medical.Rag; import io.github.thebusybiscuit.slimefun4.implementation.items.medical.Splint; import io.github.thebusybiscuit.slimefun4.implementation.items.medical.Vitamins; import io.github.thebusybiscuit.slimefun4.implementation.items.misc.BasicCircuitBoard; @@ -417,7 +415,7 @@ public final class SlimefunItemSetup { new ItemStack[] {null, new ItemStack(Material.REDSTONE), null, SlimefunItems.ZINC_INGOT, SlimefunItems.SULFATE, SlimefunItems.COPPER_INGOT, SlimefunItems.ZINC_INGOT, SlimefunItems.SULFATE, SlimefunItems.COPPER_INGOT}) .register(plugin); - registerArmorSet(categories.magicalArmor, new ItemStack(Material.GLOWSTONE), new ItemStack[] {SlimefunItems.GLOWSTONE_HELMET, SlimefunItems.GLOWSTONE_CHESTPLATE, SlimefunItems.GLOWSTONE_LEGGINGS, SlimefunItems.GLOWSTONE_BOOTS}, "GLOWSTONE", + registerArmorSet(categories.magicalArmor, new ItemStack(Material.GLOWSTONE), new ItemStack[] {SlimefunItems.GLOWSTONE_HELMET, SlimefunItems.GLOWSTONE_CHESTPLATE, SlimefunItems.GLOWSTONE_LEGGINGS, SlimefunItems.GLOWSTONE_BOOTS}, "GLOWSTONE", false, new PotionEffect[][] { new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)}, new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)}, @@ -425,11 +423,11 @@ public final class SlimefunItemSetup { new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)} }, plugin); - registerArmorSet(categories.armor, SlimefunItems.DAMASCUS_STEEL_INGOT, new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_HELMET, SlimefunItems.DAMASCUS_STEEL_CHESTPLATE, SlimefunItems.DAMASCUS_STEEL_LEGGINGS, SlimefunItems.DAMASCUS_STEEL_BOOTS}, "DAMASCUS_STEEL", false, plugin); + registerArmorSet(categories.armor, SlimefunItems.DAMASCUS_STEEL_INGOT, new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_HELMET, SlimefunItems.DAMASCUS_STEEL_CHESTPLATE, SlimefunItems.DAMASCUS_STEEL_LEGGINGS, SlimefunItems.DAMASCUS_STEEL_BOOTS}, "DAMASCUS_STEEL", false, new PotionEffect[0][0], plugin); - registerArmorSet(categories.armor, SlimefunItems.REINFORCED_ALLOY_INGOT, new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_HELMET, SlimefunItems.REINFORCED_ALLOY_CHESTPLATE, SlimefunItems.REINFORCED_ALLOY_LEGGINGS, SlimefunItems.REINFORCED_ALLOY_BOOTS}, "REINFORCED_ALLOY", false, plugin); + registerArmorSet(categories.armor, SlimefunItems.REINFORCED_ALLOY_INGOT, new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_HELMET, SlimefunItems.REINFORCED_ALLOY_CHESTPLATE, SlimefunItems.REINFORCED_ALLOY_LEGGINGS, SlimefunItems.REINFORCED_ALLOY_BOOTS}, "REINFORCED_ALLOY", false, new PotionEffect[0][0], plugin); - registerArmorSet(categories.armor, new ItemStack(Material.CACTUS), new ItemStack[] {SlimefunItems.CACTUS_HELMET, SlimefunItems.CACTUS_CHESTPLATE, SlimefunItems.CACTUS_LEGGINGS, SlimefunItems.CACTUS_BOOTS}, "CACTUS", false, plugin); + registerArmorSet(categories.armor, new ItemStack(Material.CACTUS), new ItemStack[] {SlimefunItems.CACTUS_HELMET, SlimefunItems.CACTUS_CHESTPLATE, SlimefunItems.CACTUS_LEGGINGS, SlimefunItems.CACTUS_BOOTS}, "CACTUS", false, new PotionEffect[0][0], plugin); new SlimefunItem(categories.resources, SlimefunItems.REINFORCED_ALLOY_INGOT, RecipeType.SMELTERY, new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.SOLDER_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.GOLD_24K, null, null, null}) @@ -876,7 +874,7 @@ public final class SlimefunItemSetup { registerArmorSet(categories.armor, SlimefunItems.CHAIN, new ItemStack[] { new ItemStack(Material.CHAINMAIL_HELMET), new ItemStack(Material.CHAINMAIL_CHESTPLATE), new ItemStack(Material.CHAINMAIL_LEGGINGS), new ItemStack(Material.CHAINMAIL_BOOTS) - }, "CHAIN", true, plugin); + }, "CHAIN", true, new PotionEffect[0][0], plugin); new Talisman(SlimefunItems.TALISMAN_WHIRLWIND, new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.STAFF_WIND, SlimefunItems.TALISMAN_TRAVELLER, SlimefunItems.STAFF_WIND, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3} @@ -911,7 +909,7 @@ public final class SlimefunItemSetup { registerArmorSet(categories.armor, SlimefunItems.GILDED_IRON, new ItemStack[] { SlimefunItems.GILDED_IRON_HELMET, SlimefunItems.GILDED_IRON_CHESTPLATE, SlimefunItems.GILDED_IRON_LEGGINGS, SlimefunItems.GILDED_IRON_BOOTS - }, "GILDED_IRON", false, plugin); + }, "GILDED_IRON", false, new PotionEffect[0][0], plugin); new SlimefunItem(categories.technicalComponents, SlimefunItems.REINFORCED_CLOTH, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, SlimefunItems.CLOTH, null, SlimefunItems.CLOTH, SlimefunItems.LEAD_INGOT, SlimefunItems.CLOTH, null, SlimefunItems.CLOTH, null}, new SlimefunItemStack(SlimefunItems.REINFORCED_CLOTH, 2)) @@ -965,20 +963,21 @@ public final class SlimefunItemSetup { registerArmorSet(categories.armor, SlimefunItems.GOLD_12K, new ItemStack[] { SlimefunItems.GOLD_HELMET, SlimefunItems.GOLD_CHESTPLATE, SlimefunItems.GOLD_LEGGINGS, SlimefunItems.GOLD_BOOTS - }, "GOLD_12K", false, plugin); + }, "GOLD_12K", false, new PotionEffect[0][0], plugin); new SlimefunItem(categories.misc, SlimefunItems.CLOTH, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.WHITE_WOOL), null, null, null, null, null, null, null, null}, new CustomItem(SlimefunItems.CLOTH, 8)) .register(plugin); - new Rag(categories.usefulItems, SlimefunItems.RAG, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH, new ItemStack(Material.STRING), null, new ItemStack(Material.STRING), SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH}) + new Bandage(categories.usefulItems, SlimefunItems.RAG, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH, new ItemStack(Material.STRING), null, new ItemStack(Material.STRING), SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH}, + new SlimefunItemStack(SlimefunItems.RAG, 2), 0) .register(plugin); new Bandage(categories.usefulItems, SlimefunItems.BANDAGE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.RAG, new ItemStack(Material.STRING), SlimefunItems.RAG, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.BANDAGE, 4)) + new SlimefunItemStack(SlimefunItems.BANDAGE, 4), 1) .register(plugin); new Splint(categories.usefulItems, SlimefunItems.SPLINT, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -2201,11 +2200,6 @@ public final class SlimefunItemSetup { new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.COAL_GENERATOR, SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.CHEST), SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET}) { - @Override - public AndroidType getAndroidType() { - return AndroidType.NONE; - } - @Override public float getFuelEfficiency() { return 1; @@ -2302,11 +2296,6 @@ public final class SlimefunItemSetup { new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.COMBUSTION_REACTOR, SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.CHEST), SlimefunItems.PLASTIC_SHEET, SlimefunItems.POWER_CRYSTAL, SlimefunItems.PLASTIC_SHEET}) { - @Override - public AndroidType getAndroidType() { - return AndroidType.NONE; - } - @Override public float getFuelEfficiency() { return 1.5F; @@ -2371,11 +2360,6 @@ public final class SlimefunItemSetup { new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_3, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.NUCLEAR_REACTOR, SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.CHEST), SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BLISTERING_INGOT_3}) { - @Override - public AndroidType getAndroidType() { - return AndroidType.NONE; - } - @Override public float getFuelEfficiency() { return 1F; @@ -2469,7 +2453,7 @@ public final class SlimefunItemSetup { new InfernalBonemeal(categories.magicalGadgets, SlimefunItems.INFERNAL_BONEMEAL, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.NETHER_WART), SlimefunItems.EARTH_RUNE, new ItemStack(Material.NETHER_WART), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.BONE_MEAL), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.NETHER_WART), new ItemStack(Material.BLAZE_POWDER), new ItemStack(Material.NETHER_WART)}, - new CustomItem(SlimefunItems.INFERNAL_BONEMEAL, 8)) + new SlimefunItemStack(SlimefunItems.INFERNAL_BONEMEAL, 8)) .register(plugin); new SlimefunItem(categories.magicalGadgets, SlimefunItems.ELYTRA_SCALE, RecipeType.ANCIENT_ALTAR, @@ -2494,54 +2478,54 @@ public final class SlimefunItemSetup { new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_WOOL, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL)}, - new CustomItem(SlimefunItems.RAINBOW_WOOL, 8), new RainbowTickHandler(MaterialCollections.getAllWoolColors())) + new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL, 8), new RainbowTickHandler(MaterialCollections.getAllWoolColors())) .register(plugin); new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_GLASS, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS)}, - new CustomItem(SlimefunItems.RAINBOW_GLASS, 8), new RainbowTickHandler(MaterialCollections.getAllStainedGlassColors())) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS, 8), new RainbowTickHandler(MaterialCollections.getAllStainedGlassColors())) .register(plugin); new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_GLASS_PANE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE)}, - new CustomItem(SlimefunItems.RAINBOW_GLASS_PANE, 8), new RainbowTickHandler(MaterialCollections.getAllStainedGlassPaneColors())) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE, 8), new RainbowTickHandler(MaterialCollections.getAllStainedGlassPaneColors())) .register(plugin); new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_CLAY, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA)}, - new CustomItem(SlimefunItems.RAINBOW_CLAY, 8), new RainbowTickHandler(MaterialCollections.getAllTerracottaColors())) + new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY, 8), new RainbowTickHandler(MaterialCollections.getAllTerracottaColors())) .register(plugin); new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_CONCRETE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE)}, - new CustomItem(SlimefunItems.RAINBOW_CONCRETE, 8), new RainbowTickHandler(MaterialCollections.getAllConcreteColors())) + new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE, 8), new RainbowTickHandler(MaterialCollections.getAllConcreteColors())) .register(plugin); new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA)}, - new CustomItem(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA, 8), new RainbowTickHandler(MaterialCollections.getAllGlazedTerracottaColors())) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA, 8), new RainbowTickHandler(MaterialCollections.getAllGlazedTerracottaColors())) .register(plugin); // Christmas new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_WOOL_XMAS, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_WOOL_XMAS, 2), new RainbowTickHandler(Material.RED_WOOL, Material.GREEN_WOOL)) + new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL_XMAS, 2), new RainbowTickHandler(Material.RED_WOOL, Material.GREEN_WOOL)) .register(plugin); new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_GLASS_XMAS, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_GLASS_XMAS, 2), new RainbowTickHandler(Material.RED_STAINED_GLASS, Material.GREEN_STAINED_GLASS)) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_XMAS, 2), new RainbowTickHandler(Material.RED_STAINED_GLASS, Material.GREEN_STAINED_GLASS)) .register(plugin); new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_GLASS_PANE_XMAS, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_GLASS_PANE_XMAS, 2), new RainbowTickHandler(Material.RED_STAINED_GLASS_PANE, Material.GREEN_STAINED_GLASS_PANE)) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE_XMAS, 2), new RainbowTickHandler(Material.RED_STAINED_GLASS_PANE, Material.GREEN_STAINED_GLASS_PANE)) .register(plugin); new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_CLAY_XMAS, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_CLAY_XMAS, 2), new RainbowTickHandler(Material.RED_TERRACOTTA, Material.GREEN_TERRACOTTA)) + new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY_XMAS, 2), new RainbowTickHandler(Material.RED_TERRACOTTA, Material.GREEN_TERRACOTTA)) .register(plugin); new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_CONCRETE_XMAS, RecipeType.ANCIENT_ALTAR, @@ -2551,76 +2535,76 @@ public final class SlimefunItemSetup { new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_XMAS, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_XMAS, 2), new RainbowTickHandler(Material.RED_GLAZED_TERRACOTTA, Material.GREEN_GLAZED_TERRACOTTA)) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_XMAS, 2), new RainbowTickHandler(Material.RED_GLAZED_TERRACOTTA, Material.GREEN_GLAZED_TERRACOTTA)) .register(plugin); // Valentines Day new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_WOOL_VALENTINE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_WOOL_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_WOOL, Material.PINK_WOOL)) + new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_WOOL, Material.PINK_WOOL)) .register(plugin); new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_GLASS_VALENTINE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_GLASS_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_STAINED_GLASS, Material.PINK_STAINED_GLASS)) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_STAINED_GLASS, Material.PINK_STAINED_GLASS)) .register(plugin); new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_GLASS_PANE_VALENTINE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_GLASS_PANE_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_STAINED_GLASS_PANE, Material.PINK_STAINED_GLASS_PANE)) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_STAINED_GLASS_PANE, Material.PINK_STAINED_GLASS_PANE)) .register(plugin); new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_CLAY_VALENTINE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_CLAY_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_TERRACOTTA, Material.PINK_TERRACOTTA)) + new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_TERRACOTTA, Material.PINK_TERRACOTTA)) .register(plugin); new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_CONCRETE_VALENTINE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_CONCRETE_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_CONCRETE, Material.PINK_CONCRETE)) + new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_CONCRETE, Material.PINK_CONCRETE)) .register(plugin); new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_VALENTINE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_GLAZED_TERRACOTTA, Material.PINK_GLAZED_TERRACOTTA)) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_GLAZED_TERRACOTTA, Material.PINK_GLAZED_TERRACOTTA)) .register(plugin); // Halloween new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_WOOL_HALLOWEEN, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_WOOL_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_WOOL, Material.BLACK_WOOL)) + new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_WOOL, Material.BLACK_WOOL)) .register(plugin); new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_GLASS_HALLOWEEN, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_GLASS_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_STAINED_GLASS, Material.BLACK_STAINED_GLASS)) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_STAINED_GLASS, Material.BLACK_STAINED_GLASS)) .register(plugin); new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_GLASS_PANE_HALLOWEEN, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_GLASS_PANE_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_STAINED_GLASS_PANE, Material.BLACK_STAINED_GLASS_PANE)) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_STAINED_GLASS_PANE, Material.BLACK_STAINED_GLASS_PANE)) .register(plugin); new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_CLAY_HALLOWEEN, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_CLAY_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_TERRACOTTA, Material.BLACK_TERRACOTTA)) + new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_TERRACOTTA, Material.BLACK_TERRACOTTA)) .register(plugin); new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_CONCRETE_HALLOWEEN, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_CONCRETE_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_CONCRETE, Material.BLACK_CONCRETE)) + new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_CONCRETE, Material.BLACK_CONCRETE)) .register(plugin); new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_HALLOWEEN, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_GLAZED_TERRACOTTA, Material.BLACK_GLAZED_TERRACOTTA)) + new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_GLAZED_TERRACOTTA, Material.BLACK_GLAZED_TERRACOTTA)) .register(plugin); new WitherProofBlock(categories.technicalComponents, SlimefunItems.WITHER_PROOF_GLASS, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.LEAD_INGOT, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.LEAD_INGOT, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.HARDENED_GLASS, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.LEAD_INGOT, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.LEAD_INGOT}, - new CustomItem(SlimefunItems.WITHER_PROOF_GLASS, 4)) + new SlimefunItemStack(SlimefunItems.WITHER_PROOF_GLASS, 4)) .register(plugin); new GEOScanner(categories.gps, SlimefunItems.GPS_GEO_SCANNER, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -3240,10 +3224,11 @@ public final class SlimefunItemSetup { .register(plugin); } } - - private static void registerArmorSet(Category category, ItemStack baseComponent, ItemStack[] items, String idSyntax, boolean vanilla, SlimefunAddon addon) { + + private static void registerArmorSet(Category category, ItemStack baseComponent, ItemStack[] items, String idSyntax, boolean vanilla, PotionEffect[][] effects, SlimefunAddon addon) { String[] components = new String[] { "_HELMET", "_CHESTPLATE", "_LEGGINGS", "_BOOTS" }; List recipes = new ArrayList<>(); + recipes.add(new ItemStack[] { baseComponent, baseComponent, baseComponent, baseComponent, null, baseComponent, null, null, null }); recipes.add(new ItemStack[] { baseComponent, null, baseComponent, baseComponent, baseComponent, baseComponent, baseComponent, baseComponent, baseComponent }); recipes.add(new ItemStack[] { baseComponent, baseComponent, baseComponent, baseComponent, null, baseComponent, baseComponent, null, baseComponent }); @@ -3253,23 +3238,7 @@ public final class SlimefunItemSetup { if (vanilla) { new VanillaItem(category, items[i], idSyntax + components[i], RecipeType.ARMOR_FORGE, recipes.get(i)).register(addon); } - else { - new SlimefunItem(category, new SlimefunItemStack(idSyntax + components[i], items[i]), RecipeType.ARMOR_FORGE, recipes.get(i)).register(addon); - } - } - } - - private static void registerArmorSet(Category category, ItemStack baseComponent, ItemStack[] items, String idSyntax, PotionEffect[][] effects, SlimefunAddon addon) { - String[] components = new String[] { "_HELMET", "_CHESTPLATE", "_LEGGINGS", "_BOOTS" }; - List recipes = new ArrayList<>(); - - recipes.add(new ItemStack[] { baseComponent, baseComponent, baseComponent, baseComponent, null, baseComponent, null, null, null }); - recipes.add(new ItemStack[] { baseComponent, null, baseComponent, baseComponent, baseComponent, baseComponent, baseComponent, baseComponent, baseComponent }); - recipes.add(new ItemStack[] { baseComponent, baseComponent, baseComponent, baseComponent, null, baseComponent, baseComponent, null, baseComponent }); - recipes.add(new ItemStack[] { null, null, null, baseComponent, null, baseComponent, baseComponent, null, baseComponent }); - - for (int i = 0; i < 4; i++) { - if (i < effects.length && effects[i].length > 0) { + else if (i < effects.length && effects[i].length > 0) { new SlimefunArmorPiece(category, new SlimefunItemStack(idSyntax + components[i], items[i]), RecipeType.ARMOR_FORGE, recipes.get(i), effects[i]).register(addon); } else { From 3d8e01e6f2cdb00610c5046d4fa1aa80b1e9e90b Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Wed, 5 Aug 2020 14:52:33 +0000 Subject: [PATCH 05/65] Translate messages_de.yml via GitLocalize --- src/main/resources/languages/messages_de.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/resources/languages/messages_de.yml b/src/main/resources/languages/messages_de.yml index a95ab895d..2b9f41e0f 100644 --- a/src/main/resources/languages/messages_de.yml +++ b/src/main/resources/languages/messages_de.yml @@ -306,6 +306,7 @@ languages: zh-CN: Chinesisch (China) el: Griechisch he: Hebräisch + pt: Portugiesisch (Portugal) ar: Arabisch af: Afrikaans da: Dänisch @@ -317,7 +318,6 @@ languages: fa: Persisch th: Thailändisch ro: Rumänisch - pt: Portugiesisch (Portugal) pt-BR: Portugiesisch (Brasilien) bg: Bulgarisch ko: Koreanisch @@ -327,5 +327,7 @@ languages: sr: Serbisch be: Belarusisch tl: Tagalog +brewing_stand: + not-working: "&4Items von Slimefun können nicht zum Brauen verwendet werden!" miner: no-ores: "&eIch konnte leider keine Erze in der Nähe finden!" From a0fe200948985f2f13743021fc71e2d53d069fea Mon Sep 17 00:00:00 2001 From: Scott Gomez Andoy Date: Wed, 5 Aug 2020 14:54:16 +0000 Subject: [PATCH 06/65] Translate messages_tl.yml via GitLocalize --- src/main/resources/languages/messages_tl.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/resources/languages/messages_tl.yml b/src/main/resources/languages/messages_tl.yml index bafeb2697..de0485288 100644 --- a/src/main/resources/languages/messages_tl.yml +++ b/src/main/resources/languages/messages_tl.yml @@ -334,3 +334,5 @@ languages: sr: Serbian be: Belarusian tl: Tagalog/Filipino +brewing_stand: + not-working: "&4Hindi ka maaaring gumamit ng mga Item ng Slimefun sa Brewing Stand!" From cd7a94516a350979c9b930b8a3fd8fc0ae1a1825 Mon Sep 17 00:00:00 2001 From: LinoxGH Date: Wed, 5 Aug 2020 15:06:58 +0000 Subject: [PATCH 07/65] Translate messages_tr.yml via GitLocalize --- src/main/resources/languages/messages_tr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/resources/languages/messages_tr.yml b/src/main/resources/languages/messages_tr.yml index a729d4f4a..0608f4bb9 100644 --- a/src/main/resources/languages/messages_tr.yml +++ b/src/main/resources/languages/messages_tr.yml @@ -318,5 +318,7 @@ languages: sr: Sırpça be: Belarusça tl: Tagalog +brewing_stand: + not-working: "&4Slimefun eşyalarını simya standında kullanamazsın!" miner: no-ores: "&eÜzgünüm, yakınlarda herhangi bir cevher bulamadım!" From c2cc7ab96c706c51ba7697e1cf26ef0f76853ae1 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Wed, 5 Aug 2020 15:38:07 +0000 Subject: [PATCH 08/65] Translate messages_ja.yml via GitLocalize --- src/main/resources/languages/messages_ja.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/resources/languages/messages_ja.yml b/src/main/resources/languages/messages_ja.yml index 62077b9a0..24877bc5d 100644 --- a/src/main/resources/languages/messages_ja.yml +++ b/src/main/resources/languages/messages_ja.yml @@ -284,6 +284,8 @@ languages: zh-CN: 中国語(中国) el: ギリシャ語 he: ヘブライ語 + pt: ポルトガル語(ポルトガル) + pt-BR: ポルトガル語(ブラジル) ar: アラビア語 af: アフリカーンス語 da: デンマーク語 @@ -295,8 +297,6 @@ languages: fa: ペルシア語 th: タイ語 ro: ルーマニア語 - pt: ポルトガル語(ポルトガル) - pt-BR: ポルトガル語(ブラジル) bg: ブルガリア語 ko: 韓国語 tr: トルコ語 @@ -305,5 +305,7 @@ languages: sr: セルビア語 be: ベラルーシ語 tl: タガログ語 +brewing_stand: + not-working: "&4Slimefunのアイテムは醸造台で使えません!" miner: no-ores: "&e周辺には鉱石が見つかりませんでした!" From bb67155add857c45b0a8cb7ae7a64352936757b7 Mon Sep 17 00:00:00 2001 From: bito-blosh Date: Wed, 5 Aug 2020 15:38:08 +0000 Subject: [PATCH 09/65] Translate messages_ja.yml via GitLocalize From 9594046bd5a0e7644e303acd781cff7a1da70308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Marczink=C3=B3?= Date: Wed, 5 Aug 2020 21:36:35 +0000 Subject: [PATCH 10/65] Translate recipes_hu.yml via GitLocalize --- src/main/resources/languages/recipes_hu.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/resources/languages/recipes_hu.yml b/src/main/resources/languages/recipes_hu.yml index 1992ade71..899b0e21f 100644 --- a/src/main/resources/languages/recipes_hu.yml +++ b/src/main/resources/languages/recipes_hu.yml @@ -32,7 +32,7 @@ slimefun: - Készítsd el ezt a Tárgyat az ábra alapján - egy Ore Crusher segítségével mob_drop: - name: Mob Drop + name: Élőlény Dobja lore: - Öld meg ezt az Élőlényt, - hogy megszerezd ezt a tárgyat @@ -118,6 +118,11 @@ slimefun: lore: - Készítsd el ezt a Tárgyat az ábra alapján - egy Refinery segítségével + barter_drop: + name: Piglinek Dobják Cserélésnél + lore: + - Cseréld el a Piglenekkel Aranyrudakat, + - hogy megszerezd ezt a tárgyat minecraft: shaped: name: Barkácsrecept Forma From f89f3a35bb5d5664e6f0d005af78b07f9bf6f9c3 Mon Sep 17 00:00:00 2001 From: poma123 Date: Wed, 5 Aug 2020 21:36:36 +0000 Subject: [PATCH 11/65] Translate messages_hu.yml via GitLocalize --- src/main/resources/languages/messages_hu.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/resources/languages/messages_hu.yml b/src/main/resources/languages/messages_hu.yml index 6a932fd5c..17adc36d7 100644 --- a/src/main/resources/languages/messages_hu.yml +++ b/src/main/resources/languages/messages_hu.yml @@ -121,7 +121,7 @@ messages: meghalsz." research: start: "&7Az Ősi Lelkek titokzatos szavakat súgnak a füledbe!" - progress: "&7Elkezdel kíváncsiskodni a kutatásról, neve: &b%research% &e(%progress%)" + progress: "&7Elkezdtél kíváncsiskodni a következő kutatásról: &b%research% &e(%progress%)" fire-extinguish: "&7Eloltottad magad!" cannot-place: "&cNem teheted ezt a blokkot oda!" no-pvp: "&cA pvp itt nem engedélyezett!" @@ -300,8 +300,6 @@ languages: zh-CN: Kínai (Kína) el: Görög he: Héber - pt: Portugál (Portugália) - pt-BR: Portugál (Brazília) ar: Arab af: Afrikánsz da: Dán @@ -313,6 +311,8 @@ languages: fa: Perzsa th: Thai ro: Román + pt: Portugál (Portugália) + pt-BR: Portugál (Brazília) bg: Bolgár ko: Koreai tr: Török @@ -321,5 +321,7 @@ languages: sr: Szerb be: Belorusz tl: Tagalog +brewing_stand: + not-working: "&4Nem használhatsz Slimefun tárgyakat a Főzőállványban!" miner: no-ores: "&eSajnálom, nem találtam semmilyen Ércet a közelben!" From 7f1a300f380771792fa32a875fd691ee844e5355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Marczink=C3=B3?= Date: Wed, 5 Aug 2020 21:36:37 +0000 Subject: [PATCH 12/65] Translate messages_hu.yml via GitLocalize From 33d802b9408376acd8eba88ed97f349106b18961 Mon Sep 17 00:00:00 2001 From: Luu7 Date: Thu, 6 Aug 2020 07:47:02 +0000 Subject: [PATCH 13/65] Translate researches_es.yml via GitLocalize --- src/main/resources/languages/researches_es.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/languages/researches_es.yml b/src/main/resources/languages/researches_es.yml index 92a533964..9e3aec5cc 100644 --- a/src/main/resources/languages/researches_es.yml +++ b/src/main/resources/languages/researches_es.yml @@ -236,3 +236,7 @@ slimefun: advanced_industrial_miner: Minería Mejorada magical_zombie_pills: De-Zombificación auto_brewer: Alquimia Industrial + enchantment_rune: Encantamiento Antiguo + lead_clothing: Ropa de Plomo + tape_measure: Cinta Métrica + iron_golem_assembler: Iron Golems Automáticos From 4a45757a53fc3a0ceb76e9f4dab411fedea062db Mon Sep 17 00:00:00 2001 From: Luu7 Date: Thu, 6 Aug 2020 07:47:03 +0000 Subject: [PATCH 14/65] Translate messages_es.yml via GitLocalize --- src/main/resources/languages/messages_es.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/resources/languages/messages_es.yml b/src/main/resources/languages/messages_es.yml index d69e40244..497df743d 100644 --- a/src/main/resources/languages/messages_es.yml +++ b/src/main/resources/languages/messages_es.yml @@ -150,6 +150,16 @@ messages: - "&7¡Siempre mira el lado bueno de la vida!" - "&7Esta era un bizcocho y no una galleta" - "&7¡Los signos de neón son lo MEJOR!" + piglin-barter: "&4No puedes tradear con piglins usando items de Slimefun" + enchantment-rune: + fail: "&cNo puedes encantar este item." + no-enchantment: "&cNo se pudo encontrar un encantamiento aplicable a este item." + success: "&aHas aplicado con éxito un encantamiento aleatorio a este item." + tape-measure: + no-anchor: "&cNecesitas establecer un ancla antes de comenzar a medir!" + wrong-world: "&cParece ser que tu ancla se encuentra en un mundo diferente!" + distance: "&7Medida tomada. &eDistancia: %distance%" + anchor-set: "&aAncla establecida con éxito:&e %anchor%" machines: pattern-not-found: "&eLo siento, no puedo reconocer esta receta. Por favor coloca el objeto en el patrón correcto dentro del dispensador." @@ -291,8 +301,6 @@ languages: zh-CN: Chino (China) el: Griego he: Hebreo - pt: Portugués (Portugal) - pt-BR: Portugués (Brasil) ar: Árabe af: Africano da: Danés @@ -304,6 +312,8 @@ languages: fa: Persa th: Tailandés ro: Rumano + pt: Portugués (Portugal) + pt-BR: Portugués (Brasil) bg: Búlgaro ko: Coreano tr: Turco @@ -312,5 +322,7 @@ languages: sr: Serbio be: Bielorruso tl: Tagalog +brewing_stand: + not-working: "&4¡No puedes usar objetos de Slimefun en un soporte para pociones!" miner: no-ores: "&ePerdón, ¡No encuentro ningún mineral cerca!" From 5585e502301488db051181e458e555e3f28347b2 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 07:47:05 +0000 Subject: [PATCH 15/65] Translate messages_es.yml via GitLocalize From b0c040ea7acef667f0fc9fd0f9b568892cd270e0 Mon Sep 17 00:00:00 2001 From: Vravinite Date: Thu, 6 Aug 2020 07:47:06 +0000 Subject: [PATCH 16/65] Translate recipes_es.yml via GitLocalize --- src/main/resources/languages/recipes_es.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/resources/languages/recipes_es.yml b/src/main/resources/languages/recipes_es.yml index 8dcb8c432..0bd28656d 100644 --- a/src/main/resources/languages/recipes_es.yml +++ b/src/main/resources/languages/recipes_es.yml @@ -118,6 +118,11 @@ slimefun: lore: - Haz este objeto tal como se muestra - usando una Refinery + barter_drop: + name: Piglin Bartering Drop + lore: + - Troca con Piglins usando + - Lingotes de Oro para obtener este objeto minecraft: shaped: name: Receta de Crafteo con forma From 353aef44a2c69d878b1e2b7730224e7265b1b131 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 09:50:37 +0200 Subject: [PATCH 17/65] [CI skip] Updated workflow file --- .github/workflows/yaml-linter.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/yaml-linter.yml b/.github/workflows/yaml-linter.yml index ca7054f6a..445e5afe2 100644 --- a/.github/workflows/yaml-linter.yml +++ b/.github/workflows/yaml-linter.yml @@ -11,8 +11,9 @@ on: - '**.yml' jobs: - build: + linter: + name: YAML Linter runs-on: ubuntu-latest steps: From 344596b10fa78b02d5203aa1a95fe8829bd68817 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 09:51:15 +0200 Subject: [PATCH 18/65] [CI skip] Updated workflow file --- .github/workflows/close-invalid-issues.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/close-invalid-issues.yml b/.github/workflows/close-invalid-issues.yml index 54b3bb834..bcfa7120d 100644 --- a/.github/workflows/close-invalid-issues.yml +++ b/.github/workflows/close-invalid-issues.yml @@ -6,7 +6,10 @@ on: jobs: comment: + + name: Invalid Issues runs-on: ubuntu-latest + if: contains(github.event.issue.labels.*.name, 'Bug Report') == false steps: - name: Close Issue From 5093cac924fbbab2687c29cedb66f75d945ad432 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 09:51:46 +0200 Subject: [PATCH 19/65] [CI skip] Updated workflow file --- .github/workflows/maven-compiler.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven-compiler.yml b/.github/workflows/maven-compiler.yml index 0aa9a2e80..1e041876b 100644 --- a/.github/workflows/maven-compiler.yml +++ b/.github/workflows/maven-compiler.yml @@ -17,6 +17,7 @@ on: jobs: build: + name: Maven build runs-on: ubuntu-latest steps: From faad86b750445a74b96b2bac5095acea89d1ebab Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 09:52:31 +0200 Subject: [PATCH 20/65] [CI skip] Updated workflow file --- .github/workflows/duplicates.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/duplicates.yml b/.github/workflows/duplicates.yml index 3cdafa89a..c1b481ced 100644 --- a/.github/workflows/duplicates.yml +++ b/.github/workflows/duplicates.yml @@ -6,7 +6,10 @@ on: jobs: comment: + + name: Mark Issue as duplicate runs-on: ubuntu-latest + if: contains(github.event.comment.body, 'Duplicate of ') steps: - name: Add label to the Issue From 3fb6b57c3c122b894cfadaeab3c4e55bf044c869 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 09:52:59 +0200 Subject: [PATCH 21/65] [CI skip] Updated workflow file --- .github/workflows/discord-webhook.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/discord-webhook.yml b/.github/workflows/discord-webhook.yml index b3e0783c8..c11ccaf3d 100644 --- a/.github/workflows/discord-webhook.yml +++ b/.github/workflows/discord-webhook.yml @@ -9,6 +9,7 @@ on: jobs: report: + name: Discord Webhook runs-on: ubuntu-latest if: github.repository == 'TheBusyBiscuit/Slimefun4' From d55a546c4260743f590aacc8c01e3a57f3b6fdae Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 16:24:41 +0200 Subject: [PATCH 22/65] Fixes #2168 --- CHANGELOG.md | 1 + .../implementation/SlimefunItems.java | 20 +-- .../items/cargo/AdvancedCargoOutputNode.java | 4 +- .../implementation/items/food/Juice.java | 78 +++++++++- .../SlimefunItemConsumeListener.java | 57 ++------ .../setup/SlimefunItemSetup.java | 133 +++++++++--------- 6 files changed, 162 insertions(+), 131 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df82aa2e4..be7801f58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ * Fixed #2181 * Fixed #2180 * Fixed #2122 +* Fixed #2168 ## Release Candidate 15 (01 Aug 2020) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java index fcf7b7034..4953a736f 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java @@ -144,11 +144,11 @@ public final class SlimefunItems { public static final SlimefunItemStack DIET_COOKIE = new SlimefunItemStack("DIET_COOKIE", Material.COOKIE, "&6Diet Cookie", "", "&aA very &olightweight &f&acookie."); public static final SlimefunItemStack MAGIC_SUGAR = new SlimefunItemStack("MAGIC_SUGAR", Material.SUGAR, "&6Magic Sugar", "", "&a&oFeel the Power of Hermes!"); public static final SlimefunItemStack MONSTER_JERKY = new SlimefunItemStack("MONSTER_JERKY", Material.ROTTEN_FLESH, "&6Monster Jerky", "", "&a&oNo longer hungry"); - public static final SlimefunItemStack APPLE_JUICE = new SlimefunItemStack("APPLE_JUICE", Color.RED, new PotionEffect(PotionEffectType.SATURATION, 6, 0), "&cApple Juice", "", LoreBuilder.hunger(3)); - public static final SlimefunItemStack MELON_JUICE = new SlimefunItemStack("MELON_JUICE", Color.RED, new PotionEffect(PotionEffectType.SATURATION, 6, 0), "&cMelon Juice", "", LoreBuilder.hunger(3)); - public static final SlimefunItemStack CARROT_JUICE = new SlimefunItemStack("CARROT_JUICE", Color.ORANGE, new PotionEffect(PotionEffectType.SATURATION, 6, 0), "&6Carrot Juice", "", LoreBuilder.hunger(3)); - public static final SlimefunItemStack PUMPKIN_JUICE = new SlimefunItemStack("PUMPKIN_JUICE", Color.ORANGE, new PotionEffect(PotionEffectType.SATURATION, 6, 0), "&6Pumpkin Juice", "", LoreBuilder.hunger(3)); - public static final SlimefunItemStack SWEET_BERRY_JUICE = new SlimefunItemStack("SWEET_BERRY_JUICE", Color.RED, new PotionEffect(PotionEffectType.SATURATION, 6, 0), "&cSweet Berry Juice", "", LoreBuilder.hunger(3)); + public static final SlimefunItemStack APPLE_JUICE = new SlimefunItemStack("APPLE_JUICE", Color.RED, new PotionEffect(PotionEffectType.SATURATION, 5, 0), "&cApple Juice", "", LoreBuilder.hunger(3)); + public static final SlimefunItemStack MELON_JUICE = new SlimefunItemStack("MELON_JUICE", Color.RED, new PotionEffect(PotionEffectType.SATURATION, 5, 0), "&cMelon Juice", "", LoreBuilder.hunger(3)); + public static final SlimefunItemStack CARROT_JUICE = new SlimefunItemStack("CARROT_JUICE", Color.ORANGE, new PotionEffect(PotionEffectType.SATURATION, 5, 0), "&6Carrot Juice", "", LoreBuilder.hunger(3)); + public static final SlimefunItemStack PUMPKIN_JUICE = new SlimefunItemStack("PUMPKIN_JUICE", Color.ORANGE, new PotionEffect(PotionEffectType.SATURATION, 5, 0), "&6Pumpkin Juice", "", LoreBuilder.hunger(3)); + public static final SlimefunItemStack SWEET_BERRY_JUICE = new SlimefunItemStack("SWEET_BERRY_JUICE", Color.RED, new PotionEffect(PotionEffectType.SATURATION, 5, 0), "&cSweet Berry Juice", "", LoreBuilder.hunger(3)); public static final SlimefunItemStack GOLDEN_APPLE_JUICE = new SlimefunItemStack("GOLDEN_APPLE_JUICE", Color.YELLOW, new PotionEffect(PotionEffectType.ABSORPTION, 20 * 20, 0), "&bGolden Apple Juice"); public static final SlimefunItemStack BEEF_JERKY = new SlimefunItemStack("BEEF_JERKY", Material.COOKED_BEEF, "&6Beef Jerky", "", "&fExtra saturating!"); @@ -161,14 +161,14 @@ public final class SlimefunItems { public static final SlimefunItemStack KELP_COOKIE = new SlimefunItemStack("KELP_COOKIE", Material.COOKIE, "&2Kelp Cookie"); /* Christmas */ - public static final SlimefunItemStack CHRISTMAS_MILK = new SlimefunItemStack("CHRISTMAS_MILK", Color.WHITE, new PotionEffect(PotionEffectType.SATURATION, 5, 0), "&6Glass of Milk", "", LoreBuilder.hunger(2.5)); - public static final SlimefunItemStack CHRISTMAS_CHOCOLATE_MILK = new SlimefunItemStack("CHRISTMAS_CHOCOLATE_MILK", Color.MAROON, new PotionEffect(PotionEffectType.SATURATION, 12, 0), "&6Chocolate Milk", "", LoreBuilder.hunger(6)); - public static final SlimefunItemStack CHRISTMAS_EGG_NOG = new SlimefunItemStack("CHRISTMAS_EGG_NOG", Color.GRAY, new PotionEffect(PotionEffectType.SATURATION, 7, 0), "&aEgg Nog", "", LoreBuilder.hunger(3.5)); - public static final SlimefunItemStack CHRISTMAS_APPLE_CIDER = new SlimefunItemStack("CHRISTMAS_APPLE_CIDER", Color.RED, new PotionEffect(PotionEffectType.SATURATION, 14, 0), "&cApple Cider", "", LoreBuilder.hunger(7)); + public static final SlimefunItemStack CHRISTMAS_MILK = new SlimefunItemStack("CHRISTMAS_MILK", Color.WHITE, new PotionEffect(PotionEffectType.SATURATION, 4, 0), "&6Glass of Milk", "", LoreBuilder.hunger(2.5)); + public static final SlimefunItemStack CHRISTMAS_CHOCOLATE_MILK = new SlimefunItemStack("CHRISTMAS_CHOCOLATE_MILK", Color.MAROON, new PotionEffect(PotionEffectType.SATURATION, 11, 0), "&6Chocolate Milk", "", LoreBuilder.hunger(6)); + public static final SlimefunItemStack CHRISTMAS_EGG_NOG = new SlimefunItemStack("CHRISTMAS_EGG_NOG", Color.GRAY, new PotionEffect(PotionEffectType.SATURATION, 6, 0), "&aEgg Nog", "", LoreBuilder.hunger(3.5)); + public static final SlimefunItemStack CHRISTMAS_APPLE_CIDER = new SlimefunItemStack("CHRISTMAS_APPLE_CIDER", Color.RED, new PotionEffect(PotionEffectType.SATURATION, 13, 0), "&cApple Cider", "", LoreBuilder.hunger(7)); public static final SlimefunItemStack CHRISTMAS_COOKIE = new SlimefunItemStack("CHRISTMAS_COOKIE", Material.COOKIE, ChatUtils.christmas("Christmas Cookie")); public static final SlimefunItemStack CHRISTMAS_FRUIT_CAKE = new SlimefunItemStack("CHRISTMAS_FRUIT_CAKE", Material.PUMPKIN_PIE, ChatUtils.christmas("Fruit Cake")); public static final SlimefunItemStack CHRISTMAS_APPLE_PIE = new SlimefunItemStack("CHRISTMAS_APPLE_PIE", Material.PUMPKIN_PIE, "&fApple Pie"); - public static final SlimefunItemStack CHRISTMAS_HOT_CHOCOLATE = new SlimefunItemStack("CHRISTMAS_HOT_CHOCOLATE", Color.MAROON, new PotionEffect(PotionEffectType.SATURATION, 14, 0), "&6Hot Chocolate", "", LoreBuilder.hunger(7)); + public static final SlimefunItemStack CHRISTMAS_HOT_CHOCOLATE = new SlimefunItemStack("CHRISTMAS_HOT_CHOCOLATE", Color.MAROON, new PotionEffect(PotionEffectType.SATURATION, 13, 0), "&6Hot Chocolate", "", LoreBuilder.hunger(7)); public static final SlimefunItemStack CHRISTMAS_CAKE = new SlimefunItemStack("CHRISTMAS_CAKE", Material.PUMPKIN_PIE, ChatUtils.christmas("Christmas Cake")); public static final SlimefunItemStack CHRISTMAS_CARAMEL = new SlimefunItemStack("CHRISTMAS_CARAMEL", Material.BRICK, "&6Caramel"); public static final SlimefunItemStack CHRISTMAS_CARAMEL_APPLE = new SlimefunItemStack("CHRISTMAS_CARAMEL_APPLE", Material.APPLE, "&6Caramel Apple"); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AdvancedCargoOutputNode.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AdvancedCargoOutputNode.java index a8f42c3bf..667ee068d 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AdvancedCargoOutputNode.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/cargo/AdvancedCargoOutputNode.java @@ -10,8 +10,8 @@ public class AdvancedCargoOutputNode extends AbstractFilterNode { private static final int[] BORDER = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 22, 23, 24, 26, 27, 31, 32, 33, 34, 35, 36, 40, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }; - public AdvancedCargoOutputNode(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput) { - super(category, item, recipeType, recipe, recipeOutput); + public AdvancedCargoOutputNode(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(category, item, recipeType, recipe, null); } @Override diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/food/Juice.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/food/Juice.java index f4076401b..15d2d1c78 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/food/Juice.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/food/Juice.java @@ -1,12 +1,25 @@ package io.github.thebusybiscuit.slimefun4.implementation.items.food; -import org.bukkit.inventory.ItemStack; +import java.util.ArrayList; +import java.util.List; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.PotionMeta; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import io.github.thebusybiscuit.slimefun4.core.handlers.ItemConsumptionHandler; +import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; import io.github.thebusybiscuit.slimefun4.implementation.items.backpacks.Cooler; import io.github.thebusybiscuit.slimefun4.implementation.listeners.CoolerListener; +import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; +import me.mrCookieSlime.Slimefun.api.Slimefun; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; /** @@ -19,10 +32,69 @@ import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; * @see CoolerListener * */ -public class Juice extends SlimefunItem { +public class Juice extends SimpleSlimefunItem { + + private final List effects; public Juice(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { - super(category, item, recipeType, recipe); + this(category, item, recipeType, recipe, null); + } + + public Juice(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, ItemStack recipeOutput) { + super(category, item, recipeType, recipe, recipeOutput); + + ItemMeta meta = item.getItemMeta(); + + if (meta instanceof PotionMeta) { + effects = ((PotionMeta) meta).getCustomEffects(); + } + else { + effects = new ArrayList<>(); + } + } + + @Override + public ItemConsumptionHandler getItemHandler() { + return (e, p, item) -> { + // Fix for Saturation on potions is no longer working, + // Minecraft has been broken when it comes to Saturation potions for a long time + + for (PotionEffect effect : effects) { + if (effect.getType().equals(PotionEffectType.SATURATION)) { + p.addPotionEffect(effect); + break; + } + } + + removeGlassBottle(p, item); + }; + } + + /** + * Determines from which hand the juice is being drunk, and its amount + * + * @param p + * The {@link Player} that triggered this + * @param item + * The {@link ItemStack} in question + */ + private void removeGlassBottle(Player p, ItemStack item) { + if (SlimefunUtils.isItemSimilar(item, p.getInventory().getItemInMainHand(), true)) { + if (p.getInventory().getItemInMainHand().getAmount() == 1) { + Slimefun.runSync(() -> p.getEquipment().getItemInMainHand().setAmount(0)); + } + else { + Slimefun.runSync(() -> p.getInventory().removeItem(new ItemStack(Material.GLASS_BOTTLE, 1))); + } + } + else if (SlimefunUtils.isItemSimilar(item, p.getInventory().getItemInOffHand(), true)) { + if (p.getInventory().getItemInOffHand().getAmount() == 1) { + Slimefun.runSync(() -> p.getEquipment().getItemInOffHand().setAmount(0)); + } + else { + Slimefun.runSync(() -> p.getInventory().removeItem(new ItemStack(Material.GLASS_BOTTLE, 1))); + } + } } } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunItemConsumeListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunItemConsumeListener.java index 6fc3c8374..e56acdcfb 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunItemConsumeListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunItemConsumeListener.java @@ -1,22 +1,23 @@ package io.github.thebusybiscuit.slimefun4.implementation.listeners; -import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerItemConsumeEvent; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.PotionMeta; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; import io.github.thebusybiscuit.slimefun4.core.handlers.ItemConsumptionHandler; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; -import io.github.thebusybiscuit.slimefun4.implementation.items.food.Juice; -import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import me.mrCookieSlime.Slimefun.api.Slimefun; +/** + * This {@link Listener} is responsible for handling the {@link ItemConsumptionHandler} + * for any {@link SlimefunItem}. + * + * @author TheBusyBiscuit + * + */ public class SlimefunItemConsumeListener implements Listener { public SlimefunItemConsumeListener(SlimefunPlugin plugin) { @@ -31,53 +32,11 @@ public class SlimefunItemConsumeListener implements Listener { if (sfItem != null) { if (Slimefun.hasUnlocked(p, sfItem, true)) { - if (sfItem instanceof Juice) { - // Fix for Saturation on potions is no longer working - - for (PotionEffect effect : ((PotionMeta) item.getItemMeta()).getCustomEffects()) { - if (effect.getType().equals(PotionEffectType.SATURATION)) { - p.addPotionEffect(new PotionEffect(PotionEffectType.SATURATION, effect.getDuration(), effect.getAmplifier())); - break; - } - } - - removeGlassBottle(p, item); - } - else { - sfItem.callItemHandler(ItemConsumptionHandler.class, handler -> handler.onConsume(e, p, item)); - } + sfItem.callItemHandler(ItemConsumptionHandler.class, handler -> handler.onConsume(e, p, item)); } else { e.setCancelled(true); } } } - - /** - * Determines from which hand the juice is being drunk, and its amount - * - * @param p - * The {@link Player} that triggered this - * @param item - * The {@link ItemStack} in question - */ - private void removeGlassBottle(Player p, ItemStack item) { - if (SlimefunUtils.isItemSimilar(item, p.getInventory().getItemInMainHand(), true)) { - if (p.getInventory().getItemInMainHand().getAmount() == 1) { - Slimefun.runSync(() -> p.getEquipment().getItemInMainHand().setAmount(0)); - } - else { - Slimefun.runSync(() -> p.getInventory().removeItem(new ItemStack(Material.GLASS_BOTTLE, 1))); - } - } - else if (SlimefunUtils.isItemSimilar(item, p.getInventory().getItemInOffHand(), true)) { - if (p.getInventory().getItemInOffHand().getAmount() == 1) { - Slimefun.runSync(() -> p.getEquipment().getItemInOffHand().setAmount(0)); - } - else { - Slimefun.runSync(() -> p.getInventory().removeItem(new ItemStack(Material.GLASS_BOTTLE, 1))); - } - } - } - } 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 89fb366f7..a2c10280b 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 @@ -283,7 +283,7 @@ public final class SlimefunItemSetup { new SlimefunItem(categories.food, SlimefunItems.KELP_COOKIE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, new ItemStack(Material.DRIED_KELP), null, new ItemStack(Material.DRIED_KELP), new ItemStack(Material.SUGAR), new ItemStack(Material.DRIED_KELP), null, new ItemStack(Material.DRIED_KELP), null}, - new CustomItem(SlimefunItems.KELP_COOKIE, 2)) + new SlimefunItemStack(SlimefunItems.KELP_COOKIE, 2)) .register(plugin); new GrindStone(categories.basicMachines, SlimefunItems.GRIND_STONE).register(plugin); @@ -296,7 +296,7 @@ public final class SlimefunItemSetup { new SlimefunItem(categories.magicalResources, SlimefunItems.MAGIC_LUMP_1, RecipeType.GRIND_STONE, new ItemStack[] {new ItemStack(Material.NETHER_WART), null, null, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.MAGIC_LUMP_1, 2)) + new SlimefunItemStack(SlimefunItems.MAGIC_LUMP_1, 2)) .register(plugin); new SlimefunItem(categories.magicalResources, SlimefunItems.MAGIC_LUMP_2, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -309,7 +309,7 @@ public final class SlimefunItemSetup { new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_LUMP_1, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, null, null, null, new ItemStack(Material.ENDER_EYE), null, null, null, null}, - new CustomItem(SlimefunItems.ENDER_LUMP_1, 2)) + new SlimefunItemStack(SlimefunItems.ENDER_LUMP_1, 2)) .register(plugin); new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_LUMP_2, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -509,12 +509,12 @@ public final class SlimefunItemSetup { new SlimefunItem(categories.resources, SlimefunItems.IRON_DUST, RecipeType.ORE_CRUSHER, new ItemStack[] {new ItemStack(Material.IRON_ORE), null, null, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.IRON_DUST, oreCrusher.isOreDoublingEnabled() ? 2 : 1)) + new SlimefunItemStack(SlimefunItems.IRON_DUST, oreCrusher.isOreDoublingEnabled() ? 2 : 1)) .register(plugin); new SlimefunItem(categories.resources, SlimefunItems.GOLD_DUST, RecipeType.ORE_CRUSHER, new ItemStack[] {new ItemStack(Material.GOLD_ORE), null, null, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.GOLD_DUST, oreCrusher.isOreDoublingEnabled() ? 2 : 1)) + new SlimefunItemStack(SlimefunItems.GOLD_DUST, oreCrusher.isOreDoublingEnabled() ? 2 : 1)) .register(plugin); new SlimefunItem(categories.resources, SlimefunItems.COPPER_DUST, RecipeType.ORE_WASHER, @@ -586,11 +586,11 @@ public final class SlimefunItemSetup { .register(plugin); new SlimefunItem(categories.misc, SlimefunItems.STEEL_PLATE, RecipeType.COMPRESSOR, - new ItemStack[] {new CustomItem(SlimefunItems.STEEL_INGOT, 8), null, null, null, null, null, null, null, null}) + new ItemStack[] {new SlimefunItemStack(SlimefunItems.STEEL_INGOT, 8), null, null, null, null, null, null, null, null}) .register(plugin); new UnplaceableBlock(categories.resources, SlimefunItems.COMPRESSED_CARBON, RecipeType.COMPRESSOR, - new ItemStack[] {new CustomItem(SlimefunItems.CARBON, 4), null, null, null, null, null, null, null, null}) + new ItemStack[] {new SlimefunItemStack(SlimefunItems.CARBON, 4), null, null, null, null, null, null, null, null}) .register(plugin); new UnplaceableBlock(categories.resources, SlimefunItems.CARBON_CHUNK, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -646,12 +646,12 @@ public final class SlimefunItemSetup { new HologramProjector(categories.technicalGadgets, SlimefunItems.HOLOGRAM_PROJECTOR, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, SlimefunItems.POWER_CRYSTAL, null, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_BRASS_INGOT, null, SlimefunItems.ALUMINUM_BRASS_INGOT, null}, - new CustomItem(SlimefunItems.HOLOGRAM_PROJECTOR, 3)) + new SlimefunItemStack(SlimefunItems.HOLOGRAM_PROJECTOR, 3)) .register(plugin); new SlimefunItem(categories.misc, SlimefunItems.CHAIN, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null, null}, - new CustomItem(SlimefunItems.CHAIN, 8)) + new SlimefunItemStack(SlimefunItems.CHAIN, 8)) .register(plugin); new SlimefunItem(categories.misc, SlimefunItems.HOOK, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -797,7 +797,7 @@ public final class SlimefunItemSetup { new MagicalZombiePills(categories.magicalGadgets, SlimefunItems.MAGICAL_ZOMBIE_PILLS, RecipeType.MAGIC_WORKBENCH, new ItemStack[] {new ItemStack(Material.GOLD_INGOT), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GOLD_INGOT), new ItemStack(Material.APPLE), weaknessPotion, new ItemStack(Material.APPLE), new ItemStack(Material.GOLD_INGOT), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GOLD_INGOT)}, - new CustomItem(SlimefunItems.MAGICAL_ZOMBIE_PILLS, 2)) + new SlimefunItemStack(SlimefunItems.MAGICAL_ZOMBIE_PILLS, 2)) .register(plugin); } @@ -896,7 +896,7 @@ public final class SlimefunItemSetup { new SlimefunItem(categories.misc, SlimefunItems.HEAVY_CREAM, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.MILK_BUCKET), null, null, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.HEAVY_CREAM, 2)) + new SlimefunItemStack(SlimefunItems.HEAVY_CREAM, 2)) .register(plugin); new SlimefunItem(categories.misc, SlimefunItems.CHEESE, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -967,7 +967,7 @@ public final class SlimefunItemSetup { new SlimefunItem(categories.misc, SlimefunItems.CLOTH, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.WHITE_WOOL), null, null, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.CLOTH, 8)) + new SlimefunItemStack(SlimefunItems.CLOTH, 8)) .register(plugin); new Bandage(categories.usefulItems, SlimefunItems.RAG, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -982,12 +982,12 @@ public final class SlimefunItemSetup { new Splint(categories.usefulItems, SlimefunItems.SPLINT, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.STICK), new ItemStack(Material.STICK), new ItemStack(Material.STICK), null, new ItemStack(Material.IRON_INGOT), null}, - new CustomItem(SlimefunItems.SPLINT, 4)) + new SlimefunItemStack(SlimefunItems.SPLINT, 4)) .register(plugin); new SlimefunItem(categories.misc, SlimefunItems.TIN_CAN, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, null, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT}, - new CustomItem(SlimefunItems.TIN_CAN, 8)) + new SlimefunItemStack(SlimefunItems.TIN_CAN, 8)) .register(plugin); new Vitamins(categories.usefulItems, SlimefunItems.VITAMINS, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -1318,7 +1318,7 @@ public final class SlimefunItemSetup { new SlimefunItem(categories.technicalComponents, SlimefunItems.COPPER_WIRE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, null, null, SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_INGOT, null, null, null}, - new CustomItem(SlimefunItems.COPPER_WIRE, 8)) + new SlimefunItemStack(SlimefunItems.COPPER_WIRE, 8)) .register(plugin); new BlockPlacer(categories.basicMachines, SlimefunItems.BLOCK_PLACER, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -1343,104 +1343,104 @@ public final class SlimefunItemSetup { new KnowledgeFlask(categories.magicalGadgets, SlimefunItems.FLASK_OF_KNOWLEDGE, RecipeType.MAGIC_WORKBENCH, new ItemStack[] {null, null, null, SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GLASS_PANE), SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.MAGIC_LUMP_2, null}, - new CustomItem(SlimefunItems.FLASK_OF_KNOWLEDGE, 8)) + new SlimefunItemStack(SlimefunItems.FLASK_OF_KNOWLEDGE, 8)) .register(plugin); new BirthdayCake(categories.birthday, new SlimefunItemStack("BIRTHDAY_CAKE", Material.CAKE, "&bBirthday Cake"), RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, new ItemStack(Material.TORCH), null, new ItemStack(Material.SUGAR), new ItemStack(Material.CAKE), new ItemStack(Material.SUGAR), null, null, null}) .register(plugin); - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_MILK, RecipeType.ENHANCED_CRAFTING_TABLE, + new Juice(categories.christmas, SlimefunItems.CHRISTMAS_MILK, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.MILK_BUCKET), new ItemStack(Material.GLASS_BOTTLE), null, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.CHRISTMAS_MILK, 4)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_MILK, 4)) .register(plugin); - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, RecipeType.ENHANCED_CRAFTING_TABLE, + new Juice(categories.christmas, SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.CHRISTMAS_MILK, new ItemStack(Material.COCOA_BEANS), null, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, 2)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, 2)) .register(plugin); - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_EGG_NOG, RecipeType.ENHANCED_CRAFTING_TABLE, + new Juice(categories.christmas, SlimefunItems.CHRISTMAS_EGG_NOG, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.CHRISTMAS_MILK, new ItemStack(Material.EGG), null, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.CHRISTMAS_EGG_NOG, 2)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_EGG_NOG, 2)) .register(plugin); - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_APPLE_CIDER, RecipeType.ENHANCED_CRAFTING_TABLE, + new Juice(categories.christmas, SlimefunItems.CHRISTMAS_APPLE_CIDER, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.APPLE_JUICE, new ItemStack(Material.SUGAR), null, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.CHRISTMAS_APPLE_CIDER, 2)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_CIDER, 2)) .register(plugin); new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_COOKIE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.COOKIE), new ItemStack(Material.SUGAR), new ItemStack(Material.LIME_DYE), null, null, null, null, null, null}, - new CustomItem(SlimefunItems.CHRISTMAS_COOKIE, 16)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_COOKIE, 16)) .register(plugin); new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_FRUIT_CAKE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.EGG), new ItemStack(Material.APPLE), new ItemStack(Material.MELON), new ItemStack(Material.SUGAR), null, null, null, null, null}, - new CustomItem(SlimefunItems.CHRISTMAS_FRUIT_CAKE, 4)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_FRUIT_CAKE, 4)) .register(plugin); new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_APPLE_PIE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.APPLE), new ItemStack(Material.EGG), null, null, null, null, null, null}, - new CustomItem(SlimefunItems.CHRISTMAS_APPLE_PIE, 2)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_PIE, 2)) .register(plugin); - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_HOT_CHOCOLATE, RecipeType.SMELTERY, + new Juice(categories.christmas, SlimefunItems.CHRISTMAS_HOT_CHOCOLATE, RecipeType.SMELTERY, new ItemStack[] {SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, null, null, null, null, null, null, null, null}, SlimefunItems.CHRISTMAS_HOT_CHOCOLATE) .register(plugin); new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CAKE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.EGG), new ItemStack(Material.SUGAR), SlimefunItems.WHEAT_FLOUR, new ItemStack(Material.MILK_BUCKET), null, null, null, null, null}, - new CustomItem(SlimefunItems.CHRISTMAS_CAKE, 4)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CAKE, 4)) .register(plugin); new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CARAMEL, RecipeType.SMELTERY, new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.SUGAR), null, null, null, null, null, null, null}, - new CustomItem(SlimefunItems.CHRISTMAS_CARAMEL, 4)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CARAMEL, 4)) .register(plugin); new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CARAMEL_APPLE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, SlimefunItems.CHRISTMAS_CARAMEL, null, null, new ItemStack(Material.APPLE), null, null, new ItemStack(Material.STICK), null}, - new CustomItem(SlimefunItems.CHRISTMAS_CARAMEL_APPLE, 2)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CARAMEL_APPLE, 2)) .register(plugin); new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, new ItemStack(Material.COCOA_BEANS), null, null, new ItemStack(Material.APPLE), null, null, new ItemStack(Material.STICK), null}, - new CustomItem(SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, 2)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, 2)) .register(plugin); new ChristmasPresent(categories.christmas, SlimefunItems.CHRISTMAS_PRESENT, RecipeType.MAGIC_WORKBENCH, new ItemStack[] {null, new ItemStack(Material.NAME_TAG), null, new ItemStack(Material.RED_WOOL), new ItemStack(Material.GREEN_WOOL), new ItemStack(Material.RED_WOOL), new ItemStack(Material.RED_WOOL), new ItemStack(Material.GREEN_WOOL), new ItemStack(Material.RED_WOOL)}, - new CustomItem(SlimefunItems.CHRISTMAS_HOT_CHOCOLATE, 1), - new CustomItem(SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, 4), - new CustomItem(SlimefunItems.CHRISTMAS_CARAMEL_APPLE, 4), - new CustomItem(SlimefunItems.CHRISTMAS_CAKE, 4), - new CustomItem(SlimefunItems.CHRISTMAS_COOKIE, 8), - new CustomItem(SlimefunItems.CHRISTMAS_PRESENT, 1), - new CustomItem(SlimefunItems.CHRISTMAS_EGG_NOG, 1), - new CustomItem(SlimefunItems.CHRISTMAS_MILK, 1), - new CustomItem(SlimefunItems.CHRISTMAS_APPLE_CIDER, 1), - new CustomItem(SlimefunItems.CHRISTMAS_FRUIT_CAKE, 4), - new CustomItem(SlimefunItems.CHRISTMAS_APPLE_PIE, 4), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_HOT_CHOCOLATE, 1), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, 4), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CARAMEL_APPLE, 4), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CAKE, 4), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_COOKIE, 8), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_PRESENT, 1), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_EGG_NOG, 1), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_MILK, 1), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_CIDER, 1), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_FRUIT_CAKE, 4), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_PIE, 4), new ItemStack(Material.EMERALD) ).register(plugin); new SlimefunItem(categories.easter, SlimefunItems.EASTER_CARROT_PIE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.CARROT), new ItemStack(Material.EGG), null, null, null, null, null, null}, - new CustomItem(SlimefunItems.EASTER_CARROT_PIE, 2)) + new SlimefunItemStack(SlimefunItems.EASTER_CARROT_PIE, 2)) .register(plugin); new SlimefunItem(categories.easter, SlimefunItems.EASTER_APPLE_PIE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.APPLE), new ItemStack(Material.EGG), null, null, null, null, null, null}, - new CustomItem(SlimefunItems.CHRISTMAS_APPLE_PIE, 2)) + new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_PIE, 2)) .register(plugin); new EasterEgg(categories.easter, SlimefunItems.EASTER_EGG, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, null, null, new ItemStack(Material.LIME_DYE), new ItemStack(Material.EGG), new ItemStack(Material.PURPLE_DYE), null, null, null}, - new CustomItem(SlimefunItems.EASTER_EGG, 2), + new SlimefunItemStack(SlimefunItems.EASTER_EGG, 2), // Gifts: - new CustomItem(SlimefunItems.EASTER_CARROT_PIE, 4), - new CustomItem(SlimefunItems.CARROT_JUICE, 1), + new SlimefunItemStack(SlimefunItems.EASTER_CARROT_PIE, 4), + new SlimefunItemStack(SlimefunItems.CARROT_JUICE, 1), new ItemStack(Material.EMERALD), new ItemStack(Material.CAKE), new ItemStack(Material.RABBIT_FOOT), @@ -1448,12 +1448,12 @@ public final class SlimefunItemSetup { ).register(plugin); new SlimefunItem(categories.misc, SlimefunItems.REINFORCED_PLATE, RecipeType.COMPRESSOR, - new ItemStack[] {new CustomItem(SlimefunItems.REINFORCED_ALLOY_INGOT, 8), null, null, null, null, null, null, null, null}) + new ItemStack[] {new SlimefunItemStack(SlimefunItems.REINFORCED_ALLOY_INGOT, 8), null, null, null, null, null, null, null, null}) .register(plugin); new HardenedGlass(categories.technicalComponents, SlimefunItems.HARDENED_GLASS, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), SlimefunItems.REINFORCED_PLATE, new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS)}, - new CustomItem(SlimefunItems.HARDENED_GLASS, 16)) + new SlimefunItemStack(SlimefunItems.HARDENED_GLASS, 16)) .register(plugin); new SlimefunItem(categories.technicalComponents, SlimefunItems.COOLING_UNIT, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -1466,12 +1466,12 @@ public final class SlimefunItemSetup { new WitherProofBlock(categories.technicalComponents, SlimefunItems.WITHER_PROOF_OBSIDIAN, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.LEAD_INGOT, new ItemStack(Material.OBSIDIAN), SlimefunItems.LEAD_INGOT, new ItemStack(Material.OBSIDIAN), SlimefunItems.HARDENED_GLASS, new ItemStack(Material.OBSIDIAN), SlimefunItems.LEAD_INGOT, new ItemStack(Material.OBSIDIAN), SlimefunItems.LEAD_INGOT}, - new CustomItem(SlimefunItems.WITHER_PROOF_OBSIDIAN, 4)) + new SlimefunItemStack(SlimefunItems.WITHER_PROOF_OBSIDIAN, 4)) .register(plugin); new AncientPedestal(categories.magicalResources, SlimefunItems.ANCIENT_PEDESTAL, RecipeType.MAGIC_WORKBENCH, new ItemStack[] {new ItemStack(Material.OBSIDIAN), SlimefunItems.GOLD_8K, new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.STONE), null, new ItemStack(Material.OBSIDIAN), SlimefunItems.GOLD_8K, new ItemStack(Material.OBSIDIAN)}, - new CustomItem(SlimefunItems.ANCIENT_PEDESTAL, 4)) + new SlimefunItemStack(SlimefunItems.ANCIENT_PEDESTAL, 4)) .register(plugin); new AncientAltar(categories.magicalGadgets, 8, SlimefunItems.ANCIENT_ALTAR, RecipeType.MAGIC_WORKBENCH, @@ -1484,7 +1484,7 @@ public final class SlimefunItemSetup { new SlimefunItem(categories.misc, SlimefunItems.DUCT_TAPE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.ALUMINUM_DUST, SlimefunItems.ALUMINUM_DUST, SlimefunItems.ALUMINUM_DUST, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.PAPER), new ItemStack(Material.PAPER), new ItemStack(Material.PAPER)}, - new CustomItem(SlimefunItems.DUCT_TAPE, 2)) + new SlimefunItemStack(SlimefunItems.DUCT_TAPE, 2)) .register(plugin); new Capacitor(categories.electricity, 128, SlimefunItems.SMALL_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -2411,32 +2411,32 @@ public final class SlimefunItemSetup { new SlimefunItem(categories.magicalResources, SlimefunItems.AIR_RUNE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.FEATHER), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.FEATHER), new ItemStack(Material.GHAST_TEAR), SlimefunItems.BLANK_RUNE, new ItemStack(Material.GHAST_TEAR), new ItemStack(Material.FEATHER), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.FEATHER)}, - new CustomItem(SlimefunItems.AIR_RUNE, 4)) + new SlimefunItemStack(SlimefunItems.AIR_RUNE, 4)) .register(plugin); new SlimefunItem(categories.magicalResources, SlimefunItems.EARTH_RUNE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.DIRT), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.STONE), new ItemStack(Material.OBSIDIAN), SlimefunItems.BLANK_RUNE, new ItemStack(Material.OBSIDIAN), new ItemStack(Material.STONE), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.DIRT)}, - new CustomItem(SlimefunItems.EARTH_RUNE, 4)) + new SlimefunItemStack(SlimefunItems.EARTH_RUNE, 4)) .register(plugin); new SlimefunItem(categories.magicalResources, SlimefunItems.FIRE_RUNE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.FIRE_CHARGE), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.FIRE_CHARGE), new ItemStack(Material.BLAZE_POWDER), SlimefunItems.EARTH_RUNE, new ItemStack(Material.FLINT_AND_STEEL), new ItemStack(Material.FIRE_CHARGE), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.FIRE_CHARGE)}, - new CustomItem(SlimefunItems.FIRE_RUNE, 4)) + new SlimefunItemStack(SlimefunItems.FIRE_RUNE, 4)) .register(plugin); new SlimefunItem(categories.magicalResources, SlimefunItems.WATER_RUNE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.SALMON), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.WATER_BUCKET), new ItemStack(Material.SAND), SlimefunItems.BLANK_RUNE, new ItemStack(Material.SAND), new ItemStack(Material.WATER_BUCKET), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.COD)}, - new CustomItem(SlimefunItems.WATER_RUNE, 4)) + new SlimefunItemStack(SlimefunItems.WATER_RUNE, 4)) .register(plugin); new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_RUNE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.ENDER_PEARL), new ItemStack(Material.ENDER_EYE), SlimefunItems.BLANK_RUNE, new ItemStack(Material.ENDER_EYE), new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.ENDER_PEARL)}, - new CustomItem(SlimefunItems.ENDER_RUNE, 6)) + new SlimefunItemStack(SlimefunItems.ENDER_RUNE, 6)) .register(plugin); new SlimefunItem(categories.magicalResources, SlimefunItems.LIGHTNING_RUNE, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(Material.IRON_INGOT), SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.IRON_INGOT), SlimefunItems.AIR_RUNE, new ItemStack(Material.PHANTOM_MEMBRANE), SlimefunItems.WATER_RUNE, new ItemStack(Material.IRON_INGOT), SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.IRON_INGOT)}, - new CustomItem(SlimefunItems.LIGHTNING_RUNE, 4)) + new SlimefunItemStack(SlimefunItems.LIGHTNING_RUNE, 4)) .register(plugin); new SlimefunItem(categories.magicalResources, SlimefunItems.RAINBOW_RUNE, RecipeType.ANCIENT_ALTAR, @@ -2530,7 +2530,7 @@ public final class SlimefunItemSetup { new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_CONCRETE_XMAS, RecipeType.ANCIENT_ALTAR, new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new CustomItem(SlimefunItems.RAINBOW_CONCRETE_XMAS, 2), new RainbowTickHandler(Material.RED_CONCRETE, Material.GREEN_CONCRETE)) + new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE_XMAS, 2), new RainbowTickHandler(Material.RED_CONCRETE, Material.GREEN_CONCRETE)) .register(plugin); new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_XMAS, RecipeType.ANCIENT_ALTAR, @@ -2734,7 +2734,7 @@ public final class SlimefunItemSetup { new TeleporterPylon(categories.gps, SlimefunItems.GPS_TELEPORTER_PYLON, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.ZINC_INGOT, new ItemStack(Material.GLASS), SlimefunItems.ZINC_INGOT, new ItemStack(Material.GLASS), SlimefunItems.HEATING_COIL, new ItemStack(Material.GLASS), SlimefunItems.ZINC_INGOT, new ItemStack(Material.GLASS), SlimefunItems.ZINC_INGOT}, - new CustomItem(SlimefunItems.GPS_TELEPORTER_PYLON, 8)) + new SlimefunItemStack(SlimefunItems.GPS_TELEPORTER_PYLON, 8)) .register(plugin); new Teleporter(categories.gps, SlimefunItems.GPS_TELEPORTATION_MATRIX, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -3056,7 +3056,7 @@ public final class SlimefunItemSetup { new SlimefunItem(categories.cargo, SlimefunItems.CARGO_MOTOR, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.HARDENED_GLASS, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.HARDENED_GLASS, SlimefunItems.SILVER_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.SILVER_INGOT, SlimefunItems.HARDENED_GLASS, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.HARDENED_GLASS}, - new CustomItem(SlimefunItems.CARGO_MOTOR, 4)) + new SlimefunItemStack(SlimefunItems.CARGO_MOTOR, 4)) .register(plugin); new CargoManager(categories.cargo, SlimefunItems.CARGO_MANAGER, RecipeType.ENHANCED_CRAFTING_TABLE, @@ -3065,22 +3065,21 @@ public final class SlimefunItemSetup { new CargoConnectorNode(categories.cargo, SlimefunItems.CARGO_CONNECTOR_NODE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.BRONZE_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.BRONZE_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.CARGO_MOTOR, SlimefunItems.SILVER_INGOT, SlimefunItems.BRONZE_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.BRONZE_INGOT}, - new CustomItem(SlimefunItems.CARGO_CONNECTOR_NODE, 4)) + new SlimefunItemStack(SlimefunItems.CARGO_CONNECTOR_NODE, 4)) .register(plugin); new CargoInputNode(categories.cargo, SlimefunItems.CARGO_INPUT_NODE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, new ItemStack(Material.HOPPER), null, SlimefunItems.BILLON_INGOT, SlimefunItems.CARGO_CONNECTOR_NODE, SlimefunItems.BILLON_INGOT, null, new ItemStack(Material.HOPPER), null}, - new CustomItem(SlimefunItems.CARGO_INPUT_NODE, 2)) + new SlimefunItemStack(SlimefunItems.CARGO_INPUT_NODE, 2)) .register(plugin); new CargoOutputNode(categories.cargo, SlimefunItems.CARGO_OUTPUT_NODE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, new ItemStack(Material.HOPPER), null, SlimefunItems.BRASS_INGOT, SlimefunItems.CARGO_CONNECTOR_NODE, SlimefunItems.BRASS_INGOT, null, new ItemStack(Material.HOPPER), null}, - new CustomItem(SlimefunItems.CARGO_OUTPUT_NODE, 2)) + new SlimefunItemStack(SlimefunItems.CARGO_OUTPUT_NODE, 2)) .register(plugin); new AdvancedCargoOutputNode(categories.cargo, SlimefunItems.CARGO_OUTPUT_NODE_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.CARGO_MOTOR, null, SlimefunItems.COBALT_INGOT, SlimefunItems.CARGO_OUTPUT_NODE, SlimefunItems.COBALT_INGOT, null, SlimefunItems.CARGO_MOTOR, null}, - new CustomItem(SlimefunItems.CARGO_OUTPUT_NODE_2)) + new ItemStack[] {null, SlimefunItems.CARGO_MOTOR, null, SlimefunItems.COBALT_INGOT, SlimefunItems.CARGO_OUTPUT_NODE, SlimefunItems.COBALT_INGOT, null, SlimefunItems.CARGO_MOTOR, null}) .register(plugin); new AutomatedCraftingChamber(categories.electricity, SlimefunItems.AUTOMATED_CRAFTING_CHAMBER, RecipeType.ENHANCED_CRAFTING_TABLE, From 090e58aff7464c36dd12623a48b81706d9d0c3fe Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 23:06:07 +0200 Subject: [PATCH 23/65] [CI skip] Added URL checker --- .github/workflows/url-checker.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/url-checker.yml diff --git a/.github/workflows/url-checker.yml b/.github/workflows/url-checker.yml new file mode 100644 index 000000000..42d412aaa --- /dev/null +++ b/.github/workflows/url-checker.yml @@ -0,0 +1,23 @@ +name: URL Validator + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + + name: URL Checker + runs-on: ubuntu-latest + + steps: + - name: URLs-checker + uses: SuperKogito/URLs-checker@0.2.1 + with: + git_path: https://github.com/TheBusyBiscuit/Slimefun4 + file_types: .md,.java,.yml + print_all: False From c350d5694fbe53a03e74debe8536b240f7f0d097 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 23:14:29 +0200 Subject: [PATCH 24/65] [CI skip] Updated CONTRIBUTING.md --- .github/CONTRIBUTING.md | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0a39c543a..75f383ea7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -17,13 +17,13 @@ Rules for all types of posts: Rules for posting an Issue on GitHub: 1. This Issue Section is ONLY for Slimefun-related Issues, Issues about other Plugins or Slimefun Addons should not be posted here. -2. Please consult our [Troubleshooting Guide](#troubleshooting-guide) before posting. +2. Please consult our [Troubleshooting Guide](https://github.com/TheBusyBiscuit/Slimefun4/wiki/How-to-report-bugs) before posting. 3. Check other Issues before posting to make sure you are not posting a duplicate. -4. Do not put any Tags inside your title like [IMPORTANT], [URGENT] or [SUGGESTION]. Try to be professional by making your title as short as possible, we will assign it the required labels if necessary. -5. Do not post your Issue more than once, this is considered spam and does not benefit our community in any way. Do not repost your Issue if it was closed either. +4. Please do not put any Tags inside your title like [IMPORTANT], [URGENT] or [SUGGESTION]. Try to be professional by making your title as short as possible, we will assign it the required labels if necessary. +5. Do not post your Issue more than once, this is considered spam and does not benefit our community in any way. Do not repost your Issue if it was closed either, just leave a comment stating that the issue has still persisted and give more context on it. 6. Give us all available information right away, it may be a bit of time-wasting for us to keep asking for more Info. And this includes any Information to reproduce your Issue step-by-step. 7. Check whether there are newer versions available than the ones you are using, it might be that your Issue has been fixed already. -8. All text logs must be posted via a link to http://pastebin.com or similiar websites. +8. All text logs must be posted via a link to https://pastebin.com or similiar websites, long logs are very hard to read and get weirdly formatted when you post them on here. Using a proper pasting site allows us to keep things clean and easy to read. Your Issue will be CLOSED WITHOUT WARNING if we think you violated these Rules. @@ -35,26 +35,3 @@ Guidelines for making a Pull Request on GitHub: 2. Try to make your values configurable in the config.yml / Items.yml or any additional file. This may not be necessary at every instance but it does give the end-users a way to customize their experience. 3. If your Pull Request is made in response to an Issue opened on GitHub, comment on that Issue and reference your Pull Request to show that you are proposing a fix for it. 4. Name your commits appropriately. Standards like "Add files via upload" or "Update Readme.md" are lame. Make sure that the commit message stands for it's changes. (e.g. "Fixed Furnaces duplicating Items") - -## Troubleshooting Guide - -### Step 1: Check whether you have installed Slimefun correctly -Slimefun requires [CS-CoreLib](http://dev.bukkit.org/bukkit-plugins/cs-corelib) to run. -If it has not been installed automatically for you, then please download & install it manually. - -### Step 2: Check whether you are running on the latest Versions -Both, [Slimefun](http://dev.bukkit.org/bukkit-plugins/slimefun/files) and [CS-CoreLib](http://dev.bukkit.org/bukkit-plugins/cs-corelib/files) are updated from time to time. -You should be sure that you run the latest Versions (at the time you post your Issue) of both Plugins. - -### Step 3: Does it have to do with Items called 'CS-CoreLib's Head'? -Well in that case, you have been the victim of corruption, unless you have an Error/Crash Report that we can work with, there is literally nothing we can do about it. -Corrupting Files/Data can happen from time to time and getting completely rid of it would require a ton of work and even then it is still not completely impossible to occur. - -### Step 4: Do you get an Error, do you have an Error Report? -Check your /plugins/Slimefun/error-reports/ directory and if it contains any Files, then please upload those to http://pastebin.com -and provide us with a link. - -When providing us Errors from your Server Log MAKE SURE THEY ARE ERRORS. -It has happened more often than you may think that people send us messages. -Try to read the suspected 'Error' before uploading it to http://pastebin.com -If it says "Please install CS-CoreLib", then you may want to rethink whether you want to ask us what it means... From a2c84941a595f8e1c5d2641bbe85d948ec4f875f Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 23:15:40 +0200 Subject: [PATCH 25/65] [CI skip] Fixed link in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e37c9a7be..32995cc88 100644 --- a/README.md +++ b/README.md @@ -192,5 +192,5 @@ This information includes (but is not limited to) * date of the last commit to this repository -Additionally the plugin connects to https://mojang.com/ to retrieve the Minecraft skins of our contributors (if possible).
+Additionally the plugin connects to https://www.minecraft.net/ to retrieve the Minecraft skins of our contributors (if possible).
Note that Slimefun is not associated with `Mojang Studios` or Minecraft. From 48bfc3710b957428d13638787fc6f1b269068c9d Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 6 Aug 2020 23:19:15 +0200 Subject: [PATCH 26/65] [CI skip] Updated link in README again --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32995cc88..94aabee21 100644 --- a/README.md +++ b/README.md @@ -192,5 +192,5 @@ This information includes (but is not limited to) * date of the last commit to this repository -Additionally the plugin connects to https://www.minecraft.net/ to retrieve the Minecraft skins of our contributors (if possible).
+Additionally the plugin connects to [textures.minecraft.net](https://www.minecraft.net/en-us) to retrieve the Minecraft skins of our contributors (if possible).
Note that Slimefun is not associated with `Mojang Studios` or Minecraft. From 9de72881ab8f91c3089764966c205003288afb6d Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Fri, 7 Aug 2020 00:31:09 +0200 Subject: [PATCH 27/65] [CI skip] Fixed some URLs --- .github/workflows/url-checker.yml | 3 ++- .../slimefun4/core/services/MetricsService.java | 10 ++++++---- .../core/services/github/GitHubConnector.java | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/url-checker.yml b/.github/workflows/url-checker.yml index 42d412aaa..31ce5c910 100644 --- a/.github/workflows/url-checker.yml +++ b/.github/workflows/url-checker.yml @@ -15,9 +15,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: URLs-checker + - name: URL-checker uses: SuperKogito/URLs-checker@0.2.1 with: git_path: https://github.com/TheBusyBiscuit/Slimefun4 file_types: .md,.java,.yml print_all: False + white_listed_patterns: http://textures.minecraft.net/texture/ diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/MetricsService.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/MetricsService.java index 9b00e302c..930cede84 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/MetricsService.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/MetricsService.java @@ -32,9 +32,11 @@ import org.bukkit.plugin.Plugin; */ public class MetricsService { + + private static final String API_URL = "https://api.github.com/"; private static final String REPO_NAME = "MetricsModule"; - private static final String GH_API = "https://api.github.com/repos/Slimefun/" + REPO_NAME; - private static final String GH_RELEASES = "https://github.com/Slimefun/" + REPO_NAME + "/releases/download"; + private static final String RELEASES_URL = API_URL + "repos/Slimefun/" + REPO_NAME + "/releases/latest"; + private static final String DOWNLOAD_URL = "https://github.com/Slimefun/" + REPO_NAME + "/releases/download"; private final SlimefunPlugin plugin; private final File parentFolder; @@ -160,7 +162,7 @@ public class MetricsService { */ private int getLatestVersion() { try { - HttpResponse response = Unirest.get(GH_API + "/releases/latest").asJson(); + HttpResponse response = Unirest.get(RELEASES_URL).asJson(); if (!response.isSuccess()) { return -1; @@ -198,7 +200,7 @@ public class MetricsService { } AtomicInteger lastPercentPosted = new AtomicInteger(); - GetRequest request = Unirest.get(GH_RELEASES + "/" + version + "/" + REPO_NAME + ".jar"); + GetRequest request = Unirest.get(DOWNLOAD_URL + "/" + version + "/" + REPO_NAME + ".jar"); HttpResponse response = request.downloadMonitor((b, fileName, bytesWritten, totalBytes) -> { int percent = (int) (20 * (Math.round((((double) bytesWritten / totalBytes) * 100) / 20))); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/github/GitHubConnector.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/github/GitHubConnector.java index cdf77ef0c..922355172 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/github/GitHubConnector.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/github/GitHubConnector.java @@ -17,6 +17,8 @@ import kong.unirest.json.JSONException; import me.mrCookieSlime.Slimefun.api.Slimefun; abstract class GitHubConnector { + + private static final String API_URL = "https://api.github.com/"; protected File file; protected String repository; @@ -45,7 +47,7 @@ abstract class GitHubConnector { } try { - HttpResponse resp = Unirest.get("https://api.github.com/repos/" + repository + getURLSuffix()) + HttpResponse resp = Unirest.get(API_URL + "repos/" + repository + getURLSuffix()) .header("User-Agent", "Slimefun4 (https://github.com/Slimefun)") .asJson(); From 1fde84a4c7c0d2c0872dce867349e57ec38a5ee3 Mon Sep 17 00:00:00 2001 From: dniym Date: Thu, 6 Aug 2020 21:08:59 -0400 Subject: [PATCH 28/65] Approved Suggestion #272 - AutoBio#8746 --- .../implementation/items/electric/machines/ElectricPress.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ElectricPress.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ElectricPress.java index 94a1c3858..a945983cc 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ElectricPress.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/ElectricPress.java @@ -48,7 +48,9 @@ public abstract class ElectricPress extends AContainer implements RecipeDisplayI addRecipe(4, new ItemStack(Material.IRON_NUGGET, 9), new ItemStack(Material.IRON_INGOT)); addRecipe(4, new ItemStack(Material.GOLD_NUGGET, 9), new ItemStack(Material.GOLD_INGOT)); addRecipe(4, new ItemStack(Material.COAL, 9), new ItemStack(Material.COAL_BLOCK)); - + addRecipe(4, new ItemStack(Material.SAND, 4), new ItemStack(Material.SANDSTONE)); + addRecipe(4, new ItemStack(Material.RED_SAND, 4), new ItemStack(Material.RED_SANDSTONE)); + addRecipe(5, new ItemStack(Material.IRON_INGOT, 9), new ItemStack(Material.IRON_BLOCK)); addRecipe(5, new ItemStack(Material.GOLD_INGOT, 9), new ItemStack(Material.GOLD_BLOCK)); From 99d07c42e52c623e3470d12fa8019ec276f91024 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Fri, 7 Aug 2020 19:05:51 +0200 Subject: [PATCH 29/65] [CI skip] Update MockBukkit --- pom.xml | 14 ++++++++++++-- .../items/implementations/food/TestDietCookie.java | 2 -- .../implementations/food/TestMonsterJerky.java | 2 -- .../tests/listeners/TestSoulboundListener.java | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index b59367211..11892434e 100644 --- a/pom.xml +++ b/pom.xml @@ -47,6 +47,16 @@ + + sonatype-snapshots + http://oss.sonatype.org/content/repositories/snapshots + + false + + + true + + jitpack.io https://jitpack.io @@ -303,8 +313,8 @@ com.github.seeseemelk - MockBukkit - v1.15-d952559324-1 + MockBukkit-v1.15 + 0.3.1-SNAPSHOT test diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/items/implementations/food/TestDietCookie.java b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/items/implementations/food/TestDietCookie.java index 4bcdb086a..f7e9336e3 100644 --- a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/items/implementations/food/TestDietCookie.java +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/items/implementations/food/TestDietCookie.java @@ -7,7 +7,6 @@ import org.bukkit.potion.PotionEffectType; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import be.seeseemelk.mockbukkit.MockBukkit; @@ -45,7 +44,6 @@ public class TestDietCookie implements SlimefunItemTest { } @Test - @Disabled("Potion Effects are currently not fully implemented in MockBukkit") public void testConsumptionBehaviour() { PlayerMock player = server.addPlayer(); DietCookie cookie = registerSlimefunItem(plugin, "TEST_DIET_COOKIE"); diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/items/implementations/food/TestMonsterJerky.java b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/items/implementations/food/TestMonsterJerky.java index c8752a782..0002be40d 100644 --- a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/items/implementations/food/TestMonsterJerky.java +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/items/implementations/food/TestMonsterJerky.java @@ -6,7 +6,6 @@ import org.bukkit.potion.PotionEffectType; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import be.seeseemelk.mockbukkit.MockBukkit; @@ -44,7 +43,6 @@ public class TestMonsterJerky implements SlimefunItemTest { } @Test - @Disabled("Potion Effects are currently not fully implemented in MockBukkit") public void testConsumptionBehaviour() { PlayerMock player = server.addPlayer(); player.addPotionEffect(PotionEffectType.HUNGER.createEffect(20, 2)); diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestSoulboundListener.java b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestSoulboundListener.java index 9e97bc095..4d2aec92c 100644 --- a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestSoulboundListener.java +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestSoulboundListener.java @@ -59,7 +59,8 @@ public class TestSoulboundListener { player.respawn(); server.getPluginManager().assertEventFired(PlayerRespawnEvent.class, event -> { - return player.getInventory().getItem(6).isSimilar(item) == soulbound; + ItemStack stack = player.getInventory().getItem(6); + return SlimefunUtils.isItemSimilar(stack, item, true) == soulbound; }); } From 5002533a6547f3dc73e64c90e58e5c4d088e5287 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Fri, 7 Aug 2020 19:21:12 +0200 Subject: [PATCH 30/65] [CI skip] Updated change log --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index be7801f58..d7b4c1c87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,8 @@ * (API) Added support for adding custom Piglin Barter drops * (API) Added BlockPlacerPlaceEvent * (API) Added ToolUseHandler +* Added "Sand -> Sandstone" recipe to the Electric Press +* Added "Red Sand -> Red Sandstone" recipe to the Electric Press #### Changes * Performance improvement for Programmable Android rotations From 87f8e7ae8c9b185ab7b904d44b4e43c6f0cc8f31 Mon Sep 17 00:00:00 2001 From: poma123 <25465545+poma123@users.noreply.github.com> Date: Fri, 7 Aug 2020 21:46:59 +0200 Subject: [PATCH 31/65] Fixed Industrial Miner debris issue --- .../implementation/items/multiblocks/miner/IndustrialMiner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java index 8dba2f29e..d89e761eb 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java @@ -212,7 +212,7 @@ public class IndustrialMiner extends MultiBlockMachine { * @return Whether this {@link IndustrialMiner} is capable of mining this {@link Material} */ public boolean canMine(Material type) { - return type.name().endsWith("_ORE") || (type == Material.ANCIENT_DEBRIS && canMineAncientDebris.getValue()); + return type.name().endsWith("_ORE") || (type.name().equals("ANCIENT_DEBRIS") && canMineAncientDebris.getValue()); } } From 6ab196a03dc161e8b22bba1052ca25a7161f552d Mon Sep 17 00:00:00 2001 From: poma123 <25465545+poma123@users.noreply.github.com> Date: Fri, 7 Aug 2020 22:04:15 +0200 Subject: [PATCH 32/65] Requested changes --- .../implementation/items/multiblocks/miner/IndustrialMiner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java index d89e761eb..689009e4d 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java @@ -212,7 +212,7 @@ public class IndustrialMiner extends MultiBlockMachine { * @return Whether this {@link IndustrialMiner} is capable of mining this {@link Material} */ public boolean canMine(Material type) { - return type.name().endsWith("_ORE") || (type.name().equals("ANCIENT_DEBRIS") && canMineAncientDebris.getValue()); + return type.name().endsWith("_ORE") || (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16) && type == Material.ANCIENT_DEBRIS && canMineAncientDebris.getValue()); } } From c2fa590aa15d60d5196bce49169dfcf17f7e5091 Mon Sep 17 00:00:00 2001 From: poma123 <25465545+poma123@users.noreply.github.com> Date: Fri, 7 Aug 2020 22:43:58 +0200 Subject: [PATCH 33/65] Requested changes --- .../items/multiblocks/miner/IndustrialMiner.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java index 689009e4d..321d18502 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java @@ -212,7 +212,15 @@ public class IndustrialMiner extends MultiBlockMachine { * @return Whether this {@link IndustrialMiner} is capable of mining this {@link Material} */ public boolean canMine(Material type) { - return type.name().endsWith("_ORE") || (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16) && type == Material.ANCIENT_DEBRIS && canMineAncientDebris.getValue()); + if (type.name().endsWith("_ORE")) { + return true; + } + else if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16)) { + return type == Material.ANCIENT_DEBRIS && canMineAncientDebris.getValue(); + } + else { + return false; + } } } From 3e6a9594b5a35c324e8507c4d985e1a947f9a5f5 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sat, 8 Aug 2020 00:09:28 +0200 Subject: [PATCH 34/65] [CI skip] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b4c1c87..d1f288f74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ * Fixed #2180 * Fixed #2122 * Fixed #2168 +* Fixed #2203 ## Release Candidate 15 (01 Aug 2020) From aab0b5a45c71c5b21d7d346b5d962c84e74f68a0 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sat, 8 Aug 2020 00:12:23 +0200 Subject: [PATCH 35/65] [CI skip] Unified a link --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 75f383ea7..92af0675b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -23,7 +23,7 @@ Rules for posting an Issue on GitHub: 5. Do not post your Issue more than once, this is considered spam and does not benefit our community in any way. Do not repost your Issue if it was closed either, just leave a comment stating that the issue has still persisted and give more context on it. 6. Give us all available information right away, it may be a bit of time-wasting for us to keep asking for more Info. And this includes any Information to reproduce your Issue step-by-step. 7. Check whether there are newer versions available than the ones you are using, it might be that your Issue has been fixed already. -8. All text logs must be posted via a link to https://pastebin.com or similiar websites, long logs are very hard to read and get weirdly formatted when you post them on here. Using a proper pasting site allows us to keep things clean and easy to read. +8. All text logs must be posted via a link to https://pastebin.com/ or similiar websites, long logs are very hard to read and get weirdly formatted when you post them on here. Using a proper pasting site allows us to keep things clean and easy to read. Your Issue will be CLOSED WITHOUT WARNING if we think you violated these Rules. From b0497bbee6441b759e23bf07ac5d2001447d8982 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sat, 8 Aug 2020 00:12:39 +0200 Subject: [PATCH 36/65] [CI skip] Updated a workflow --- .github/workflows/url-checker.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/url-checker.yml b/.github/workflows/url-checker.yml index 31ce5c910..0b82a5aa5 100644 --- a/.github/workflows/url-checker.yml +++ b/.github/workflows/url-checker.yml @@ -21,4 +21,6 @@ jobs: git_path: https://github.com/TheBusyBiscuit/Slimefun4 file_types: .md,.java,.yml print_all: False - white_listed_patterns: http://textures.minecraft.net/texture/ + retry_count: 2 + ## These URLs will always be correct, even if their services may be offline right now + white_listed_patterns: http://textures.minecraft.net/texture/,https://pastebin.com/ From bffbb488bad5fed8c096c1a84a7e4c4096f2d589 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sat, 8 Aug 2020 00:45:01 +0200 Subject: [PATCH 37/65] [CI skip] Added Unit Tests for Piglins --- .../slimefun4/api/ErrorReport.java | 2 +- .../listeners/PiglinListener.java | 56 ++++----- .../tests/listeners/TestPiglinListener.java | 109 ++++++++++++++++++ 3 files changed, 138 insertions(+), 29 deletions(-) create mode 100644 src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestPiglinListener.java diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/ErrorReport.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/ErrorReport.java index 4297e2223..462c77064 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/ErrorReport.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/ErrorReport.java @@ -84,7 +84,7 @@ public class ErrorReport { addon.getLogger().log(Level.WARNING, ""); addon.getLogger().log(Level.WARNING, "An Error occurred! It has been saved as: "); addon.getLogger().log(Level.WARNING, "/plugins/Slimefun/error-reports/{0}", file.getName()); - addon.getLogger().log(Level.WARNING, "Please put this file on https://pastebin.com and report this to the developer(s)."); + addon.getLogger().log(Level.WARNING, "Please put this file on https://pastebin.com/ and report this to the developer(s)."); if (addon.getBugTrackerURL() != null) { addon.getLogger().log(Level.WARNING, "Bug Tracker: {0}", addon.getBugTrackerURL()); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PiglinListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PiglinListener.java index 1e5e34f91..c5f68cfd7 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PiglinListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PiglinListener.java @@ -36,7 +36,7 @@ public class PiglinListener implements Listener { } @EventHandler - public void onEntityPickup(EntityPickupItemEvent e) { + public void onPickup(EntityPickupItemEvent e) { if (e.getEntityType() == EntityType.PIGLIN) { ItemStack item = e.getItem().getItemStack(); @@ -47,6 +47,33 @@ public class PiglinListener implements Listener { } } + @EventHandler + public void onInteract(PlayerInteractEntityEvent e) { + if (!e.getRightClicked().isValid() || e.getRightClicked().getType() != EntityType.PIGLIN) { + return; + } + + Player p = e.getPlayer(); + ItemStack item; + + if (e.getHand() == EquipmentSlot.OFF_HAND) { + item = p.getInventory().getItemInOffHand(); + } + else { + item = p.getInventory().getItemInMainHand(); + } + + // We only care about Gold since it's the actual "Bartering" we wanna prevent + if (item.getType() == Material.GOLD_INGOT) { + SlimefunItem sfItem = SlimefunItem.getByItem(item); + + if (sfItem != null) { + SlimefunPlugin.getLocalization().sendMessage(p, "messages.piglin-barter", true); + e.setCancelled(true); + } + } + } + @EventHandler public void onPiglinDropItem(EntityDropItemEvent e) { if (e.getEntity() instanceof Piglin) { @@ -76,31 +103,4 @@ public class PiglinListener implements Listener { } } } - - @EventHandler - public void onInteractEntity(PlayerInteractEntityEvent e) { - if (!e.getRightClicked().isValid() || e.getRightClicked().getType() != EntityType.PIGLIN) { - return; - } - - Player p = e.getPlayer(); - ItemStack item; - - if (e.getHand() == EquipmentSlot.OFF_HAND) { - item = p.getInventory().getItemInOffHand(); - } - else { - item = p.getInventory().getItemInMainHand(); - } - - // We only care about Gold since it's the actual "Bartering" we wanna prevent - if (item.getType() == Material.GOLD_INGOT) { - SlimefunItem sfItem = SlimefunItem.getByItem(item); - - if (sfItem != null) { - SlimefunPlugin.getLocalization().sendMessage(p, "messages.piglin-barter", true); - e.setCancelled(true); - } - } - } } diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestPiglinListener.java b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestPiglinListener.java new file mode 100644 index 000000000..161d2d1cc --- /dev/null +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestPiglinListener.java @@ -0,0 +1,109 @@ +package io.github.thebusybiscuit.slimefun4.testing.tests.listeners; + +import org.bukkit.Material; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Item; +import org.bukkit.entity.Piglin; +import org.bukkit.entity.Player; +import org.bukkit.event.entity.EntityPickupItemEvent; +import org.bukkit.event.player.PlayerInteractEntityEvent; +import org.bukkit.inventory.EquipmentSlot; +import org.bukkit.inventory.ItemStack; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.EnumSource; +import org.mockito.Mockito; + +import be.seeseemelk.mockbukkit.MockBukkit; +import be.seeseemelk.mockbukkit.ServerMock; +import io.github.thebusybiscuit.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; +import io.github.thebusybiscuit.slimefun4.implementation.listeners.PiglinListener; +import io.github.thebusybiscuit.slimefun4.testing.TestUtilities; +import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; + +class TestPiglinListener { + + private static SlimefunPlugin plugin; + private static PiglinListener listener; + private static ServerMock server; + + @BeforeAll + public static void load() { + server = MockBukkit.mock(); + plugin = MockBukkit.load(SlimefunPlugin.class); + listener = new PiglinListener(plugin); + } + + @AfterAll + public static void unload() { + MockBukkit.unmock(); + } + + private EntityPickupItemEvent createPickupEvent(ItemStack item) { + Piglin piglin = Mockito.mock(Piglin.class); + Mockito.when(piglin.getType()).thenReturn(EntityType.PIGLIN); + + Item itemEntity = Mockito.mock(Item.class); + Mockito.when(itemEntity.getItemStack()).thenReturn(item); + + return new EntityPickupItemEvent(piglin, itemEntity, 1); + } + + private PlayerInteractEntityEvent createInteractEvent(EquipmentSlot hand, ItemStack item) { + Player player = server.addPlayer(); + + Piglin piglin = Mockito.mock(Piglin.class); + Mockito.when(piglin.getType()).thenReturn(EntityType.PIGLIN); + Mockito.when(piglin.isValid()).thenReturn(true); + + if (hand == EquipmentSlot.OFF_HAND) { + player.getInventory().setItemInOffHand(item); + } + else { + player.getInventory().setItemInMainHand(item); + } + + return new PlayerInteractEntityEvent(player, piglin, hand); + } + + @Test + void testPiglinPickup() { + EntityPickupItemEvent event = createPickupEvent(new ItemStack(Material.GOLD_INGOT)); + listener.onPickup(event); + Assertions.assertFalse(event.isCancelled()); + } + + @Test + void testPiglinPickupWithSlimefunItem() { + SlimefunItem item = TestUtilities.mockSlimefunItem(plugin, "PIGLIN_PICKUP_MOCK", new CustomItem(Material.GOLD_INGOT, "&6Piglin Bait")); + item.register(plugin); + + EntityPickupItemEvent event = createPickupEvent(item.getItem()); + listener.onPickup(event); + Assertions.assertTrue(event.isCancelled()); + } + + @ParameterizedTest + @EnumSource(value = EquipmentSlot.class, names = { "HAND", "OFF_HAND" }) + void testPiglinInteract(EquipmentSlot hand) { + PlayerInteractEntityEvent event = createInteractEvent(hand, new ItemStack(Material.GOLD_INGOT)); + listener.onInteract(event); + Assertions.assertFalse(event.isCancelled()); + } + + @ParameterizedTest + @EnumSource(value = EquipmentSlot.class, names = { "HAND", "OFF_HAND" }) + void testPiglinInteractWithSlimefunItem(EquipmentSlot hand) { + SlimefunItem item = TestUtilities.mockSlimefunItem(plugin, "PIGLIN_GIVE_" + hand.name(), new CustomItem(Material.GOLD_INGOT, "&6Piglin Bait")); + item.register(plugin); + + PlayerInteractEntityEvent event = createInteractEvent(hand, item.getItem()); + listener.onInteract(event); + Assertions.assertTrue(event.isCancelled()); + } + +} From c08eadcaae1f2bc02ea6a844aabc864d8d3953fd Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sat, 8 Aug 2020 00:48:09 +0200 Subject: [PATCH 38/65] Small performance improvement --- .../listeners/AncientAltarListener.java | 5 +++- .../listeners/ItemPickupListener.java | 24 ++++++++++++------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java index 518ae597d..e314b9c82 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java @@ -27,6 +27,7 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.util.Vector; +import io.github.thebusybiscuit.cscorelib2.chat.ChatColors; import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils; import io.github.thebusybiscuit.cscorelib2.item.CustomItem; import io.github.thebusybiscuit.cscorelib2.protection.ProtectableAction; @@ -53,6 +54,8 @@ import me.mrCookieSlime.Slimefun.api.Slimefun; */ public class AncientAltarListener implements Listener { + static final String ITEM_PREFIX = ChatColors.color("&dALTAR &3Probe - &e"); + private AncientAltar altar; private final Set altarRecipes = new HashSet<>(); @@ -303,7 +306,7 @@ public class AncientAltarListener implements Listener { } String nametag = ItemUtils.getItemName(stack); - Item entity = b.getWorld().dropItem(b.getLocation().add(0.5, 1.2, 0.5), new CustomItem(stack, "&5&dALTAR &3Probe - &e" + System.nanoTime())); + Item entity = b.getWorld().dropItem(b.getLocation().add(0.5, 1.2, 0.5), new CustomItem(stack, ITEM_PREFIX + System.nanoTime())); entity.setVelocity(new Vector(0, 0.1, 0)); SlimefunUtils.markAsNoPickup(entity, "altar_item"); entity.setCustomNameVisible(true); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/ItemPickupListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/ItemPickupListener.java index 8b7216751..ce734ed8d 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/ItemPickupListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/ItemPickupListener.java @@ -4,8 +4,8 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityPickupItemEvent; import org.bukkit.event.inventory.InventoryPickupItemEvent; +import org.bukkit.inventory.meta.ItemMeta; -import io.github.thebusybiscuit.cscorelib2.chat.ChatColors; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; @@ -16,8 +16,6 @@ import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; */ public class ItemPickupListener implements Listener { - private static final String ITEM_PREFIX = ChatColors.color("&5&dALTAR &3Probe - &e"); - public ItemPickupListener(SlimefunPlugin plugin) { plugin.getServer().getPluginManager().registerEvents(this, plugin); } @@ -27,9 +25,13 @@ public class ItemPickupListener implements Listener { if (SlimefunUtils.hasNoPickupFlag(e.getItem())) { e.setCancelled(true); } - else if (e.getItem().getItemStack().hasItemMeta() && e.getItem().getItemStack().getItemMeta().hasDisplayName() && e.getItem().getItemStack().getItemMeta().getDisplayName().startsWith(ITEM_PREFIX)) { - e.setCancelled(true); - e.getItem().remove(); + else if (e.getItem().getItemStack().hasItemMeta()) { + ItemMeta meta = e.getItem().getItemStack().getItemMeta(); + + if (meta.hasDisplayName() && meta.getDisplayName().startsWith(AncientAltarListener.ITEM_PREFIX)) { + e.setCancelled(true); + e.getItem().remove(); + } } } @@ -38,9 +40,13 @@ public class ItemPickupListener implements Listener { if (SlimefunUtils.hasNoPickupFlag(e.getItem())) { e.setCancelled(true); } - else if (e.getItem().getItemStack().hasItemMeta() && e.getItem().getItemStack().getItemMeta().hasDisplayName() && e.getItem().getItemStack().getItemMeta().getDisplayName().startsWith(ITEM_PREFIX)) { - e.setCancelled(true); - e.getItem().remove(); + else if (e.getItem().getItemStack().hasItemMeta()) { + ItemMeta meta = e.getItem().getItemStack().getItemMeta(); + + if (meta.hasDisplayName() && meta.getDisplayName().startsWith(AncientAltarListener.ITEM_PREFIX)) { + e.setCancelled(true); + e.getItem().remove(); + } } } } From d26ba90b5bb5141757a023043781422f9c4e6509 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sat, 8 Aug 2020 11:50:56 +0200 Subject: [PATCH 39/65] [CI skip] Updated paper repository url --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 11892434e..db59c3f5c 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ paper-repo - https://repo.destroystokyo.com/repository/maven-public/ + https://papermc.io/repo/repository/maven-public/ worldedit-repo From 9f49dd39815a7e060e427279c35024baa2f60637 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sat, 8 Aug 2020 12:47:39 +0200 Subject: [PATCH 40/65] Reduced technical debt --- .../listeners/AncientAltarListener.java | 2 +- .../listeners/BlockListener.java | 95 +++++++++++-------- .../listeners/DebugFishListener.java | 51 ++++++---- .../listeners/TalismanListener.java | 8 +- .../slimefun4/utils/SlimefunUtils.java | 82 +++++----------- 5 files changed, 115 insertions(+), 123 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java index e314b9c82..960ca8587 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/AncientAltarListener.java @@ -54,7 +54,7 @@ import me.mrCookieSlime.Slimefun.api.Slimefun; */ public class AncientAltarListener implements Listener { - static final String ITEM_PREFIX = ChatColors.color("&dALTAR &3Probe - &e"); + public static final String ITEM_PREFIX = ChatColors.color("&dALTAR &3Probe - &e"); private AncientAltar altar; diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java index 74ee24f35..81a9f876e 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java @@ -32,6 +32,17 @@ import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.UnregisterReason; import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.Slimefun; +/** + * The {@link BlockListener} is responsible for listening to the {@link BlockPlaceEvent} + * and {@link BlockBreakEvent}. + * + * @author TheBusyBiscuit + * + * @see BlockPlaceHandler + * @see BlockBreakHandler + * @see ToolUseHandler + * + */ public class BlockListener implements Listener { // Materials that require a Block under it, e.g. Pressure Plates @@ -49,7 +60,7 @@ public class BlockListener implements Listener { } @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) - public void onBlockRegister(BlockPlaceEvent e) { + public void onBlockPlace(BlockPlaceEvent e) { if (BlockStorage.hasBlockInfo(e.getBlock())) { e.setCancelled(true); return; @@ -81,7 +92,7 @@ public class BlockListener implements Listener { } @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) - public void onBlockUnregister(BlockBreakEvent e) { + public void onBlockBreak(BlockBreakEvent e) { checkForSensitiveBlockAbove(e.getPlayer(), e.getBlock()); ItemStack item = e.getPlayer().getInventory().getItemInMainHand(); @@ -89,50 +100,58 @@ public class BlockListener implements Listener { List drops = new ArrayList<>(); if (item.getType() != Material.AIR) { - SlimefunItem tool = SlimefunItem.getByItem(item); - - if (tool != null) { - if (Slimefun.hasUnlocked(e.getPlayer(), tool, true)) { - tool.callItemHandler(ToolUseHandler.class, handler -> handler.onToolUse(e, item, fortune, drops)); - } - else { - e.setCancelled(true); - } - } + callToolHandler(e, item, fortune, drops); } if (!e.isCancelled()) { - SlimefunItem sfItem = BlockStorage.check(e.getBlock()); - - if (sfItem == null && SlimefunPlugin.getBlockDataService().isTileEntity(e.getBlock().getType())) { - Optional blockData = SlimefunPlugin.getBlockDataService().getBlockData(e.getBlock()); - - if (blockData.isPresent()) { - sfItem = SlimefunItem.getByID(blockData.get()); - } - } - - if (sfItem != null && !sfItem.useVanillaBlockBreaking()) { - SlimefunBlockHandler blockHandler = SlimefunPlugin.getRegistry().getBlockHandlers().get(sfItem.getID()); - - if (blockHandler != null) { - if (!blockHandler.onBreak(e.getPlayer(), e.getBlock(), sfItem, UnregisterReason.PLAYER_BREAK)) { - e.setCancelled(true); - return; - } - } - else { - sfItem.callItemHandler(BlockBreakHandler.class, handler -> handler.onBlockBreak(e, item, fortune, drops)); - } - - drops.addAll(sfItem.getDrops()); - BlockStorage.clearBlockInfo(e.getBlock()); - } + callBlockHandler(e, item, fortune, drops); } dropItems(e, drops); } + private void callToolHandler(BlockBreakEvent e, ItemStack item, int fortune, List drops) { + SlimefunItem tool = SlimefunItem.getByItem(item); + + if (tool != null) { + if (Slimefun.hasUnlocked(e.getPlayer(), tool, true)) { + tool.callItemHandler(ToolUseHandler.class, handler -> handler.onToolUse(e, item, fortune, drops)); + } + else { + e.setCancelled(true); + } + } + } + + private void callBlockHandler(BlockBreakEvent e, ItemStack item, int fortune, List drops) { + SlimefunItem sfItem = BlockStorage.check(e.getBlock()); + + if (sfItem == null && SlimefunPlugin.getBlockDataService().isTileEntity(e.getBlock().getType())) { + Optional blockData = SlimefunPlugin.getBlockDataService().getBlockData(e.getBlock()); + + if (blockData.isPresent()) { + sfItem = SlimefunItem.getByID(blockData.get()); + } + } + + if (sfItem != null && !sfItem.useVanillaBlockBreaking()) { + SlimefunBlockHandler blockHandler = SlimefunPlugin.getRegistry().getBlockHandlers().get(sfItem.getID()); + + if (blockHandler != null) { + if (!blockHandler.onBreak(e.getPlayer(), e.getBlock(), sfItem, UnregisterReason.PLAYER_BREAK)) { + e.setCancelled(true); + return; + } + } + else { + sfItem.callItemHandler(BlockBreakHandler.class, handler -> handler.onBlockBreak(e, item, fortune, drops)); + } + + drops.addAll(sfItem.getDrops()); + BlockStorage.clearBlockInfo(e.getBlock()); + } + } + private void dropItems(BlockBreakEvent e, List drops) { if (!drops.isEmpty()) { e.getBlock().setType(Material.AIR); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/DebugFishListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/DebugFishListener.java index ad9edce67..30a969e25 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/DebugFishListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/DebugFishListener.java @@ -4,6 +4,7 @@ import java.util.logging.Level; import org.bukkit.Material; import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; import org.bukkit.block.Skull; import org.bukkit.block.data.Directional; import org.bukkit.block.data.Rotatable; @@ -60,29 +61,10 @@ public class DebugFishListener implements Listener { if (p.hasPermission("slimefun.debugging")) { if (e.getAction() == Action.LEFT_CLICK_BLOCK) { - if (p.isSneaking()) { - if (BlockStorage.hasBlockInfo(e.getClickedBlock())) { - BlockStorage.clearBlockInfo(e.getClickedBlock()); - } - } - else { - e.setCancelled(false); - } + onLeftClick(p, e.getClickedBlock(), e); } else if (e.getAction() == Action.RIGHT_CLICK_BLOCK) { - if (p.isSneaking()) { - Block b = e.getClickedBlock().getRelative(e.getBlockFace()); - b.setType(Material.PLAYER_HEAD); - SkullBlock.setFromHash(b, HeadTexture.MISSING_TEXTURE.getTexture()); - } - else if (BlockStorage.hasBlockInfo(e.getClickedBlock())) { - try { - sendInfo(p, e.getClickedBlock()); - } - catch (Exception x) { - Slimefun.getLogger().log(Level.SEVERE, "An Exception occured while using a Debug-Fish", x); - } - } + onRightClick(p, e.getClickedBlock(), e.getBlockFace()); } } else { @@ -91,6 +73,33 @@ public class DebugFishListener implements Listener { } } + private void onLeftClick(Player p, Block b, PlayerInteractEvent e) { + if (p.isSneaking()) { + if (BlockStorage.hasBlockInfo(b)) { + BlockStorage.clearBlockInfo(b); + } + } + else { + e.setCancelled(false); + } + } + + private void onRightClick(Player p, Block b, BlockFace face) { + if (p.isSneaking()) { + Block block = b.getRelative(face); + block.setType(Material.PLAYER_HEAD); + SkullBlock.setFromHash(block, HeadTexture.MISSING_TEXTURE.getTexture()); + } + else if (BlockStorage.hasBlockInfo(b)) { + try { + sendInfo(p, b); + } + catch (Exception x) { + Slimefun.getLogger().log(Level.SEVERE, "An Exception occured while using a Debug-Fish", x); + } + } + } + private void sendInfo(Player p, Block b) { SlimefunItem item = BlockStorage.check(b); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/TalismanListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/TalismanListener.java index d68d47a63..df00ffc64 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/TalismanListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/TalismanListener.java @@ -235,20 +235,20 @@ public class TalismanListener implements Listener { if (MaterialCollections.getAllOres().contains(e.getBlock().getType())) { ItemStack item = e.getPlayer().getInventory().getItemInMainHand(); - if (item.getType() != Material.AIR && item.getAmount() > 0) { + if (item.getType() != Material.AIR && item.getAmount() > 0 && !item.containsEnchantment(Enchantment.SILK_TOUCH)) { Collection drops = e.getBlock().getDrops(item); int dropAmount = 1; - if (item.getEnchantments().containsKey(Enchantment.LOOT_BONUS_BLOCKS) && !item.getEnchantments().containsKey(Enchantment.SILK_TOUCH)) { + if (item.containsEnchantment(Enchantment.LOOT_BONUS_BLOCKS)) { Random random = ThreadLocalRandom.current(); dropAmount = random.nextInt(item.getEnchantmentLevel(Enchantment.LOOT_BONUS_BLOCKS) + 2) - 1; dropAmount = Math.max(dropAmount, 1); dropAmount = (e.getBlock().getType() == Material.LAPIS_ORE ? 4 + random.nextInt(5) : 1) * (dropAmount + 1); } - if (!item.getEnchantments().containsKey(Enchantment.SILK_TOUCH) && Talisman.checkFor(e, SlimefunItems.TALISMAN_MINER)) { + if (Talisman.checkFor(e, SlimefunItems.TALISMAN_MINER)) { for (ItemStack drop : drops) { - if (!drop.getType().isBlock()) { + if (drop != null && !drop.getType().isBlock()) { int amount = Math.max(1, (dropAmount * 2) - drop.getAmount()); e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation(), new CustomItem(drop, amount)); } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java index 260c6b971..b1250a9c8 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/SlimefunUtils.java @@ -270,78 +270,42 @@ public final class SlimefunUtils { private static boolean equalsItemMeta(ItemMeta itemMeta, ImmutableItemMeta meta, boolean checkLore) { Optional displayName = meta.getDisplayName(); - if (itemMeta.hasDisplayName() && displayName.isPresent()) { - if (itemMeta.getDisplayName().equals(displayName.get())) { - Optional> itemLore = meta.getLore(); - - if (checkLore) { - if (itemMeta.hasLore() && itemLore.isPresent()) { - return equalsLore(itemMeta.getLore(), itemLore.get()); - } - else { - return !itemMeta.hasLore() && !itemLore.isPresent(); - } - } - else { - return true; - } - } - else { - return false; - } + if (itemMeta.hasDisplayName() != displayName.isPresent()) { + return false; } - else if (!itemMeta.hasDisplayName() && !displayName.isPresent()) { + else if (itemMeta.hasDisplayName() && displayName.isPresent() && !itemMeta.getDisplayName().equals(displayName.get())) { + return false; + } + else if (!checkLore) { + return true; + } + else { Optional> itemLore = meta.getLore(); - if (checkLore) { - if (itemMeta.hasLore() && itemLore.isPresent()) { - return equalsLore(itemMeta.getLore(), itemLore.get()); - } - else { - return !itemMeta.hasLore() && !itemLore.isPresent(); - } + if (itemMeta.hasLore() && itemLore.isPresent()) { + return equalsLore(itemMeta.getLore(), itemLore.get()); } else { - return true; + return !itemMeta.hasLore() && !itemLore.isPresent(); } } - else return false; } private static boolean equalsItemMeta(ItemMeta itemMeta, ItemMeta sfitemMeta, boolean checkLore) { - if (itemMeta.hasDisplayName() && sfitemMeta.hasDisplayName()) { - if (itemMeta.getDisplayName().equals(sfitemMeta.getDisplayName())) { - if (checkLore) { - if (itemMeta.hasLore() && sfitemMeta.hasLore()) { - return equalsLore(itemMeta.getLore(), sfitemMeta.getLore()); - } - else { - return !itemMeta.hasLore() && !sfitemMeta.hasLore(); - } - } - else { - return true; - } - } - else { - return false; - } + if (itemMeta.hasDisplayName() != sfitemMeta.hasDisplayName()) { + return false; } - else if (!itemMeta.hasDisplayName() && !sfitemMeta.hasDisplayName()) { - if (checkLore) { - if (itemMeta.hasLore() && sfitemMeta.hasLore()) { - return equalsLore(itemMeta.getLore(), sfitemMeta.getLore()); - } - else { - return !itemMeta.hasLore() && !sfitemMeta.hasLore(); - } - } - else { - return true; - } + else if (itemMeta.hasDisplayName() && sfitemMeta.hasDisplayName() && !itemMeta.getDisplayName().equals(sfitemMeta.getDisplayName())) { + return false; + } + else if (!checkLore) { + return true; + } + else if (itemMeta.hasLore() && sfitemMeta.hasLore()) { + return equalsLore(itemMeta.getLore(), sfitemMeta.getLore()); } else { - return false; + return !itemMeta.hasLore() && !sfitemMeta.hasLore(); } } From 7de9dd6683c1e42f4f39dfa68f23250344b505ac Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sat, 8 Aug 2020 12:51:26 +0200 Subject: [PATCH 41/65] Industrial Miners can now also mine Gilded Blackstone --- CHANGELOG.md | 1 + .../items/multiblocks/miner/IndustrialMiner.java | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f288f74..073582c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ * (API) Added ToolUseHandler * Added "Sand -> Sandstone" recipe to the Electric Press * Added "Red Sand -> Red Sandstone" recipe to the Electric Press +* Industrial Miners can now also mine Gilded Blackstone #### Changes * Performance improvement for Programmable Android rotations diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java index 321d18502..4e4a54301 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/miner/IndustrialMiner.java @@ -131,10 +131,8 @@ public class IndustrialMiner extends MultiBlockMachine { return new ItemStack(Material.REDSTONE, 4 + random.nextInt(2)); case LAPIS_ORE: return new ItemStack(Material.LAPIS_LAZULI, 4 + random.nextInt(4)); - case ANCIENT_DEBRIS: - return new ItemStack(Material.ANCIENT_DEBRIS); default: - // This includes Iron and Gold ore + // This includes Iron and Gold ore (and Ancient Debris) return new ItemStack(ore); } } @@ -216,11 +214,15 @@ public class IndustrialMiner extends MultiBlockMachine { return true; } else if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16)) { - return type == Material.ANCIENT_DEBRIS && canMineAncientDebris.getValue(); - } - else { - return false; + if (type == Material.GILDED_BLACKSTONE) { + return true; + } + else if (type == Material.ANCIENT_DEBRIS) { + return canMineAncientDebris.getValue(); + } } + + return false; } } From a3f58150ee99b225194a7e3546fe108c7d963c93 Mon Sep 17 00:00:00 2001 From: Nameless Date: Sun, 9 Aug 2020 08:17:17 +0000 Subject: [PATCH 42/65] Translate messages_zh-CN.yml via GitLocalize --- src/main/resources/languages/messages_zh-CN.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/resources/languages/messages_zh-CN.yml b/src/main/resources/languages/messages_zh-CN.yml index 907b6275c..1a60ee479 100644 --- a/src/main/resources/languages/messages_zh-CN.yml +++ b/src/main/resources/languages/messages_zh-CN.yml @@ -284,6 +284,7 @@ languages: zh-CN: 简体中文 (中国) el: 希腊语 he: 希伯来语 + pt-BR: 葡萄牙语 (巴西) ar: 阿拉伯语 af: 南非语 da: 丹麦语 @@ -296,7 +297,6 @@ languages: th: 泰语 ro: 罗马尼亚语 pt: 葡萄牙语 (葡萄牙) - pt-BR: 葡萄牙语 (巴西) bg: 保加利亚语 ko: 韩语 tr: 土耳其语 @@ -305,5 +305,7 @@ languages: sr: 塞尔维亚语 be: 白俄罗斯语 tl: 他加禄语 +brewing_stand: + not-working: "&4你不能在酿造台中使用 Slimefun 物品!" miner: no-ores: "&e抱歉, 周围找不到矿石了!" From 03d7516605dbcff521470bf58a5c4cca1522eb5d Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 9 Aug 2020 08:17:18 +0000 Subject: [PATCH 43/65] Translate messages_zh-CN.yml via GitLocalize From af32c0ed4a790bf08ce761881758ba278848e7ce Mon Sep 17 00:00:00 2001 From: Nameless Date: Sun, 9 Aug 2020 08:20:48 +0000 Subject: [PATCH 44/65] Translate recipes_zh-CN.yml via GitLocalize --- src/main/resources/languages/recipes_zh-CN.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/resources/languages/recipes_zh-CN.yml b/src/main/resources/languages/recipes_zh-CN.yml index c996980ec..14f407f6f 100644 --- a/src/main/resources/languages/recipes_zh-CN.yml +++ b/src/main/resources/languages/recipes_zh-CN.yml @@ -118,6 +118,11 @@ slimefun: lore: - 如合成表所示 - 用炼油机合成 + barter_drop: + name: 猪灵交易掉落 + lore: + - 使用金锭与猪灵交易 + - 可以获得此物品 minecraft: shaped: name: 有序合成 From 66f4c48b4b6ddad045134ed5525d9065b7559719 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 9 Aug 2020 11:33:48 +0200 Subject: [PATCH 45/65] Fixes #2205 --- CHANGELOG.md | 1 + pom.xml | 2 +- .../implementation/SlimefunPlugin.java | 2 + .../items/misc/SyntheticEmerald.java | 29 ++++++ .../listeners/VillagerTradingListener.java | 57 +++++++++++ .../setup/SlimefunItemSetup.java | 4 +- src/main/resources/languages/messages_en.yml | 4 + .../TestVillagerTradingListener.java | 97 +++++++++++++++++++ 8 files changed, 193 insertions(+), 3 deletions(-) create mode 100644 src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/misc/SyntheticEmerald.java create mode 100644 src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VillagerTradingListener.java create mode 100644 src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestVillagerTradingListener.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 073582c9f..d7953b951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ * Fixed #2122 * Fixed #2168 * Fixed #2203 +* Fixed #2205 ## Release Candidate 15 (01 Aug 2020) diff --git a/pom.xml b/pom.xml index db59c3f5c..19d1b0273 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - io.github.thebusybiscuit + com.github.thebusybiscuit Slimefun diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java index 745671d55..75561d0a3 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java @@ -82,6 +82,7 @@ import io.github.thebusybiscuit.slimefun4.implementation.listeners.SoulboundList import io.github.thebusybiscuit.slimefun4.implementation.listeners.TalismanListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.VampireBladeListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.VanillaMachinesListener; +import io.github.thebusybiscuit.slimefun4.implementation.listeners.VillagerTradingListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.WitherListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.WorldListener; import io.github.thebusybiscuit.slimefun4.implementation.resources.GEOResourcesSetup; @@ -442,6 +443,7 @@ public final class SlimefunPlugin extends JavaPlugin implements SlimefunAddon { new IronGolemListener(this); new PlayerInteractEntityListener(this); new MobDropListener(this); + new VillagerTradingListener(this); if (minecraftVersion.isAtLeast(MinecraftVersion.MINECRAFT_1_15)) { new BeeListener(this); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/misc/SyntheticEmerald.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/misc/SyntheticEmerald.java new file mode 100644 index 000000000..a8fa1fb2b --- /dev/null +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/misc/SyntheticEmerald.java @@ -0,0 +1,29 @@ +package io.github.thebusybiscuit.slimefun4.implementation.items.misc; + +import org.bukkit.entity.Villager; +import org.bukkit.inventory.ItemStack; + +import io.github.thebusybiscuit.slimefun4.implementation.listeners.VillagerTradingListener; +import me.mrCookieSlime.Slimefun.Lists.RecipeType; +import me.mrCookieSlime.Slimefun.Objects.Category; +import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; +import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; + +/** + * The {@link SyntheticEmerald} is an almost normal emerald. + * It can even be used to trade with {@link Villager Villagers}. + * + * @author TheBusyBiscuit + * + * @see VillagerTradingListener + * + */ +public class SyntheticEmerald extends SlimefunItem { + + public SyntheticEmerald(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(category, item, recipeType, recipe); + + setUseableInWorkbench(true); + } + +} diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VillagerTradingListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VillagerTradingListener.java new file mode 100644 index 000000000..2f199a217 --- /dev/null +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/VillagerTradingListener.java @@ -0,0 +1,57 @@ +package io.github.thebusybiscuit.slimefun4.implementation.listeners; + +import org.bukkit.entity.Player; +import org.bukkit.event.Event.Result; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.InventoryAction; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.inventory.Inventory; + +import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; +import io.github.thebusybiscuit.slimefun4.implementation.items.VanillaItem; +import io.github.thebusybiscuit.slimefun4.implementation.items.misc.SyntheticEmerald; +import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; + +/** + * This {@link Listener} prevents any {@link SlimefunItem} from being used to trade with + * Villagers, with one exception being {@link SyntheticEmerald}. + * + * @author TheBusyBiscuit + * + */ +public class VillagerTradingListener implements Listener { + + public VillagerTradingListener(SlimefunPlugin plugin) { + plugin.getServer().getPluginManager().registerEvents(this, plugin); + } + + @EventHandler(ignoreCancelled = true) + public void onPreBrew(InventoryClickEvent e) { + Inventory clickedInventory = e.getClickedInventory(); + Inventory topInventory = e.getView().getTopInventory(); + + if (clickedInventory != null && topInventory.getType() == InventoryType.MERCHANT) { + if (e.getAction() == InventoryAction.HOTBAR_SWAP) { + e.setCancelled(true); + return; + } + + if (clickedInventory.getType() == InventoryType.MERCHANT) { + e.setCancelled(isUnallowed(SlimefunItem.getByItem(e.getCursor()))); + } + else { + e.setCancelled(isUnallowed(SlimefunItem.getByItem(e.getCurrentItem()))); + } + + if (e.getResult() == Result.DENY) { + SlimefunPlugin.getLocalization().sendMessage((Player) e.getWhoClicked(), "villagers.no-trading", true); + } + } + } + + private boolean isUnallowed(SlimefunItem item) { + return item != null && !(item instanceof VanillaItem) && !(item instanceof SyntheticEmerald) && !item.isDisabled(); + } +} 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 a2c10280b..c07619d3f 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 @@ -144,6 +144,7 @@ import io.github.thebusybiscuit.slimefun4.implementation.items.misc.BasicCircuit import io.github.thebusybiscuit.slimefun4.implementation.items.misc.CoolantCell; import io.github.thebusybiscuit.slimefun4.implementation.items.misc.OrganicFertilizer; import io.github.thebusybiscuit.slimefun4.implementation.items.misc.OrganicFood; +import io.github.thebusybiscuit.slimefun4.implementation.items.misc.SyntheticEmerald; import io.github.thebusybiscuit.slimefun4.implementation.items.multiblocks.ArmorForge; import io.github.thebusybiscuit.slimefun4.implementation.items.multiblocks.AutomatedPanningMachine; import io.github.thebusybiscuit.slimefun4.implementation.items.multiblocks.Compressor; @@ -867,9 +868,8 @@ public final class SlimefunItemSetup { new ItemStack[] {SlimefunItems.GOLD_24K, SlimefunItems.IRON_DUST, null, null, null, null, null, null, null}) .register(plugin); - new SlimefunItem(categories.resources, SlimefunItems.SYNTHETIC_EMERALD, RecipeType.SMELTERY, + new SyntheticEmerald(categories.resources, SlimefunItems.SYNTHETIC_EMERALD, RecipeType.SMELTERY, new ItemStack[] {SlimefunItems.SYNTHETIC_SAPPHIRE, SlimefunItems.ALUMINUM_DUST, SlimefunItems.ALUMINUM_INGOT, new ItemStack(Material.GLASS_PANE), null, null, null, null, null}) - .setUseableInWorkbench(true) .register(plugin); registerArmorSet(categories.armor, SlimefunItems.CHAIN, new ItemStack[] { diff --git a/src/main/resources/languages/messages_en.yml b/src/main/resources/languages/messages_en.yml index 1298dcb36..c50aedf71 100644 --- a/src/main/resources/languages/messages_en.yml +++ b/src/main/resources/languages/messages_en.yml @@ -235,6 +235,9 @@ anvil: brewing_stand: not-working: '&4You cannot use Slimefun Items in a brewing stand!' +villagers: + no-trading: '&4You cannot trade Slimefun Items with Villagers!' + backpack: already-open: '&cSorry, this Backpack is open somewhere else!' no-stack: '&cYou cannot stack Backpacks' @@ -248,6 +251,7 @@ gps: new: '&ePlease type in a name for your new waypoint in the chat. &7(Color Codes supported!)' added: '&aSuccessfully added a new waypoint' max: '&4You have reached the maximum amount of waypoints' + duplicate: '&4You have already created a waypoint named: &f%waypoint%' insufficient-complexity: - '&4Insufficient GPS Network Complexity: &c%complexity%' diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestVillagerTradingListener.java b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestVillagerTradingListener.java new file mode 100644 index 000000000..ebcc2c629 --- /dev/null +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestVillagerTradingListener.java @@ -0,0 +1,97 @@ +package io.github.thebusybiscuit.slimefun4.testing.tests.listeners; + +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.Event.Result; +import org.bukkit.event.inventory.ClickType; +import org.bukkit.event.inventory.InventoryAction; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.event.inventory.InventoryType.SlotType; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryView; +import org.bukkit.inventory.ItemStack; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +import be.seeseemelk.mockbukkit.MockBukkit; +import be.seeseemelk.mockbukkit.ServerMock; +import io.github.thebusybiscuit.cscorelib2.item.CustomItem; +import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; +import io.github.thebusybiscuit.slimefun4.implementation.items.VanillaItem; +import io.github.thebusybiscuit.slimefun4.implementation.items.misc.SyntheticEmerald; +import io.github.thebusybiscuit.slimefun4.implementation.listeners.VillagerTradingListener; +import io.github.thebusybiscuit.slimefun4.testing.TestUtilities; +import me.mrCookieSlime.Slimefun.Lists.RecipeType; +import me.mrCookieSlime.Slimefun.Objects.Category; +import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; +import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; + +class TestVillagerTradingListener { + + private static SlimefunPlugin plugin; + private static VillagerTradingListener listener; + private static ServerMock server; + + @BeforeAll + public static void load() { + server = MockBukkit.mock(); + plugin = MockBukkit.load(SlimefunPlugin.class); + listener = new VillagerTradingListener(plugin); + } + + @AfterAll + public static void unload() { + MockBukkit.unmock(); + } + + private InventoryClickEvent mockClickEvent(ItemStack item) { + Player player = server.addPlayer(); + Inventory inv = TestUtilities.mockInventory(InventoryType.MERCHANT); + Mockito.when(inv.getSize()).thenReturn(8); + + InventoryView view = player.openInventory(inv); + view.setCursor(item); + InventoryClickEvent event = new InventoryClickEvent(view, SlotType.CONTAINER, 1, ClickType.LEFT, InventoryAction.PICKUP_ONE); + listener.onPreBrew(event); + return event; + } + + @Test + void testTradingWithoutSlimefunItems() { + InventoryClickEvent event = mockClickEvent(new ItemStack(Material.EMERALD)); + Assertions.assertEquals(Result.ALLOW, event.getResult()); + } + + @Test + void testTradingWithSlimefunItem() { + SlimefunItem item = TestUtilities.mockSlimefunItem(plugin, "MOCKED_FAKE_EMERALD", new CustomItem(Material.EMERALD, "&aFake Emerald")); + item.register(plugin); + + InventoryClickEvent event = mockClickEvent(item.getItem()); + Assertions.assertEquals(Result.DENY, event.getResult()); + } + + @Test + void testTradingWithVanillaItem() { + VanillaItem item = TestUtilities.mockVanillaItem(plugin, Material.EMERALD, true); + item.register(plugin); + + InventoryClickEvent event = mockClickEvent(item.getItem()); + Assertions.assertEquals(Result.ALLOW, event.getResult()); + } + + @Test + void testTradingWithSyntheticEmerald() { + Category category = TestUtilities.getCategory(plugin, "shiny_emeralds"); + SlimefunItemStack stack = new SlimefunItemStack("FAKE_EMERALD", Material.EMERALD, "&aTrade me"); + SyntheticEmerald item = new SyntheticEmerald(category, stack, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[9]); + item.register(plugin); + + InventoryClickEvent event = mockClickEvent(item.getItem()); + Assertions.assertEquals(Result.ALLOW, event.getResult()); + } +} From 485a80f6ef2a94e4467b1a87a4a21c4b7de7ee89 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 9 Aug 2020 11:41:15 +0200 Subject: [PATCH 46/65] Fixes #2209 --- CHANGELOG.md | 1 + .../thebusybiscuit/slimefun4/api/gps/GPSNetwork.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7953b951..870503d15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ * Fixed #2168 * Fixed #2203 * Fixed #2205 +* Fixed #2209 ## Release Candidate 15 (01 Aug 2020) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/gps/GPSNetwork.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/gps/GPSNetwork.java index 511c8e418..9fd78d6b1 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/gps/GPSNetwork.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/gps/GPSNetwork.java @@ -283,6 +283,14 @@ public class GPSNetwork { if (!event.isCancelled()) { String id = ChatColor.stripColor(ChatColors.color(event.getName())).toUpperCase(Locale.ROOT).replace(' ', '_'); + + for (Waypoint wp : profile.getWaypoints()) { + if (wp.getId().equals(id)) { + SlimefunPlugin.getLocalization().sendMessage(p, "gps.waypoint.duplicate", true, msg -> msg.replace("%waypoint%", event.getName())); + return; + } + } + profile.addWaypoint(new Waypoint(profile, id, event.getLocation(), event.getName())); p.playSound(p.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1F, 1F); From bb40017985c5a8d22ba510fab5ac749f5cae608d Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 9 Aug 2020 09:48:03 +0000 Subject: [PATCH 47/65] Translate messages_de.yml via GitLocalize --- src/main/resources/languages/messages_de.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/languages/messages_de.yml b/src/main/resources/languages/messages_de.yml index 2b9f41e0f..1f737aeeb 100644 --- a/src/main/resources/languages/messages_de.yml +++ b/src/main/resources/languages/messages_de.yml @@ -234,6 +234,7 @@ gps: werden unterstützt!)" added: "&aEin neuer Wegpunkt wurde hinzugefügt" max: "&4Du hast die maximale Anzahl an Wegpunkten erreicht" + duplicate: "&4Es existiert bereits ein Wegpunkt mit folgendem Namen: &f%waypoint%" insufficient-complexity: - "&4Unzureichende Komplexität deines GPS-Netzwerkes! Folgende Komplexität wird benötigt: &c%complexity%" @@ -329,5 +330,7 @@ languages: tl: Tagalog brewing_stand: not-working: "&4Items von Slimefun können nicht zum Brauen verwendet werden!" +villagers: + no-trading: "&4Items von Slimefun können nicht zum Handeln verwendet werden!" miner: no-ores: "&eIch konnte leider keine Erze in der Nähe finden!" From adddf4811dcecff36d6290aeb190d68bc05910e7 Mon Sep 17 00:00:00 2001 From: Luu7 Date: Sun, 9 Aug 2020 13:07:04 +0000 Subject: [PATCH 48/65] Translate messages_es.yml via GitLocalize --- src/main/resources/languages/messages_es.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/languages/messages_es.yml b/src/main/resources/languages/messages_es.yml index 497df743d..c8fe3f45c 100644 --- a/src/main/resources/languages/messages_es.yml +++ b/src/main/resources/languages/messages_es.yml @@ -228,6 +228,7 @@ gps: códigos de color!)" added: "&aNuevo waypoint agregado exitosamente." max: "&4Has alcanzado el máximo número de waypoints permitidos." + duplicate: "&4Ya has creado un waypoint llamado: &f%waypoint%" insufficient-complexity: - "&4Complejidad de red GPS insuficiente: &c%complexity%" - "&4a) No tienes una red GPS armada aún." @@ -324,5 +325,7 @@ languages: tl: Tagalog brewing_stand: not-working: "&4¡No puedes usar objetos de Slimefun en un soporte para pociones!" +villagers: + no-trading: "&4No puedes tradear Slimefun items con los aldeanos!" miner: no-ores: "&ePerdón, ¡No encuentro ningún mineral cerca!" From 9175f27fdda7baa639eb1a92de5c7815a2f27c6a Mon Sep 17 00:00:00 2001 From: LinoxGH Date: Sun, 9 Aug 2020 14:59:09 +0000 Subject: [PATCH 49/65] Translate messages_tr.yml via GitLocalize --- src/main/resources/languages/messages_tr.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/languages/messages_tr.yml b/src/main/resources/languages/messages_tr.yml index 0608f4bb9..a600ff98b 100644 --- a/src/main/resources/languages/messages_tr.yml +++ b/src/main/resources/languages/messages_tr.yml @@ -225,6 +225,7 @@ gps: new: "&eLütfen sohbette yeni yer noktanız için bir ad yazın. &7(Renk Kodları destekleniyor!)" added: "&aYeni bir yer noktası başarıyla eklendi" max: "&4Maksimum yer noktası sayısına ulaştınız" + duplicate: "&4Bu adla zaten bir yer noktası yarattınız: &f%waypoint%" insufficient-complexity: - "&4Yetersiz GPS Ağ Gücü: &c%complexity%" - "&4a) Henüz bir GPS Ağı kurulumunuz yok" @@ -320,5 +321,7 @@ languages: tl: Tagalog brewing_stand: not-working: "&4Slimefun eşyalarını simya standında kullanamazsın!" +villagers: + no-trading: "&4Köylülerle Slimefun eşyalarını kullanarak ticaret yapamazsın!" miner: no-ores: "&eÜzgünüm, yakınlarda herhangi bir cevher bulamadım!" From aafa1e7d0c2fc58e43e267e982d646ad9f015f29 Mon Sep 17 00:00:00 2001 From: LinoxGH Date: Sun, 9 Aug 2020 14:59:10 +0000 Subject: [PATCH 50/65] Translate recipes_tr.yml via GitLocalize From 517bd6139e16a7370373128d1065b0cdbaa6dd9a Mon Sep 17 00:00:00 2001 From: Nameless Date: Mon, 10 Aug 2020 06:47:24 +0000 Subject: [PATCH 51/65] Translate messages_zh-CN.yml via GitLocalize --- src/main/resources/languages/messages_zh-CN.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/resources/languages/messages_zh-CN.yml b/src/main/resources/languages/messages_zh-CN.yml index 1a60ee479..458152fee 100644 --- a/src/main/resources/languages/messages_zh-CN.yml +++ b/src/main/resources/languages/messages_zh-CN.yml @@ -213,6 +213,7 @@ gps: new: "&e给你的路径点起个名字吧 &7(支持彩色代码!)" added: "&a成功添加了新的传送点" max: "&4你已到达设置传送点个数的最大上限" + duplicate: "&4你已经创建了一个相同名字的传送点了: &f%waypoint%" insufficient-complexity: - "&4GPS网络复杂度不足: &c%complexity%" - "&4a) 你还没有设置一个 GPS 网络" @@ -284,7 +285,7 @@ languages: zh-CN: 简体中文 (中国) el: 希腊语 he: 希伯来语 - pt-BR: 葡萄牙语 (巴西) + pt: 葡萄牙语 (葡萄牙) ar: 阿拉伯语 af: 南非语 da: 丹麦语 @@ -296,7 +297,7 @@ languages: fa: 波斯语 th: 泰语 ro: 罗马尼亚语 - pt: 葡萄牙语 (葡萄牙) + pt-BR: 葡萄牙语 (巴西) bg: 保加利亚语 ko: 韩语 tr: 土耳其语 @@ -307,5 +308,7 @@ languages: tl: 他加禄语 brewing_stand: not-working: "&4你不能在酿造台中使用 Slimefun 物品!" +villagers: + no-trading: "&4你不能用 Slimefun 的物品和村民交易!" miner: no-ores: "&e抱歉, 周围找不到矿石了!" From d4f04311f956f037f72022e6574296f01db9c792 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Mon, 10 Aug 2020 06:47:25 +0000 Subject: [PATCH 52/65] Translate messages_zh-CN.yml via GitLocalize From 1aaedf0825cbdeeec3d8715407f186f8ba01ba42 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Tue, 11 Aug 2020 11:17:08 +0200 Subject: [PATCH 53/65] [CI skip] Added more Unit Tests --- .../slimefun4/core/guide/SlimefunGuide.java | 9 ++ .../listeners/SlimefunGuideListener.java | 4 +- .../listeners/TestItemPickupListener.java | 137 ++++++++++++++++++ .../tests/listeners/TestPiglinListener.java | 6 +- .../listeners/TestSlimefunGuideListener.java | 71 +++++++++ 5 files changed, 223 insertions(+), 4 deletions(-) create mode 100644 src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestItemPickupListener.java create mode 100644 src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestSlimefunGuideListener.java diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java index 14ff02237..979b9df45 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java @@ -132,4 +132,13 @@ public final class SlimefunGuide { public static boolean isGuideItem(ItemStack item) { return SlimefunUtils.isItemSimilar(item, getItem(SlimefunGuideLayout.CHEST), true) || SlimefunUtils.isItemSimilar(item, getItem(SlimefunGuideLayout.BOOK), true) || SlimefunUtils.isItemSimilar(item, getItem(SlimefunGuideLayout.CHEAT_SHEET), true); } + + public static SlimefunGuideLayout getDefaultLayout() { + if (SlimefunPlugin.getCfg().getBoolean("guide.default-view-book")) { + return SlimefunGuideLayout.BOOK; + } + else { + return SlimefunGuideLayout.CHEST; + } + } } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunGuideListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunGuideListener.java index 760ef9faf..78cf71659 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunGuideListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunGuideListener.java @@ -33,7 +33,7 @@ public class SlimefunGuideListener implements Listener { return; } - SlimefunGuideLayout type = SlimefunPlugin.getCfg().getBoolean("guide.default-view-book") ? SlimefunGuideLayout.BOOK : SlimefunGuideLayout.CHEST; + SlimefunGuideLayout type = SlimefunGuide.getDefaultLayout(); p.getInventory().addItem(SlimefunGuide.getItem(type)); } } @@ -69,7 +69,7 @@ public class SlimefunGuideListener implements Listener { Player p = e.getPlayer(); ItemStack item = e.getItem(); - if (SlimefunUtils.isItemSimilar(item, SlimefunGuide.getItem(layout), true)) { + if (SlimefunUtils.isItemSimilar(item, SlimefunGuide.getItem(layout), true, false)) { e.cancel(); if (!SlimefunPlugin.getWorldSettingsService().isWorldEnabled(p.getWorld())) { diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestItemPickupListener.java b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestItemPickupListener.java new file mode 100644 index 000000000..081f76a84 --- /dev/null +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestItemPickupListener.java @@ -0,0 +1,137 @@ +package io.github.thebusybiscuit.slimefun4.testing.tests.listeners; + +import java.util.UUID; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.bukkit.Material; +import org.bukkit.entity.Item; +import org.bukkit.entity.Player; +import org.bukkit.event.entity.EntityPickupItemEvent; +import org.bukkit.event.inventory.InventoryPickupItemEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + +import be.seeseemelk.mockbukkit.MockBukkit; +import be.seeseemelk.mockbukkit.ServerMock; +import be.seeseemelk.mockbukkit.entity.ItemEntityMock; +import be.seeseemelk.mockbukkit.inventory.ChestInventoryMock; +import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; +import io.github.thebusybiscuit.slimefun4.implementation.listeners.AncientAltarListener; +import io.github.thebusybiscuit.slimefun4.implementation.listeners.ItemPickupListener; +import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; +import me.mrCookieSlime.CSCoreLibPlugin.cscorelib2.item.CustomItem; + +class TestItemPickupListener { + + private static SlimefunPlugin plugin; + private static ItemPickupListener listener; + private static ServerMock server; + + @BeforeAll + public static void load() { + server = MockBukkit.mock(); + plugin = MockBukkit.load(SlimefunPlugin.class); + listener = new ItemPickupListener(plugin); + } + + @AfterAll + public static void unload() { + MockBukkit.unmock(); + } + + @ParameterizedTest + @ValueSource(booleans = { true, false }) + void testNoPickupFlagForEntities(boolean flag) { + Player player = server.addPlayer(); + Item item = new ItemEntityMock(server, UUID.randomUUID(), new ItemStack(Material.COMPASS)); + + if (flag) { + SlimefunUtils.markAsNoPickup(item, "Unit Test"); + } + + EntityPickupItemEvent event = new EntityPickupItemEvent(player, item, 1); + listener.onEntityPickup(event); + + Assertions.assertEquals(flag, event.isCancelled()); + } + + @ParameterizedTest + @ValueSource(booleans = { true, false }) + void testNoPickupFlagForInventories(boolean flag) { + Inventory inventory = new ChestInventoryMock(null, 5); + Item item = new ItemEntityMock(server, UUID.randomUUID(), new ItemStack(Material.COMPASS)); + + if (flag) { + SlimefunUtils.markAsNoPickup(item, "Unit Test"); + } + + InventoryPickupItemEvent event = new InventoryPickupItemEvent(inventory, item); + listener.onHopperPickup(event); + + Assertions.assertEquals(flag, event.isCancelled()); + } + + @ParameterizedTest + @ValueSource(booleans = { true, false }) + void testAltarProbeForEntities(boolean flag) { + Player player = server.addPlayer(); + ItemStack stack; + + if (flag) { + stack = new CustomItem(Material.DIAMOND, AncientAltarListener.ITEM_PREFIX + System.nanoTime()); + } + else { + stack = new CustomItem(Material.DIAMOND, "&5Just a normal named diamond"); + } + + AtomicBoolean removed = new AtomicBoolean(false); + Item item = new ItemEntityMock(server, UUID.randomUUID(), stack) { + + @Override + public void remove() { + removed.set(true); + } + }; + + EntityPickupItemEvent event = new EntityPickupItemEvent(player, item, 1); + listener.onEntityPickup(event); + + Assertions.assertEquals(flag, event.isCancelled()); + Assertions.assertEquals(flag, removed.get()); + } + + @ParameterizedTest + @ValueSource(booleans = { true, false }) + void testAltarProbeForInventories(boolean flag) { + Inventory inventory = new ChestInventoryMock(null, 5); + ItemStack stack; + + if (flag) { + stack = new CustomItem(Material.DIAMOND, AncientAltarListener.ITEM_PREFIX + System.nanoTime()); + } + else { + stack = new CustomItem(Material.DIAMOND, "&5Just a normal named diamond"); + } + + AtomicBoolean removed = new AtomicBoolean(false); + Item item = new ItemEntityMock(server, UUID.randomUUID(), stack) { + + @Override + public void remove() { + removed.set(true); + } + }; + + InventoryPickupItemEvent event = new InventoryPickupItemEvent(inventory, item); + listener.onHopperPickup(event); + + Assertions.assertEquals(flag, event.isCancelled()); + Assertions.assertEquals(flag, removed.get()); + } + +} diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestPiglinListener.java b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestPiglinListener.java index 161d2d1cc..8feb37334 100644 --- a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestPiglinListener.java +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestPiglinListener.java @@ -1,5 +1,7 @@ package io.github.thebusybiscuit.slimefun4.testing.tests.listeners; +import java.util.UUID; + import org.bukkit.Material; import org.bukkit.entity.EntityType; import org.bukkit.entity.Item; @@ -19,6 +21,7 @@ import org.mockito.Mockito; import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; +import be.seeseemelk.mockbukkit.entity.ItemEntityMock; import io.github.thebusybiscuit.cscorelib2.item.CustomItem; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.listeners.PiglinListener; @@ -47,8 +50,7 @@ class TestPiglinListener { Piglin piglin = Mockito.mock(Piglin.class); Mockito.when(piglin.getType()).thenReturn(EntityType.PIGLIN); - Item itemEntity = Mockito.mock(Item.class); - Mockito.when(itemEntity.getItemStack()).thenReturn(item); + Item itemEntity = new ItemEntityMock(server, UUID.randomUUID(), item); return new EntityPickupItemEvent(piglin, itemEntity, 1); } diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestSlimefunGuideListener.java b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestSlimefunGuideListener.java new file mode 100644 index 000000000..aadef5254 --- /dev/null +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/tests/listeners/TestSlimefunGuideListener.java @@ -0,0 +1,71 @@ +package io.github.thebusybiscuit.slimefun4.testing.tests.listeners; + +import java.util.stream.Stream; + +import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.inventory.ItemStack; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import be.seeseemelk.mockbukkit.MockBukkit; +import be.seeseemelk.mockbukkit.ServerMock; +import be.seeseemelk.mockbukkit.entity.PlayerMock; +import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide; +import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; +import io.github.thebusybiscuit.slimefun4.implementation.listeners.SlimefunGuideListener; +import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; + +class TestSlimefunGuideListener { + + private static SlimefunPlugin plugin; + private static ServerMock server; + + @BeforeAll + public static void load() { + server = MockBukkit.mock(); + plugin = MockBukkit.load(SlimefunPlugin.class); + } + + @AfterAll + public static void unload() { + MockBukkit.unmock(); + } + + @ParameterizedTest + @MethodSource("cartesianBooleans") + void testFirstJoin(boolean hasPlayedBefore, boolean giveSlimefunGuide) { + SlimefunGuideListener listener = new SlimefunGuideListener(plugin, giveSlimefunGuide); + PlayerMock player = new PlayerMock(server, "CanIHazGuide"); + + if (hasPlayedBefore) { + player.setLastPlayed(System.currentTimeMillis()); + } + + PlayerJoinEvent event = new PlayerJoinEvent(player, "CanIHazGuide has joined and wants sum guide"); + listener.onJoin(event); + + ItemStack guide = SlimefunGuide.getItem(SlimefunGuide.getDefaultLayout()); + Assertions.assertEquals(!hasPlayedBefore && giveSlimefunGuide, hasSlimefunGuide(player, guide)); + } + + private boolean hasSlimefunGuide(Player player, ItemStack guide) { + return SlimefunUtils.isItemSimilar(player.getInventory().getItem(0), guide, true); + } + + /** + * This returns an {@link Arguments} {@link Stream} of boolean combinations. + * It performs a certesian product on two boolean sets. + * + * @return a {@link Stream} of {@link Arguments} + */ + private static Stream cartesianBooleans() { + Stream stream = Stream.of(true, false); + return stream.flatMap(a -> Stream.of(true, false).map(b -> Arguments.of(a, b))); + } + +} From e406481b985c3ffc3ad5f5e5c52669cc3c6570c8 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Tue, 11 Aug 2020 16:23:31 +0200 Subject: [PATCH 54/65] [CI skip] Replaced the last tabs with spaces --- .../electric/generators/LavaGenerator.java | 28 +- .../setup/SlimefunItemSetup.java | 5616 ++++++++--------- 2 files changed, 2822 insertions(+), 2822 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/generators/LavaGenerator.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/generators/LavaGenerator.java index 8d7f5df9e..89470aa34 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/generators/LavaGenerator.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/generators/LavaGenerator.java @@ -11,23 +11,23 @@ import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; public abstract class LavaGenerator extends AGenerator { - public LavaGenerator(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { - super(category, item, recipeType, recipe); - } - + public LavaGenerator(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + super(category, item, recipeType, recipe); + } + @Override protected void registerDefaultFuelTypes() { - registerFuel(new MachineFuel(40, new ItemStack(Material.LAVA_BUCKET))); - } + registerFuel(new MachineFuel(40, new ItemStack(Material.LAVA_BUCKET))); + } - @Override - public ItemStack getProgressBar() { - return new ItemStack(Material.FLINT_AND_STEEL); - } + @Override + public ItemStack getProgressBar() { + return new ItemStack(Material.FLINT_AND_STEEL); + } - @Override - public String getInventoryTitle() { - return "&4Lava Generator"; - } + @Override + public String getInventoryTitle() { + return "&4Lava Generator"; + } } 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 c07619d3f..cab9e1e9a 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 @@ -218,1976 +218,1976 @@ public final class SlimefunItemSetup { } } - private SlimefunItemSetup() {} + private SlimefunItemSetup() {} - public static void setup(SlimefunPlugin plugin) { - if (registeredItems) { - throw new UnsupportedOperationException("Slimefun Items can only be registered once!"); - } + public static void setup(SlimefunPlugin plugin) { + if (registeredItems) { + throw new UnsupportedOperationException("Slimefun Items can only be registered once!"); + } - registeredItems = true; - DefaultCategories categories = new DefaultCategories(); - - new SlimefunItem(categories.weapons, SlimefunItems.GRANDMAS_WALKING_STICK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.OAK_LOG), null, null, new ItemStack(Material.OAK_LOG), null, null, new ItemStack(Material.OAK_LOG), null}) - .register(plugin); - - new SlimefunItem(categories.weapons, SlimefunItems.GRANDPAS_WALKING_STICK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.LEATHER), new ItemStack(Material.OAK_LOG), new ItemStack(Material.LEATHER), null, new ItemStack(Material.OAK_LOG), null, null, new ItemStack(Material.OAK_LOG), null}) - .register(plugin); - - new PortableCrafter(categories.usefulItems, SlimefunItems.PORTABLE_CRAFTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.BOOK), new ItemStack(Material.CRAFTING_TABLE), null, null, null, null, null, null, null}) - .register(plugin); - - new FortuneCookie(categories.food, SlimefunItems.FORTUNE_COOKIE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.COOKIE), new ItemStack(Material.PAPER), null, null, null, null, null, null, null}) - .register(plugin); - - new DietCookie(categories.food, SlimefunItems.DIET_COOKIE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {new ItemStack(Material.COOKIE), SlimefunItems.ELYTRA_SCALE, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.basicMachines, SlimefunItems.OUTPUT_CHEST, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.LEAD_INGOT, new ItemStack(Material.HOPPER), SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, new ItemStack(Material.CHEST), SlimefunItems.LEAD_INGOT, null, SlimefunItems.LEAD_INGOT, null}) - .register(plugin); - - new EnhancedCraftingTable(categories.basicMachines, SlimefunItems.ENHANCED_CRAFTING_TABLE).register(plugin); - - new PortableDustbin(categories.usefulItems, SlimefunItems.PORTABLE_DUSTBIN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT)}) - .register(plugin); - - new MeatJerky(categories.food, SlimefunItems.BEEF_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_BEEF), null, null, null, null, null, null, null}) - .register(plugin); - - new MeatJerky(categories.food, SlimefunItems.PORK_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_PORKCHOP), null, null, null, null, null, null, null}) - .register(plugin); - - new MeatJerky(categories.food, SlimefunItems.CHICKEN_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_CHICKEN), null, null, null, null, null, null, null}) - .register(plugin); - - new MeatJerky(categories.food, SlimefunItems.MUTTON_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_MUTTON), null, null, null, null, null, null, null}) - .register(plugin); - - new MeatJerky(categories.food, SlimefunItems.RABBIT_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_RABBIT), null, null, null, null, null, null, null}) - .register(plugin); - - new MeatJerky(categories.food, SlimefunItems.FISH_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_COD), null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.food, SlimefunItems.KELP_COOKIE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.DRIED_KELP), null, new ItemStack(Material.DRIED_KELP), new ItemStack(Material.SUGAR), new ItemStack(Material.DRIED_KELP), null, new ItemStack(Material.DRIED_KELP), null}, - new SlimefunItemStack(SlimefunItems.KELP_COOKIE, 2)) - .register(plugin); - - new GrindStone(categories.basicMachines, SlimefunItems.GRIND_STONE).register(plugin); - new ArmorForge(categories.basicMachines, SlimefunItems.ARMOR_FORGE).register(plugin); - - OreCrusher oreCrusher = new OreCrusher(categories.basicMachines, SlimefunItems.ORE_CRUSHER); - oreCrusher.register(plugin); - - new Compressor(categories.basicMachines, SlimefunItems.COMPRESSOR).register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.MAGIC_LUMP_1, RecipeType.GRIND_STONE, - new ItemStack[] {new ItemStack(Material.NETHER_WART), null, null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.MAGIC_LUMP_1, 2)) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.MAGIC_LUMP_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_1, SlimefunItems.MAGIC_LUMP_1, null, SlimefunItems.MAGIC_LUMP_1, SlimefunItems.MAGIC_LUMP_1, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.MAGIC_LUMP_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_2, SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.MAGIC_LUMP_2, SlimefunItems.MAGIC_LUMP_2, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_LUMP_1, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, null, new ItemStack(Material.ENDER_EYE), null, null, null, null}, - new SlimefunItemStack(SlimefunItems.ENDER_LUMP_1, 2)) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_LUMP_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.ENDER_LUMP_1, SlimefunItems.ENDER_LUMP_1, null, SlimefunItems.ENDER_LUMP_1, SlimefunItems.ENDER_LUMP_1, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_LUMP_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.ENDER_LUMP_2, SlimefunItems.ENDER_LUMP_2, null, SlimefunItems.ENDER_LUMP_2, SlimefunItems.ENDER_LUMP_2, null, null, null, null}) - .register(plugin); - - new EnderBackpack(categories.magicalGadgets, SlimefunItems.ENDER_BACKPACK, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.LEATHER), SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.LEATHER), new ItemStack(Material.CHEST), new ItemStack(Material.LEATHER), SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.LEATHER), SlimefunItems.ENDER_LUMP_2}) - .register(plugin); - - new SlimefunItem(categories.magicalArmor, SlimefunItems.ENDER_HELMET, RecipeType.ARMOR_FORGE, - new ItemStack[] {SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.ENDER_EYE), SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.OBSIDIAN), null, null, null}) - .register(plugin); - - new SlimefunItem(categories.magicalArmor, SlimefunItems.ENDER_CHESTPLATE, RecipeType.ARMOR_FORGE, - new ItemStack[] {SlimefunItems.ENDER_LUMP_1, null, SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.OBSIDIAN), new ItemStack(Material.ENDER_EYE), new ItemStack(Material.OBSIDIAN), new ItemStack(Material.OBSIDIAN), new ItemStack(Material.OBSIDIAN), new ItemStack(Material.OBSIDIAN)}) - .register(plugin); - - new SlimefunItem(categories.magicalArmor, SlimefunItems.ENDER_LEGGINGS, RecipeType.ARMOR_FORGE, - new ItemStack[] {SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.ENDER_EYE), SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.OBSIDIAN), new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.OBSIDIAN)}) - .register(plugin); - - new SlimefunItem(categories.magicalArmor, SlimefunItems.ENDER_BOOTS, RecipeType.ARMOR_FORGE, - new ItemStack[] {null, null, null, SlimefunItems.ENDER_LUMP_1, null, SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.OBSIDIAN)}) - .register(plugin); - - new MagicEyeOfEnder(categories.magicalGadgets, SlimefunItems.MAGIC_EYE_OF_ENDER, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.ENDER_PEARL), new ItemStack(Material.ENDER_EYE), new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_2}) - .register(plugin); - - new MagicSugar(categories.food, SlimefunItems.MAGIC_SUGAR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.REDSTONE), new ItemStack(Material.GLOWSTONE_DUST), null, null, null, null, null, null}) - .register(plugin); - - new MonsterJerky(categories.food, SlimefunItems.MONSTER_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.ROTTEN_FLESH), null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_HELMET, RecipeType.ARMOR_FORGE, - new ItemStack[] {new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT), null, null, null}, null) - .register(plugin); - - new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_CHESTPLATE, RecipeType.ARMOR_FORGE, - new ItemStack[] {new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT)}, null) - .register(plugin); - - new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_LEGGINGS, RecipeType.ARMOR_FORGE, - new ItemStack[] {new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT)}, - new PotionEffect[] {new PotionEffect(PotionEffectType.SPEED, 300, 2)}) - .register(plugin); - - new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_BOOTS, RecipeType.ARMOR_FORGE, - new ItemStack[] {null, null, null, new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT)}, - new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP, 300, 5)}) - .register(plugin); - - new SwordOfBeheading(categories.weapons, SlimefunItems.SWORD_OF_BEHEADING, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.EMERALD), null, SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.EMERALD), SlimefunItems.MAGIC_LUMP_2, null, new ItemStack(Material.BLAZE_ROD), null}) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.MAGICAL_BOOK_COVER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.BOOK), SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.MAGIC_LUMP_2, null}) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.MAGICAL_GLASS, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_2, SlimefunItems.GOLD_DUST, SlimefunItems.MAGIC_LUMP_2, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, new ItemStack(Material.GLASS_PANE), SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.MAGIC_LUMP_2, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.MAGIC_LUMP_2}) - .register(plugin); - - new BasicCircuitBoard(categories.technicalComponents, SlimefunItems.BASIC_CIRCUIT_BOARD, RecipeType.MOB_DROP, - new ItemStack[] {null, null, null, null, new CustomItem(SlimefunUtils.getCustomHead("89091d79ea0f59ef7ef94d7bba6e5f17f2f7d4572c44f90f76c4819a714"), "&aIron Golem"), null, null, null, null}) - .register(plugin); - - new UnplaceableBlock(categories.technicalComponents, SlimefunItems.ADVANCED_CIRCUIT_BOARD, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.REDSTONE_BLOCK), SlimefunItems.BASIC_CIRCUIT_BOARD, new ItemStack(Material.REDSTONE_BLOCK), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.LAPIS_BLOCK)}) - .register(plugin); - - new GoldPan(categories.tools, SlimefunItems.GOLD_PAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.STONE), new ItemStack(Material.BOWL), new ItemStack(Material.STONE), new ItemStack(Material.STONE), new ItemStack(Material.STONE), new ItemStack(Material.STONE)}) - .register(plugin); - - new NetherGoldPan(categories.tools, SlimefunItems.NETHER_GOLD_PAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.NETHER_BRICK), SlimefunItems.GOLD_PAN, new ItemStack(Material.NETHER_BRICK), new ItemStack(Material.NETHER_BRICK), new ItemStack(Material.NETHER_BRICK), new ItemStack(Material.NETHER_BRICK)}) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.SIFTED_ORE, RecipeType.GOLD_PAN, - new ItemStack[] {new ItemStack(Material.GRAVEL), null, null, null, null, null, null, null, null}) - .register(plugin); - - new MakeshiftSmeltery(categories.basicMachines, SlimefunItems.MAKESHIFT_SMELTERY).register(plugin); - new Smeltery(categories.basicMachines, SlimefunItems.SMELTERY).register(plugin); - - new SlimefunItem(categories.basicMachines, SlimefunItems.IGNITION_CHAMBER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.IRON_INGOT), new ItemStack(Material.FLINT_AND_STEEL), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), SlimefunItems.BASIC_CIRCUIT_BOARD, new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.OBSERVER), null}) - .register(plugin); - - new PressureChamber(categories.basicMachines, SlimefunItems.PRESSURE_CHAMBER).register(plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.BATTERY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.REDSTONE), null, SlimefunItems.ZINC_INGOT, SlimefunItems.SULFATE, SlimefunItems.COPPER_INGOT, SlimefunItems.ZINC_INGOT, SlimefunItems.SULFATE, SlimefunItems.COPPER_INGOT}) - .register(plugin); - - registerArmorSet(categories.magicalArmor, new ItemStack(Material.GLOWSTONE), new ItemStack[] {SlimefunItems.GLOWSTONE_HELMET, SlimefunItems.GLOWSTONE_CHESTPLATE, SlimefunItems.GLOWSTONE_LEGGINGS, SlimefunItems.GLOWSTONE_BOOTS}, "GLOWSTONE", false, - new PotionEffect[][] { - new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)}, - new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)}, - new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)}, - new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)} - }, plugin); - - registerArmorSet(categories.armor, SlimefunItems.DAMASCUS_STEEL_INGOT, new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_HELMET, SlimefunItems.DAMASCUS_STEEL_CHESTPLATE, SlimefunItems.DAMASCUS_STEEL_LEGGINGS, SlimefunItems.DAMASCUS_STEEL_BOOTS}, "DAMASCUS_STEEL", false, new PotionEffect[0][0], plugin); - - registerArmorSet(categories.armor, SlimefunItems.REINFORCED_ALLOY_INGOT, new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_HELMET, SlimefunItems.REINFORCED_ALLOY_CHESTPLATE, SlimefunItems.REINFORCED_ALLOY_LEGGINGS, SlimefunItems.REINFORCED_ALLOY_BOOTS}, "REINFORCED_ALLOY", false, new PotionEffect[0][0], plugin); - - registerArmorSet(categories.armor, new ItemStack(Material.CACTUS), new ItemStack[] {SlimefunItems.CACTUS_HELMET, SlimefunItems.CACTUS_CHESTPLATE, SlimefunItems.CACTUS_LEGGINGS, SlimefunItems.CACTUS_BOOTS}, "CACTUS", false, new PotionEffect[0][0], plugin); - - new SlimefunItem(categories.resources, SlimefunItems.REINFORCED_ALLOY_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.SOLDER_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.GOLD_24K, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.HARDENED_METAL_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.ALUMINUM_BRONZE_INGOT, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.DAMASCUS_STEEL_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.STEEL_INGOT, SlimefunItems.IRON_DUST, SlimefunItems.CARBON, new ItemStack(Material.IRON_INGOT), null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.STEEL_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.IRON_DUST, SlimefunItems.CARBON, new ItemStack(Material.IRON_INGOT), null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.BRONZE_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.COPPER_DUST, SlimefunItems.TIN_DUST, SlimefunItems.COPPER_INGOT, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.DURALUMIN_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.ALUMINUM_DUST, SlimefunItems.COPPER_DUST, SlimefunItems.ALUMINUM_INGOT, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.BILLON_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.SILVER_DUST, SlimefunItems.COPPER_DUST, SlimefunItems.SILVER_INGOT, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.BRASS_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.COPPER_DUST, SlimefunItems.ZINC_DUST, SlimefunItems.COPPER_INGOT, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.ALUMINUM_BRASS_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.ALUMINUM_DUST, SlimefunItems.BRASS_INGOT, SlimefunItems.ALUMINUM_INGOT, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.ALUMINUM_BRONZE_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.ALUMINUM_DUST, SlimefunItems.BRONZE_INGOT, SlimefunItems.ALUMINUM_INGOT, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.CORINTHIAN_BRONZE_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.SILVER_DUST, SlimefunItems.GOLD_DUST, SlimefunItems.COPPER_DUST, SlimefunItems.BRONZE_INGOT, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.SOLDER_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.LEAD_DUST, SlimefunItems.TIN_DUST, SlimefunItems.LEAD_INGOT, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.SYNTHETIC_SAPPHIRE, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.ALUMINUM_DUST, new ItemStack(Material.GLASS), new ItemStack(Material.GLASS_PANE), SlimefunItems.ALUMINUM_INGOT, new ItemStack(Material.LAPIS_LAZULI), null, null, null, null}) - .setUseableInWorkbench(true) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.SYNTHETIC_DIAMOND, RecipeType.PRESSURE_CHAMBER, - new ItemStack[] {SlimefunItems.CARBON_CHUNK, null, null, null, null, null, null, null, null}) - .setUseableInWorkbench(true) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.RAW_CARBONADO, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.SYNTHETIC_DIAMOND, SlimefunItems.CARBON_CHUNK, new ItemStack(Material.GLASS_PANE), null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.NICKEL_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.IRON_DUST, new ItemStack(Material.IRON_INGOT), SlimefunItems.COPPER_DUST, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.COBALT_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.IRON_DUST, SlimefunItems.COPPER_DUST, SlimefunItems.NICKEL_INGOT, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.CARBONADO, RecipeType.PRESSURE_CHAMBER, - new ItemStack[] {SlimefunItems.RAW_CARBONADO, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.FERROSILICON, RecipeType.SMELTERY, - new ItemStack[] {new ItemStack(Material.IRON_INGOT), SlimefunItems.IRON_DUST, SlimefunItems.SILICON, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.IRON_DUST, RecipeType.ORE_CRUSHER, - new ItemStack[] {new ItemStack(Material.IRON_ORE), null, null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.IRON_DUST, oreCrusher.isOreDoublingEnabled() ? 2 : 1)) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_DUST, RecipeType.ORE_CRUSHER, - new ItemStack[] {new ItemStack(Material.GOLD_ORE), null, null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.GOLD_DUST, oreCrusher.isOreDoublingEnabled() ? 2 : 1)) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.COPPER_DUST, RecipeType.ORE_WASHER, - new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.TIN_DUST, RecipeType.ORE_WASHER, - new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.LEAD_DUST, RecipeType.ORE_WASHER, - new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.SILVER_DUST, RecipeType.ORE_WASHER, - new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.ALUMINUM_DUST, RecipeType.ORE_WASHER, - new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.ZINC_DUST, RecipeType.ORE_WASHER, - new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.MAGNESIUM_DUST, RecipeType.ORE_WASHER, - new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.COPPER_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.COPPER_DUST, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.TIN_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.TIN_DUST, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.SILVER_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.SILVER_DUST, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.LEAD_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.LEAD_DUST, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.ALUMINUM_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.ALUMINUM_DUST, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.ZINC_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.ZINC_DUST, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.MAGNESIUM_INGOT, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.MAGNESIUM_DUST, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.SULFATE, RecipeType.ORE_CRUSHER, - new ItemStack[] {new ItemStack(Material.NETHERRACK, 16), null, null, null, null, null, null, null, null}) - .register(plugin); - - new UnplaceableBlock(categories.resources, SlimefunItems.CARBON, RecipeType.COMPRESSOR, - new ItemStack[] {new ItemStack(Material.COAL, 8), null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.WHEAT_FLOUR, RecipeType.GRIND_STONE, - new ItemStack[] {new ItemStack(Material.WHEAT), null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.STEEL_PLATE, RecipeType.COMPRESSOR, - new ItemStack[] {new SlimefunItemStack(SlimefunItems.STEEL_INGOT, 8), null, null, null, null, null, null, null, null}) - .register(plugin); - - new UnplaceableBlock(categories.resources, SlimefunItems.COMPRESSED_CARBON, RecipeType.COMPRESSOR, - new ItemStack[] {new SlimefunItemStack(SlimefunItems.CARBON, 4), null, null, null, null, null, null, null, null}) - .register(plugin); - - new UnplaceableBlock(categories.resources, SlimefunItems.CARBON_CHUNK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON, new ItemStack(Material.FLINT), SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON}) - .register(plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.STEEL_THRUSTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.REDSTONE), null, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.STEEL_PLATE, new ItemStack(Material.FIRE_CHARGE), SlimefunItems.STEEL_PLATE}) - .register(plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.POWER_CRYSTAL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.REDSTONE), SlimefunItems.SYNTHETIC_SAPPHIRE, new ItemStack(Material.REDSTONE), SlimefunItems.SYNTHETIC_SAPPHIRE, SlimefunItems.SYNTHETIC_DIAMOND, SlimefunItems.SYNTHETIC_SAPPHIRE, new ItemStack(Material.REDSTONE), SlimefunItems.SYNTHETIC_SAPPHIRE, new ItemStack(Material.REDSTONE)}) - .register(plugin); - - new Jetpack(categories.technicalGadgets, SlimefunItems.DURALUMIN_JETPACK, - new ItemStack[] {SlimefunItems.DURALUMIN_INGOT, null, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.35, 20) - .register(plugin); - - new Jetpack(categories.technicalGadgets, SlimefunItems.SOLDER_JETPACK, - new ItemStack[] {SlimefunItems.SOLDER_INGOT, null, SlimefunItems.SOLDER_INGOT, SlimefunItems.SOLDER_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.SOLDER_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.4, 30) - .register(plugin); - - new Jetpack(categories.technicalGadgets, SlimefunItems.BILLON_JETPACK, - new ItemStack[] {SlimefunItems.BILLON_INGOT, null, SlimefunItems.BILLON_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BILLON_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.45, 45) - .register(plugin); - - new Jetpack(categories.technicalGadgets, SlimefunItems.STEEL_JETPACK, - new ItemStack[] {SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.5, 60) - .register(plugin); - - new Jetpack(categories.technicalGadgets, SlimefunItems.DAMASCUS_STEEL_JETPACK, - new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, null, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.55, 75) - .register(plugin); - - new Jetpack(categories.technicalGadgets, SlimefunItems.REINFORCED_ALLOY_JETPACK, - new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, null, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.6, 100) - .register(plugin); - - new Jetpack(categories.technicalGadgets, SlimefunItems.CARBONADO_JETPACK, - new ItemStack[] {SlimefunItems.CARBON_CHUNK, null, SlimefunItems.CARBON_CHUNK, SlimefunItems.CARBONADO, SlimefunItems.POWER_CRYSTAL, SlimefunItems.CARBONADO, SlimefunItems.STEEL_THRUSTER, SlimefunItems.LARGE_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.7, 150) - .register(plugin); - - new Parachute(categories.technicalGadgets, SlimefunItems.PARACHUTE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CHAIN, null, SlimefunItems.CHAIN, null, null, null}) - .register(plugin); - - new HologramProjector(categories.technicalGadgets, SlimefunItems.HOLOGRAM_PROJECTOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.POWER_CRYSTAL, null, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_BRASS_INGOT, null, SlimefunItems.ALUMINUM_BRASS_INGOT, null}, - new SlimefunItemStack(SlimefunItems.HOLOGRAM_PROJECTOR, 3)) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.CHAIN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null, null}, - new SlimefunItemStack(SlimefunItems.CHAIN, 8)) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.HOOK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null, null, null}) - .register(plugin); - - new GrapplingHook(categories.tools, SlimefunItems.GRAPPLING_HOOK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, SlimefunItems.HOOK, null, SlimefunItems.CHAIN, null, SlimefunItems.CHAIN, null, null}) - .register(plugin); - - new MagicWorkbench(categories.basicMachines, SlimefunItems.MAGIC_WORKBENCH).register(plugin); - - new SlimefunItem(categories.magicalGadgets, SlimefunItems.STAFF_ELEMENTAL, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.MAGICAL_BOOK_COVER, SlimefunItems.MAGIC_LUMP_3, null, new ItemStack(Material.STICK), SlimefunItems.MAGICAL_BOOK_COVER, SlimefunItems.MAGIC_LUMP_3, null, null}) - .register(plugin); - - new WindStaff(categories.magicalGadgets, SlimefunItems.STAFF_WIND, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, new ItemStack(Material.FEATHER), SlimefunItems.ENDER_LUMP_3, null, SlimefunItems.STAFF_ELEMENTAL, new ItemStack(Material.FEATHER), SlimefunItems.STAFF_ELEMENTAL, null, null}) - .register(plugin); - - new WaterStaff(categories.magicalGadgets, SlimefunItems.STAFF_WATER, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, new ItemStack(Material.LILY_PAD), SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.STAFF_ELEMENTAL, new ItemStack(Material.LILY_PAD), SlimefunItems.STAFF_ELEMENTAL, null, null}) - .register(plugin); - - String[] multiToolItems = new String[] {"PORTABLE_CRAFTER", "MAGIC_EYE_OF_ENDER", "STAFF_ELEMENTAL_WIND", "GRAPPLING_HOOK"}; - - new MultiTool(categories.technicalGadgets, SlimefunItems.DURALUMIN_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.DURALUMIN_INGOT, null, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.DURALUMIN_INGOT, null, SlimefunItems.DURALUMIN_INGOT, null}, - 20, multiToolItems) - .register(plugin); - - new MultiTool(categories.technicalGadgets, SlimefunItems.SOLDER_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SOLDER_INGOT, null, SlimefunItems.SOLDER_INGOT, SlimefunItems.SOLDER_INGOT, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.SOLDER_INGOT, null, SlimefunItems.SOLDER_INGOT, null}, - 30, multiToolItems) - .register(plugin); - - new MultiTool(categories.technicalGadgets, SlimefunItems.BILLON_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.BILLON_INGOT, null, SlimefunItems.BILLON_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.BILLON_INGOT, null, SlimefunItems.BILLON_INGOT, null}, - 40, multiToolItems) - .register(plugin); - - new MultiTool(categories.technicalGadgets, SlimefunItems.STEEL_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_INGOT, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null}, - 50, multiToolItems) - .register(plugin); - - new MultiTool(categories.technicalGadgets, SlimefunItems.DAMASCUS_STEEL_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, null, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.DAMASCUS_STEEL_INGOT, null, SlimefunItems.DAMASCUS_STEEL_INGOT, null}, - 60, multiToolItems) - .register(plugin); - - new MultiTool(categories.technicalGadgets, SlimefunItems.REINFORCED_ALLOY_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, null, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.REINFORCED_ALLOY_INGOT, null, SlimefunItems.REINFORCED_ALLOY_INGOT, null}, - 75, multiToolItems) - .register(plugin); - - new MultiTool(categories.technicalGadgets, SlimefunItems.CARBONADO_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CARBONADO, null, SlimefunItems.CARBONADO, SlimefunItems.CARBONADO, SlimefunItems.LARGE_CAPACITOR, SlimefunItems.CARBONADO, null, SlimefunItems.CARBONADO, null}, - 100, "PORTABLE_CRAFTER", "MAGIC_EYE_OF_ENDER", "STAFF_ELEMENTAL_WIND", "GRAPPLING_HOOK", "GOLD_PAN", "NETHER_GOLD_PAN") - .register(plugin); - - new OreWasher(categories.basicMachines, SlimefunItems.ORE_WASHER).register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_24K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_22K, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_22K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_20K, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_20K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_18K, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_18K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_16K, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_16K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_14K, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_14K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_12K, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_12K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_10K, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_10K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_8K, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_8K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_6K, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_6K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_4K, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GOLD_4K, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_DUST, null, null, null, null, null, null, null, null}) - .setUseableInWorkbench(true) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.STONE_CHUNK, RecipeType.ORE_WASHER, - new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.SILICON, RecipeType.SMELTERY, - new ItemStack[] {new ItemStack(Material.QUARTZ_BLOCK), null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.SOLAR_PANEL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), SlimefunItems.SILICON, SlimefunItems.SILICON, SlimefunItems.SILICON, SlimefunItems.FERROSILICON, SlimefunItems.FERROSILICON, SlimefunItems.FERROSILICON}) - .register(plugin); - - new SolarHelmet(categories.technicalGadgets, SlimefunItems.SOLAR_HELMET, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.SOLAR_PANEL, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, null, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.MEDIUM_CAPACITOR, null, SlimefunItems.MEDIUM_CAPACITOR}, - 0.1) - .register(plugin); - - new UnplaceableBlock(categories.magicalResources, SlimefunItems.LAVA_CRYSTAL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.BLAZE_POWDER), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.BLAZE_POWDER), SlimefunItems.FIRE_RUNE, new ItemStack(Material.BLAZE_POWDER), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.BLAZE_POWDER), SlimefunItems.MAGIC_LUMP_1}) - .register(plugin); - - new SlimefunItem(categories.magicalGadgets, SlimefunItems.STAFF_FIRE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, null, SlimefunItems.LAVA_CRYSTAL, null, SlimefunItems.STAFF_ELEMENTAL, null, SlimefunItems.STAFF_ELEMENTAL, null, null}) - .register(plugin); - - if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { - new StormStaff(categories.magicalGadgets, SlimefunItems.STAFF_STORM, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {SlimefunItems.LIGHTNING_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.LIGHTNING_RUNE, SlimefunItems.STAFF_WATER, SlimefunItems.MAGIC_SUGAR, SlimefunItems.STAFF_WIND, SlimefunItems.LIGHTNING_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.LIGHTNING_RUNE}) - .register(plugin); - - ItemStack weaknessPotion = new ItemStack(Material.POTION); - PotionMeta meta = (PotionMeta) weaknessPotion.getItemMeta(); - meta.setBasePotionData(new PotionData(PotionType.WEAKNESS, false, false)); - weaknessPotion.setItemMeta(meta); - - new MagicalZombiePills(categories.magicalGadgets, SlimefunItems.MAGICAL_ZOMBIE_PILLS, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {new ItemStack(Material.GOLD_INGOT), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GOLD_INGOT), new ItemStack(Material.APPLE), weaknessPotion, new ItemStack(Material.APPLE), new ItemStack(Material.GOLD_INGOT), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GOLD_INGOT)}, - new SlimefunItemStack(SlimefunItems.MAGICAL_ZOMBIE_PILLS, 2)) - .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}) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.COMMON_TALISMAN, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_2, SlimefunItems.GOLD_8K, SlimefunItems.MAGIC_LUMP_2, null, new ItemStack(Material.EMERALD), null, SlimefunItems.MAGIC_LUMP_2, SlimefunItems.GOLD_8K, SlimefunItems.MAGIC_LUMP_2}) - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_ANVIL, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.ANVIL), SlimefunItems.COMMON_TALISMAN, new ItemStack(Material.ANVIL), SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - true, false, "anvil") - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_MINER, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.SYNTHETIC_SAPPHIRE, SlimefunItems.COMMON_TALISMAN, SlimefunItems.SIFTED_ORE, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - false, false, "miner", 20) - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_HUNTER, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.SYNTHETIC_SAPPHIRE, SlimefunItems.COMMON_TALISMAN, SlimefunItems.MONSTER_JERKY, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - false, false, "hunter", 20) - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_LAVA, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.LAVA_CRYSTAL, SlimefunItems.COMMON_TALISMAN, new ItemStack(Material.LAVA_BUCKET), SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - true, true, "lava", new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 3600, 4)) - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_WATER, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.WATER_BUCKET), SlimefunItems.COMMON_TALISMAN, new ItemStack(Material.FISHING_ROD), SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - true, true, "water", new PotionEffect(PotionEffectType.WATER_BREATHING, 3600, 4)) - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_ANGEL, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.FEATHER), SlimefunItems.COMMON_TALISMAN, new ItemStack(Material.FEATHER), SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - false, true, "angel", 75) - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_FIRE, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.LAVA_CRYSTAL, SlimefunItems.COMMON_TALISMAN, SlimefunItems.LAVA_CRYSTAL, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - true, true, "fire", new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 3600, 4)) - .register(plugin); - - new MagicianTalisman(SlimefunItems.TALISMAN_MAGICIAN, - new ItemStack[] {SlimefunItems.ENDER_LUMP_3, null, SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.ENCHANTING_TABLE), SlimefunItems.COMMON_TALISMAN, new ItemStack(Material.ENCHANTING_TABLE), SlimefunItems.ENDER_LUMP_3, null, SlimefunItems.ENDER_LUMP_3}) - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_TRAVELLER, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.STAFF_WIND, SlimefunItems.TALISMAN_ANGEL, SlimefunItems.STAFF_WIND, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - false, false, "traveller", 60, new PotionEffect(PotionEffectType.SPEED, 3600, 2)) - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_WARRIOR, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.COMMON_TALISMAN, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - true, true, "warrior", new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 3600, 2)) - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_KNIGHT, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.GILDED_IRON, SlimefunItems.TALISMAN_WARRIOR, SlimefunItems.GILDED_IRON, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - "knight", 30, new PotionEffect(PotionEffectType.REGENERATION, 100, 3)) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.GILDED_IRON, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.GOLD_24K, SlimefunItems.IRON_DUST, null, null, null, null, null, null, null}) - .register(plugin); - - new SyntheticEmerald(categories.resources, SlimefunItems.SYNTHETIC_EMERALD, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.SYNTHETIC_SAPPHIRE, SlimefunItems.ALUMINUM_DUST, SlimefunItems.ALUMINUM_INGOT, new ItemStack(Material.GLASS_PANE), null, null, null, null, null}) - .register(plugin); - - registerArmorSet(categories.armor, SlimefunItems.CHAIN, new ItemStack[] { - new ItemStack(Material.CHAINMAIL_HELMET), new ItemStack(Material.CHAINMAIL_CHESTPLATE), new ItemStack(Material.CHAINMAIL_LEGGINGS), new ItemStack(Material.CHAINMAIL_BOOTS) - }, "CHAIN", true, new PotionEffect[0][0], plugin); - - new Talisman(SlimefunItems.TALISMAN_WHIRLWIND, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.STAFF_WIND, SlimefunItems.TALISMAN_TRAVELLER, SlimefunItems.STAFF_WIND, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3} - , false, true, "whirlwind", 60) - .register(plugin); - - new Talisman(SlimefunItems.TALISMAN_WIZARD, - new ItemStack[] {SlimefunItems.ENDER_LUMP_3, null, SlimefunItems.ENDER_LUMP_3, SlimefunItems.MAGIC_EYE_OF_ENDER, SlimefunItems.TALISMAN_MAGICIAN, SlimefunItems.MAGIC_EYE_OF_ENDER, SlimefunItems.ENDER_LUMP_3, null, SlimefunItems.ENDER_LUMP_3}, - false, false, "wizard", 60) - .register(plugin); - - new LumberAxe(categories.tools, SlimefunItems.LUMBER_AXE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.SYNTHETIC_DIAMOND, SlimefunItems.SYNTHETIC_DIAMOND, null, SlimefunItems.SYNTHETIC_EMERALD, SlimefunItems.GILDED_IRON, null, null, SlimefunItems.GILDED_IRON, null}) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.SALT, RecipeType.ORE_WASHER, - new ItemStack[] {new ItemStack(Material.SAND, 2), null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.HEAVY_CREAM, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.MILK_BUCKET), null, null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.HEAVY_CREAM, 2)) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.CHEESE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.MILK_BUCKET), SlimefunItems.SALT, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.BUTTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.HEAVY_CREAM, SlimefunItems.SALT, null, null, null, null, null, null, null}) - .register(plugin); - - registerArmorSet(categories.armor, SlimefunItems.GILDED_IRON, new ItemStack[] { - SlimefunItems.GILDED_IRON_HELMET, SlimefunItems.GILDED_IRON_CHESTPLATE, SlimefunItems.GILDED_IRON_LEGGINGS, SlimefunItems.GILDED_IRON_BOOTS - }, "GILDED_IRON", false, new PotionEffect[0][0], plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.REINFORCED_CLOTH, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.CLOTH, null, SlimefunItems.CLOTH, SlimefunItems.LEAD_INGOT, SlimefunItems.CLOTH, null, SlimefunItems.CLOTH, null}, new SlimefunItemStack(SlimefunItems.REINFORCED_CLOTH, 2)) - .register(plugin); - - new HazmatArmorPiece(categories.armor, SlimefunItems.SCUBA_HELMET, RecipeType.ARMOR_FORGE, - new ItemStack[] {new ItemStack(Material.ORANGE_WOOL), SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.ORANGE_WOOL), SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.GLASS_PANE), SlimefunItems.REINFORCED_CLOTH, null, null, null}, - new PotionEffect[] {new PotionEffect(PotionEffectType.WATER_BREATHING, 300, 1)}) - .register(plugin); - - new HazmatArmorPiece(categories.armor, SlimefunItems.HAZMAT_CHESTPLATE, RecipeType.ARMOR_FORGE, - new ItemStack[] {new ItemStack(Material.ORANGE_WOOL), null, new ItemStack(Material.ORANGE_WOOL), SlimefunItems.REINFORCED_CLOTH, SlimefunItems.REINFORCED_CLOTH, SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.BLACK_WOOL), SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.BLACK_WOOL)}, - new PotionEffect[] {new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 300, 1)}) - .register(plugin); - - new HazmatArmorPiece(categories.armor, SlimefunItems.HAZMAT_LEGGINGS, RecipeType.ARMOR_FORGE, - new ItemStack[] {new ItemStack(Material.BLACK_WOOL), SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.BLACK_WOOL), SlimefunItems.REINFORCED_CLOTH, null, SlimefunItems.REINFORCED_CLOTH, SlimefunItems.REINFORCED_CLOTH, null, SlimefunItems.REINFORCED_CLOTH}, new PotionEffect[0]) - .register(plugin); - - new HazmatArmorPiece(categories.armor, SlimefunItems.HAZMAT_BOOTS, RecipeType.ARMOR_FORGE, - new ItemStack[] {SlimefunItems.REINFORCED_CLOTH, null, SlimefunItems.REINFORCED_CLOTH, SlimefunItems.REINFORCED_CLOTH, null, SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.BLACK_WOOL), null, new ItemStack(Material.BLACK_WOOL)}, new PotionEffect[0]) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.CRUSHED_ORE, RecipeType.ORE_CRUSHER, - new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.PULVERIZED_ORE, RecipeType.ORE_CRUSHER, - new ItemStack[] {SlimefunItems.CRUSHED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.PURE_ORE_CLUSTER, RecipeType.ORE_WASHER, - new ItemStack[] {SlimefunItems.PULVERIZED_ORE, null, null, null, null, null, null, null, null}) - .register(plugin); - - new UnplaceableBlock(categories.misc, SlimefunItems.TINY_URANIUM, RecipeType.ORE_CRUSHER, - new ItemStack[] {SlimefunItems.PURE_ORE_CLUSTER, null, null, null, null, null, null, null, null}) - .register(plugin); - - new RadioactiveItem(categories.misc, Radioactivity.MODERATE, SlimefunItems.SMALL_URANIUM, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM}) - .register(plugin); - - new RadioactiveItem(categories.resources, Radioactivity.HIGH, SlimefunItems.URANIUM, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SMALL_URANIUM, SlimefunItems.SMALL_URANIUM, null, SlimefunItems.SMALL_URANIUM, SlimefunItems.SMALL_URANIUM, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.REDSTONE_ALLOY, RecipeType.SMELTERY, - new ItemStack[] {new ItemStack(Material.REDSTONE), new ItemStack(Material.REDSTONE_BLOCK), SlimefunItems.FERROSILICON, SlimefunItems.HARDENED_METAL_INGOT, null, null, null, null, null}) - .register(plugin); - - registerArmorSet(categories.armor, SlimefunItems.GOLD_12K, new ItemStack[] { - SlimefunItems.GOLD_HELMET, SlimefunItems.GOLD_CHESTPLATE, SlimefunItems.GOLD_LEGGINGS, SlimefunItems.GOLD_BOOTS - }, "GOLD_12K", false, new PotionEffect[0][0], plugin); - - new SlimefunItem(categories.misc, SlimefunItems.CLOTH, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.WHITE_WOOL), null, null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CLOTH, 8)) - .register(plugin); - - new Bandage(categories.usefulItems, SlimefunItems.RAG, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH, new ItemStack(Material.STRING), null, new ItemStack(Material.STRING), SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH}, - new SlimefunItemStack(SlimefunItems.RAG, 2), 0) - .register(plugin); - - new Bandage(categories.usefulItems, SlimefunItems.BANDAGE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.RAG, new ItemStack(Material.STRING), SlimefunItems.RAG, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.BANDAGE, 4), 1) - .register(plugin); - - new Splint(categories.usefulItems, SlimefunItems.SPLINT, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.STICK), new ItemStack(Material.STICK), new ItemStack(Material.STICK), null, new ItemStack(Material.IRON_INGOT), null}, - new SlimefunItemStack(SlimefunItems.SPLINT, 4)) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.TIN_CAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, null, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT}, - new SlimefunItemStack(SlimefunItems.TIN_CAN, 8)) - .register(plugin); - - new Vitamins(categories.usefulItems, SlimefunItems.VITAMINS, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.TIN_CAN, new ItemStack(Material.APPLE), new ItemStack(Material.RED_MUSHROOM), new ItemStack(Material.SUGAR), null, null, null, null, null}) - .register(plugin); - - new Medicine(categories.usefulItems, SlimefunItems.MEDICINE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.VITAMINS, new ItemStack(Material.GLASS_BOTTLE), SlimefunItems.HEAVY_CREAM, null, null, null, null, null, null}) - .register(plugin); - - new SlimefunArmorPiece(categories.technicalGadgets, SlimefunItems.NIGHT_VISION_GOGGLES, RecipeType.ARMOR_FORGE, - new ItemStack[] {new ItemStack(Material.COAL_BLOCK), new ItemStack(Material.COAL_BLOCK), new ItemStack(Material.COAL_BLOCK), new ItemStack(Material.LIME_STAINED_GLASS_PANE), new ItemStack(Material.COAL_BLOCK), new ItemStack(Material.LIME_STAINED_GLASS_PANE), new ItemStack(Material.COAL_BLOCK), null, new ItemStack(Material.COAL_BLOCK)}, - new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 20)}) - .register(plugin); - - new PickaxeOfContainment(categories.tools, SlimefunItems.PICKAXE_OF_CONTAINMENT, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.FERROSILICON, SlimefunItems.FERROSILICON, SlimefunItems.FERROSILICON, null, SlimefunItems.GILDED_IRON, null, null, SlimefunItems.GILDED_IRON, null}) - .register(plugin); - - new HerculesPickaxe(categories.tools, SlimefunItems.HERCULES_PICKAXE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, null, SlimefunItems.FERROSILICON, null, null, SlimefunItems.FERROSILICON, null}) - .register(plugin); + registeredItems = true; + DefaultCategories categories = new DefaultCategories(); - if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { - new TableSaw(categories.basicMachines, SlimefunItems.TABLE_SAW).register(plugin); - } - - new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_HELMET_STEEL, RecipeType.ARMOR_FORGE, - new ItemStack[] {new ItemStack(Material.SLIME_BALL), SlimefunItems.STEEL_PLATE, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), null, null, null}, null) - .register(plugin); - - new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_CHESTPLATE_STEEL, RecipeType.ARMOR_FORGE, - new ItemStack[] {new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), SlimefunItems.STEEL_PLATE, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL)}, null) - .register(plugin); - - new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_LEGGINGS_STEEL, RecipeType.ARMOR_FORGE, - new ItemStack[] {new ItemStack(Material.SLIME_BALL), SlimefunItems.STEEL_PLATE, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL)}, - new PotionEffect[] {new PotionEffect(PotionEffectType.SPEED, 300, 2)}) - .register(plugin); - - new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_BOOTS_STEEL, RecipeType.ARMOR_FORGE, - new ItemStack[] {null, null, null, new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), SlimefunItems.STEEL_PLATE, new ItemStack(Material.SLIME_BALL)}, - new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP, 300, 5)}) - .register(plugin); - - new VampireBlade(categories.weapons, SlimefunItems.BLADE_OF_VAMPIRES, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, new ItemStack(Material.WITHER_SKELETON_SKULL), null, null, new ItemStack(Material.WITHER_SKELETON_SKULL), null, null, new ItemStack(Material.BLAZE_ROD), null}) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.GOLD_24K_BLOCK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K}) - .register(plugin); - - new Composter(categories.basicMachines, SlimefunItems.COMPOSTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.OAK_SLAB), null, new ItemStack(Material.OAK_SLAB), new ItemStack(Material.OAK_SLAB), null, new ItemStack(Material.OAK_SLAB), new ItemStack(Material.OAK_SLAB), new ItemStack(Material.CAULDRON), new ItemStack(Material.OAK_SLAB)}) - .register(plugin); - - new SlimefunItem(categories.magicalArmor, SlimefunItems.FARMER_SHOES, RecipeType.ARMOR_FORGE, - new ItemStack[] {null, null, null, new ItemStack(Material.HAY_BLOCK), null, new ItemStack(Material.HAY_BLOCK), new ItemStack(Material.HAY_BLOCK), null, new ItemStack(Material.HAY_BLOCK)}) - .register(plugin); - - new ExplosivePickaxe(categories.tools, SlimefunItems.EXPLOSIVE_PICKAXE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {new ItemStack(Material.TNT), SlimefunItems.SYNTHETIC_DIAMOND, new ItemStack(Material.TNT), null, SlimefunItems.FERROSILICON, null, null, SlimefunItems.FERROSILICON, null}) - .register(plugin); - - new ExplosiveShovel(categories.tools, SlimefunItems.EXPLOSIVE_SHOVEL, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.SYNTHETIC_DIAMOND, null, null, new ItemStack(Material.TNT), null, null, SlimefunItems.FERROSILICON, null}) - .register(plugin); - - new AutomatedPanningMachine(categories.basicMachines, SlimefunItems.AUTOMATED_PANNING_MACHINE).register(plugin); - - new IndustrialMiner(categories.basicMachines, SlimefunItems.INDUSTRIAL_MINER, Material.IRON_BLOCK, false, 3).register(plugin); - new AdvancedIndustrialMiner(categories.basicMachines, SlimefunItems.ADVANCED_INDUSTRIAL_MINER).register(plugin); - - new SlimefunItem(categories.magicalArmor, SlimefunItems.BOOTS_OF_THE_STOMPER, RecipeType.ARMOR_FORGE, - new ItemStack[] {null, null, null, new ItemStack(Material.YELLOW_WOOL), null, new ItemStack(Material.YELLOW_WOOL), new ItemStack(Material.PISTON), null, new ItemStack(Material.PISTON)}) - .register(plugin); - - new PickaxeOfTheSeeker(categories.tools, SlimefunItems.PICKAXE_OF_THE_SEEKER, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {new ItemStack(Material.COMPASS), SlimefunItems.SYNTHETIC_DIAMOND, new ItemStack(Material.COMPASS), null, SlimefunItems.FERROSILICON, null, null, SlimefunItems.FERROSILICON, null}) - .register(plugin); - - new SlimefunBackpack(9, categories.usefulItems, SlimefunItems.BACKPACK_SMALL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.LEATHER), null, new ItemStack(Material.LEATHER), SlimefunItems.GOLD_6K, new ItemStack(Material.CHEST), SlimefunItems.GOLD_6K, new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER)}) - .register(plugin); - - new SlimefunBackpack(18, categories.usefulItems, SlimefunItems.BACKPACK_MEDIUM, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.LEATHER), null, new ItemStack(Material.LEATHER), SlimefunItems.GOLD_10K, SlimefunItems.BACKPACK_SMALL, SlimefunItems.GOLD_10K, new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER)}) - .register(plugin); - - new SlimefunBackpack(27, categories.usefulItems, SlimefunItems.BACKPACK_LARGE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.LEATHER), null, new ItemStack(Material.LEATHER), SlimefunItems.GOLD_14K, SlimefunItems.BACKPACK_MEDIUM, SlimefunItems.GOLD_14K, new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER)}) - .register(plugin); - - new SlimefunBackpack(36, categories.usefulItems, SlimefunItems.WOVEN_BACKPACK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CLOTH, null, SlimefunItems.CLOTH, SlimefunItems.GOLD_16K, SlimefunItems.BACKPACK_LARGE, SlimefunItems.GOLD_16K, SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH}) - .register(plugin); - - new Crucible(categories.basicMachines, SlimefunItems.CRUCIBLE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.TERRACOTTA), null, new ItemStack(Material.TERRACOTTA), new ItemStack(Material.TERRACOTTA), null, new ItemStack(Material.TERRACOTTA), new ItemStack(Material.TERRACOTTA), new ItemStack(Material.FLINT_AND_STEEL), new ItemStack(Material.TERRACOTTA)}) - .register(plugin); - - new SlimefunBackpack(45, categories.usefulItems, SlimefunItems.GILDED_BACKPACK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GOLD_22K, null, SlimefunItems.GOLD_22K, new ItemStack(Material.LEATHER), SlimefunItems.WOVEN_BACKPACK, new ItemStack(Material.LEATHER), SlimefunItems.GOLD_22K, null, SlimefunItems.GOLD_22K}) - .register(plugin); - - new SlimefunBackpack(54, categories.usefulItems, SlimefunItems.RADIANT_BACKPACK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GOLD_24K, null, SlimefunItems.GOLD_24K, new ItemStack(Material.LEATHER), SlimefunItems.GILDED_BACKPACK, new ItemStack(Material.LEATHER), SlimefunItems.GOLD_24K, null, SlimefunItems.GOLD_24K}) - .register(plugin); - - new RestoredBackpack(categories.usefulItems).register(plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.MAGNET, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.NICKEL_INGOT, SlimefunItems.ALUMINUM_DUST, SlimefunItems.IRON_DUST, SlimefunItems.COBALT_INGOT, null, null, null, null, null}) - .register(plugin); - - new InfusedMagnet(categories.magicalGadgets, SlimefunItems.INFUSED_MAGNET, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.ENDER_LUMP_2, SlimefunItems.MAGNET, SlimefunItems.ENDER_LUMP_2, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}) - .register(plugin); - - new SlimefunItem(categories.tools, SlimefunItems.COBALT_PICKAXE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.COBALT_INGOT, SlimefunItems.COBALT_INGOT, SlimefunItems.COBALT_INGOT, null, SlimefunItems.NICKEL_INGOT, null, null, SlimefunItems.NICKEL_INGOT, null}) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.NECROTIC_SKULL, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, null, new ItemStack(Material.WITHER_SKELETON_SKULL), null, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.ESSENCE_OF_AFTERLIFE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {SlimefunItems.ENDER_LUMP_3, SlimefunItems.AIR_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.EARTH_RUNE, SlimefunItems.NECROTIC_SKULL, SlimefunItems.FIRE_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.WATER_RUNE, SlimefunItems.ENDER_LUMP_3}) - .register(plugin); - - new SoulboundBackpack(36, categories.magicalGadgets, SlimefunItems.BOUND_BACKPACK, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.ENDER_LUMP_2, null, SlimefunItems.ENDER_LUMP_2, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.WOVEN_BACKPACK, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.ENDER_LUMP_2, null, SlimefunItems.ENDER_LUMP_2}) - .register(plugin); - - new JetBoots(categories.technicalGadgets, SlimefunItems.DURALUMIN_JETBOOTS, - new ItemStack[] {null, null, null, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.35, 20) - .register(plugin); - - new JetBoots(categories.technicalGadgets, SlimefunItems.SOLDER_JETBOOTS, - new ItemStack[] {null, null, null, SlimefunItems.SOLDER_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.SOLDER_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.4, 30) - .register(plugin); - - new JetBoots(categories.technicalGadgets, SlimefunItems.BILLON_JETBOOTS, - new ItemStack[] {null, null, null, SlimefunItems.BILLON_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BILLON_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.45, 40) - .register(plugin); - - new JetBoots(categories.technicalGadgets, SlimefunItems.STEEL_JETBOOTS, - new ItemStack[] {null, null, null, SlimefunItems.STEEL_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.5, 50) - .register(plugin); - - new JetBoots(categories.technicalGadgets, SlimefunItems.DAMASCUS_STEEL_JETBOOTS, - new ItemStack[] {null, null, null, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.55, 75) - .register(plugin); - - new JetBoots(categories.technicalGadgets, SlimefunItems.REINFORCED_ALLOY_JETBOOTS, - new ItemStack[] {null, null, null, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.6, 100) - .register(plugin); - - new JetBoots(categories.technicalGadgets, SlimefunItems.CARBONADO_JETBOOTS, - new ItemStack[] {null, null, null, SlimefunItems.CARBONADO, SlimefunItems.POWER_CRYSTAL, SlimefunItems.CARBONADO, SlimefunItems.STEEL_THRUSTER, SlimefunItems.LARGE_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.7, 125) - .register(plugin); - - new JetBoots(categories.technicalGadgets, SlimefunItems.ARMORED_JETBOOTS, - new ItemStack[] {null, null, null, SlimefunItems.STEEL_PLATE, SlimefunItems.POWER_CRYSTAL, SlimefunItems.STEEL_PLATE, SlimefunItems.STEEL_THRUSTER, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, - 0.45, 50) - .register(plugin); - - new SeismicAxe(categories.weapons, SlimefunItems.SEISMIC_AXE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, null, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.STAFF_ELEMENTAL, null, null, SlimefunItems.STAFF_ELEMENTAL, null}) - .register(plugin); - - new PickaxeOfVeinMining(categories.tools, SlimefunItems.PICKAXE_OF_VEIN_MINING, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {new ItemStack(Material.EMERALD_ORE), SlimefunItems.SYNTHETIC_DIAMOND, new ItemStack(Material.EMERALD_ORE), null, SlimefunItems.GILDED_IRON, null, null, SlimefunItems.GILDED_IRON, null}) - .register(plugin); - - new SoulboundItem(categories.weapons, SlimefunItems.SOULBOUND_SWORD, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_SWORD), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new SoulboundItem(categories.weapons, SlimefunItems.SOULBOUND_TRIDENT, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.TRIDENT), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new SoulboundItem(categories.weapons, SlimefunItems.SOULBOUND_BOW, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.BOW), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new SoulboundItem(categories.tools, SlimefunItems.SOULBOUND_PICKAXE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_PICKAXE), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new SoulboundItem(categories.tools, SlimefunItems.SOULBOUND_AXE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_AXE), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new SoulboundItem(categories.tools, SlimefunItems.SOULBOUND_SHOVEL, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_SHOVEL), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new SoulboundItem(categories.tools, SlimefunItems.SOULBOUND_HOE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_HOE), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new SoulboundItem(categories.magicalArmor, SlimefunItems.SOULBOUND_HELMET, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_HELMET), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new SoulboundItem(categories.magicalArmor, SlimefunItems.SOULBOUND_CHESTPLATE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_CHESTPLATE), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new SoulboundItem(categories.magicalArmor, SlimefunItems.SOULBOUND_LEGGINGS, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_LEGGINGS), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new SoulboundItem(categories.magicalArmor, SlimefunItems.SOULBOUND_BOOTS, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_BOOTS), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); - - new Juicer(categories.basicMachines, SlimefunItems.JUICER).register(plugin); - - new Juice(categories.food, SlimefunItems.APPLE_JUICE, RecipeType.JUICER, - new ItemStack[] {new ItemStack(Material.APPLE), null, null, null, null, null, null, null, null}) - .register(plugin); - - new Juice(categories.food, SlimefunItems.CARROT_JUICE, RecipeType.JUICER, - new ItemStack[] {new ItemStack(Material.CARROT), null, null, null, null, null, null, null, null}) - .register(plugin); - - new Juice(categories.food, SlimefunItems.MELON_JUICE, RecipeType.JUICER, - new ItemStack[] {new ItemStack(Material.MELON_SLICE), null, null, null, null, null, null, null, null}) - .register(plugin); - - new Juice(categories.food, SlimefunItems.PUMPKIN_JUICE, RecipeType.JUICER, - new ItemStack[] {new ItemStack(Material.PUMPKIN), null, null, null, null, null, null, null, null}) - .register(plugin); - - if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { - new Juice(categories.food, SlimefunItems.SWEET_BERRY_JUICE, RecipeType.JUICER, - new ItemStack[] {new ItemStack(Material.SWEET_BERRIES), null, null, null, null, null, null, null, null}) - .register(plugin); - } - - new Juice(categories.food, SlimefunItems.GOLDEN_APPLE_JUICE, RecipeType.JUICER, - new ItemStack[] {new ItemStack(Material.GOLDEN_APPLE), null, null, null, null, null, null, null, null}) - .register(plugin); - - new BrokenSpawner(categories.magicalResources, SlimefunItems.BROKEN_SPAWNER, new RecipeType(new NamespacedKey(plugin, "pickaxe_of_containment"), SlimefunItems.PICKAXE_OF_CONTAINMENT), - new ItemStack[] {null, null, null, null, new ItemStack(Material.SPAWNER), null, null, null, null}) - .register(plugin); - - new RepairedSpawner(categories.magicalGadgets, SlimefunItems.REPAIRED_SPAWNER, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {SlimefunItems.ENDER_RUNE, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.BROKEN_SPAWNER, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.ENDER_RUNE}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 1, 1, 1, SlimefunItems.ENHANCED_FURNACE, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, new ItemStack(Material.FURNACE), SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 2, 1, 1, SlimefunItems.ENHANCED_FURNACE_2, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 2, 2, 1, SlimefunItems.ENHANCED_FURNACE_3, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_2, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 3, 2, 1, SlimefunItems.ENHANCED_FURNACE_4, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_3, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 3, 2, 2, SlimefunItems.ENHANCED_FURNACE_5, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_4, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 3, 3, 2, SlimefunItems.ENHANCED_FURNACE_6, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_5, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 4, 3, 2, SlimefunItems.ENHANCED_FURNACE_7, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_6, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 4, 4, 2, SlimefunItems.ENHANCED_FURNACE_8, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_7, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 5, 4, 2, SlimefunItems.ENHANCED_FURNACE_9, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_8, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 5, 5, 2, SlimefunItems.ENHANCED_FURNACE_10, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_9, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 5, 5, 3, SlimefunItems.ENHANCED_FURNACE_11, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_10, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 10, 10, 3, SlimefunItems.REINFORCED_FURNACE, - new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.ENHANCED_FURNACE_11, SlimefunItems.HEATING_COIL, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.REINFORCED_ALLOY_INGOT}) - .register(plugin); - - new EnhancedFurnace(categories.basicMachines, 20, 10, 3, SlimefunItems.CARBONADO_EDGED_FURNACE, - new ItemStack[] {SlimefunItems.CARBONADO, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.CARBONADO, SlimefunItems.HEATING_COIL, SlimefunItems.REINFORCED_FURNACE, SlimefunItems.HEATING_COIL, SlimefunItems.CARBONADO, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CARBONADO}) - .register(plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.ELECTRO_MAGNET, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.NICKEL_INGOT, SlimefunItems.MAGNET, SlimefunItems.COBALT_INGOT, null, SlimefunItems.BATTERY, null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.ELECTRIC_MOTOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, null, SlimefunItems.ELECTRO_MAGNET, null, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE}) - .register(plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.HEATING_COIL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE}) - .register(plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.COPPER_WIRE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_INGOT, null, null, null}, - new SlimefunItemStack(SlimefunItems.COPPER_WIRE, 8)) - .register(plugin); - - new BlockPlacer(categories.basicMachines, SlimefunItems.BLOCK_PLACER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GOLD_4K, new ItemStack(Material.PISTON), SlimefunItems.GOLD_4K, new ItemStack(Material.IRON_INGOT), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.IRON_INGOT), SlimefunItems.GOLD_4K, new ItemStack(Material.PISTON), SlimefunItems.GOLD_4K}) - .register(plugin); - - new TelepositionScroll(categories.magicalGadgets, SlimefunItems.SCROLL_OF_DIMENSIONAL_TELEPOSITION, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, SlimefunItems.ENDER_LUMP_3, SlimefunItems.MAGIC_EYE_OF_ENDER, SlimefunItems.ENDER_LUMP_3, SlimefunItems.MAGICAL_BOOK_COVER, SlimefunItems.ENDER_LUMP_3, SlimefunItems.MAGIC_EYE_OF_ENDER, SlimefunItems.ENDER_LUMP_3, null}) - .register(plugin); - - new ExplosiveBow(categories.weapons, SlimefunItems.EXPLOSIVE_BOW, - new ItemStack[] {null, new ItemStack(Material.STICK), new ItemStack(Material.GUNPOWDER), SlimefunItems.STAFF_FIRE, null, SlimefunItems.SULFATE, null, new ItemStack(Material.STICK), new ItemStack(Material.GUNPOWDER)}) - .register(plugin); - - new IcyBow(categories.weapons, SlimefunItems.ICY_BOW, - new ItemStack[] {null, new ItemStack(Material.STICK), new ItemStack(Material.ICE), SlimefunItems.STAFF_WATER, null, new ItemStack(Material.PACKED_ICE), null, new ItemStack(Material.STICK), new ItemStack(Material.ICE)}) - .register(plugin); - - new KnowledgeTome(categories.magicalGadgets, SlimefunItems.TOME_OF_KNOWLEDGE_SHARING, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, new ItemStack(Material.FEATHER), null, new ItemStack(Material.INK_SAC), SlimefunItems.MAGICAL_BOOK_COVER, new ItemStack(Material.GLASS_BOTTLE), null, new ItemStack(Material.WRITABLE_BOOK), null}) - .register(plugin); - - new KnowledgeFlask(categories.magicalGadgets, SlimefunItems.FLASK_OF_KNOWLEDGE, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, null, null, SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GLASS_PANE), SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.MAGIC_LUMP_2, null}, - new SlimefunItemStack(SlimefunItems.FLASK_OF_KNOWLEDGE, 8)) - .register(plugin); - - new BirthdayCake(categories.birthday, new SlimefunItemStack("BIRTHDAY_CAKE", Material.CAKE, "&bBirthday Cake"), RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.TORCH), null, new ItemStack(Material.SUGAR), new ItemStack(Material.CAKE), new ItemStack(Material.SUGAR), null, null, null}) - .register(plugin); - - new Juice(categories.christmas, SlimefunItems.CHRISTMAS_MILK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.MILK_BUCKET), new ItemStack(Material.GLASS_BOTTLE), null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_MILK, 4)) - .register(plugin); - - new Juice(categories.christmas, SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CHRISTMAS_MILK, new ItemStack(Material.COCOA_BEANS), null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, 2)) - .register(plugin); - - new Juice(categories.christmas, SlimefunItems.CHRISTMAS_EGG_NOG, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CHRISTMAS_MILK, new ItemStack(Material.EGG), null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_EGG_NOG, 2)) - .register(plugin); - - new Juice(categories.christmas, SlimefunItems.CHRISTMAS_APPLE_CIDER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.APPLE_JUICE, new ItemStack(Material.SUGAR), null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_CIDER, 2)) - .register(plugin); - - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_COOKIE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.COOKIE), new ItemStack(Material.SUGAR), new ItemStack(Material.LIME_DYE), null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_COOKIE, 16)) - .register(plugin); - - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_FRUIT_CAKE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.EGG), new ItemStack(Material.APPLE), new ItemStack(Material.MELON), new ItemStack(Material.SUGAR), null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_FRUIT_CAKE, 4)) - .register(plugin); - - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_APPLE_PIE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.APPLE), new ItemStack(Material.EGG), null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_PIE, 2)) - .register(plugin); - - new Juice(categories.christmas, SlimefunItems.CHRISTMAS_HOT_CHOCOLATE, RecipeType.SMELTERY, - new ItemStack[] {SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, null, null, null, null, null, null, null, null}, SlimefunItems.CHRISTMAS_HOT_CHOCOLATE) - .register(plugin); - - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CAKE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.EGG), new ItemStack(Material.SUGAR), SlimefunItems.WHEAT_FLOUR, new ItemStack(Material.MILK_BUCKET), null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_CAKE, 4)) - .register(plugin); - - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CARAMEL, RecipeType.SMELTERY, - new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.SUGAR), null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_CARAMEL, 4)) - .register(plugin); - - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CARAMEL_APPLE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.CHRISTMAS_CARAMEL, null, null, new ItemStack(Material.APPLE), null, null, new ItemStack(Material.STICK), null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_CARAMEL_APPLE, 2)) - .register(plugin); - - new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.COCOA_BEANS), null, null, new ItemStack(Material.APPLE), null, null, new ItemStack(Material.STICK), null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, 2)) - .register(plugin); - - new ChristmasPresent(categories.christmas, SlimefunItems.CHRISTMAS_PRESENT, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, new ItemStack(Material.NAME_TAG), null, new ItemStack(Material.RED_WOOL), new ItemStack(Material.GREEN_WOOL), new ItemStack(Material.RED_WOOL), new ItemStack(Material.RED_WOOL), new ItemStack(Material.GREEN_WOOL), new ItemStack(Material.RED_WOOL)}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_HOT_CHOCOLATE, 1), - new SlimefunItemStack(SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, 4), - new SlimefunItemStack(SlimefunItems.CHRISTMAS_CARAMEL_APPLE, 4), - new SlimefunItemStack(SlimefunItems.CHRISTMAS_CAKE, 4), - new SlimefunItemStack(SlimefunItems.CHRISTMAS_COOKIE, 8), - new SlimefunItemStack(SlimefunItems.CHRISTMAS_PRESENT, 1), - new SlimefunItemStack(SlimefunItems.CHRISTMAS_EGG_NOG, 1), - new SlimefunItemStack(SlimefunItems.CHRISTMAS_MILK, 1), - new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_CIDER, 1), - new SlimefunItemStack(SlimefunItems.CHRISTMAS_FRUIT_CAKE, 4), + new SlimefunItem(categories.weapons, SlimefunItems.GRANDMAS_WALKING_STICK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.OAK_LOG), null, null, new ItemStack(Material.OAK_LOG), null, null, new ItemStack(Material.OAK_LOG), null}) + .register(plugin); + + new SlimefunItem(categories.weapons, SlimefunItems.GRANDPAS_WALKING_STICK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.LEATHER), new ItemStack(Material.OAK_LOG), new ItemStack(Material.LEATHER), null, new ItemStack(Material.OAK_LOG), null, null, new ItemStack(Material.OAK_LOG), null}) + .register(plugin); + + new PortableCrafter(categories.usefulItems, SlimefunItems.PORTABLE_CRAFTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.BOOK), new ItemStack(Material.CRAFTING_TABLE), null, null, null, null, null, null, null}) + .register(plugin); + + new FortuneCookie(categories.food, SlimefunItems.FORTUNE_COOKIE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.COOKIE), new ItemStack(Material.PAPER), null, null, null, null, null, null, null}) + .register(plugin); + + new DietCookie(categories.food, SlimefunItems.DIET_COOKIE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {new ItemStack(Material.COOKIE), SlimefunItems.ELYTRA_SCALE, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.basicMachines, SlimefunItems.OUTPUT_CHEST, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.LEAD_INGOT, new ItemStack(Material.HOPPER), SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, new ItemStack(Material.CHEST), SlimefunItems.LEAD_INGOT, null, SlimefunItems.LEAD_INGOT, null}) + .register(plugin); + + new EnhancedCraftingTable(categories.basicMachines, SlimefunItems.ENHANCED_CRAFTING_TABLE).register(plugin); + + new PortableDustbin(categories.usefulItems, SlimefunItems.PORTABLE_DUSTBIN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT)}) + .register(plugin); + + new MeatJerky(categories.food, SlimefunItems.BEEF_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_BEEF), null, null, null, null, null, null, null}) + .register(plugin); + + new MeatJerky(categories.food, SlimefunItems.PORK_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_PORKCHOP), null, null, null, null, null, null, null}) + .register(plugin); + + new MeatJerky(categories.food, SlimefunItems.CHICKEN_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_CHICKEN), null, null, null, null, null, null, null}) + .register(plugin); + + new MeatJerky(categories.food, SlimefunItems.MUTTON_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_MUTTON), null, null, null, null, null, null, null}) + .register(plugin); + + new MeatJerky(categories.food, SlimefunItems.RABBIT_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_RABBIT), null, null, null, null, null, null, null}) + .register(plugin); + + new MeatJerky(categories.food, SlimefunItems.FISH_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_COD), null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.food, SlimefunItems.KELP_COOKIE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.DRIED_KELP), null, new ItemStack(Material.DRIED_KELP), new ItemStack(Material.SUGAR), new ItemStack(Material.DRIED_KELP), null, new ItemStack(Material.DRIED_KELP), null}, + new SlimefunItemStack(SlimefunItems.KELP_COOKIE, 2)) + .register(plugin); + + new GrindStone(categories.basicMachines, SlimefunItems.GRIND_STONE).register(plugin); + new ArmorForge(categories.basicMachines, SlimefunItems.ARMOR_FORGE).register(plugin); + + OreCrusher oreCrusher = new OreCrusher(categories.basicMachines, SlimefunItems.ORE_CRUSHER); + oreCrusher.register(plugin); + + new Compressor(categories.basicMachines, SlimefunItems.COMPRESSOR).register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.MAGIC_LUMP_1, RecipeType.GRIND_STONE, + new ItemStack[] {new ItemStack(Material.NETHER_WART), null, null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.MAGIC_LUMP_1, 2)) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.MAGIC_LUMP_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_1, SlimefunItems.MAGIC_LUMP_1, null, SlimefunItems.MAGIC_LUMP_1, SlimefunItems.MAGIC_LUMP_1, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.MAGIC_LUMP_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_2, SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.MAGIC_LUMP_2, SlimefunItems.MAGIC_LUMP_2, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_LUMP_1, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, null, new ItemStack(Material.ENDER_EYE), null, null, null, null}, + new SlimefunItemStack(SlimefunItems.ENDER_LUMP_1, 2)) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_LUMP_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.ENDER_LUMP_1, SlimefunItems.ENDER_LUMP_1, null, SlimefunItems.ENDER_LUMP_1, SlimefunItems.ENDER_LUMP_1, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_LUMP_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.ENDER_LUMP_2, SlimefunItems.ENDER_LUMP_2, null, SlimefunItems.ENDER_LUMP_2, SlimefunItems.ENDER_LUMP_2, null, null, null, null}) + .register(plugin); + + new EnderBackpack(categories.magicalGadgets, SlimefunItems.ENDER_BACKPACK, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.LEATHER), SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.LEATHER), new ItemStack(Material.CHEST), new ItemStack(Material.LEATHER), SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.LEATHER), SlimefunItems.ENDER_LUMP_2}) + .register(plugin); + + new SlimefunItem(categories.magicalArmor, SlimefunItems.ENDER_HELMET, RecipeType.ARMOR_FORGE, + new ItemStack[] {SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.ENDER_EYE), SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.OBSIDIAN), null, null, null}) + .register(plugin); + + new SlimefunItem(categories.magicalArmor, SlimefunItems.ENDER_CHESTPLATE, RecipeType.ARMOR_FORGE, + new ItemStack[] {SlimefunItems.ENDER_LUMP_1, null, SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.OBSIDIAN), new ItemStack(Material.ENDER_EYE), new ItemStack(Material.OBSIDIAN), new ItemStack(Material.OBSIDIAN), new ItemStack(Material.OBSIDIAN), new ItemStack(Material.OBSIDIAN)}) + .register(plugin); + + new SlimefunItem(categories.magicalArmor, SlimefunItems.ENDER_LEGGINGS, RecipeType.ARMOR_FORGE, + new ItemStack[] {SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.ENDER_EYE), SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.OBSIDIAN), new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.OBSIDIAN)}) + .register(plugin); + + new SlimefunItem(categories.magicalArmor, SlimefunItems.ENDER_BOOTS, RecipeType.ARMOR_FORGE, + new ItemStack[] {null, null, null, SlimefunItems.ENDER_LUMP_1, null, SlimefunItems.ENDER_LUMP_1, new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.OBSIDIAN)}) + .register(plugin); + + new MagicEyeOfEnder(categories.magicalGadgets, SlimefunItems.MAGIC_EYE_OF_ENDER, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.ENDER_PEARL), new ItemStack(Material.ENDER_EYE), new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_2, new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_2}) + .register(plugin); + + new MagicSugar(categories.food, SlimefunItems.MAGIC_SUGAR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.REDSTONE), new ItemStack(Material.GLOWSTONE_DUST), null, null, null, null, null, null}) + .register(plugin); + + new MonsterJerky(categories.food, SlimefunItems.MONSTER_JERKY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.ROTTEN_FLESH), null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_HELMET, RecipeType.ARMOR_FORGE, + new ItemStack[] {new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT), null, null, null}, null) + .register(plugin); + + new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_CHESTPLATE, RecipeType.ARMOR_FORGE, + new ItemStack[] {new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT)}, null) + .register(plugin); + + new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_LEGGINGS, RecipeType.ARMOR_FORGE, + new ItemStack[] {new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT)}, + new PotionEffect[] {new PotionEffect(PotionEffectType.SPEED, 300, 2)}) + .register(plugin); + + new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_BOOTS, RecipeType.ARMOR_FORGE, + new ItemStack[] {null, null, null, new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT)}, + new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP, 300, 5)}) + .register(plugin); + + new SwordOfBeheading(categories.weapons, SlimefunItems.SWORD_OF_BEHEADING, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.EMERALD), null, SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.EMERALD), SlimefunItems.MAGIC_LUMP_2, null, new ItemStack(Material.BLAZE_ROD), null}) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.MAGICAL_BOOK_COVER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.BOOK), SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.MAGIC_LUMP_2, null}) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.MAGICAL_GLASS, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_2, SlimefunItems.GOLD_DUST, SlimefunItems.MAGIC_LUMP_2, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, new ItemStack(Material.GLASS_PANE), SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.MAGIC_LUMP_2, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.MAGIC_LUMP_2}) + .register(plugin); + + new BasicCircuitBoard(categories.technicalComponents, SlimefunItems.BASIC_CIRCUIT_BOARD, RecipeType.MOB_DROP, + new ItemStack[] {null, null, null, null, new CustomItem(SlimefunUtils.getCustomHead("89091d79ea0f59ef7ef94d7bba6e5f17f2f7d4572c44f90f76c4819a714"), "&aIron Golem"), null, null, null, null}) + .register(plugin); + + new UnplaceableBlock(categories.technicalComponents, SlimefunItems.ADVANCED_CIRCUIT_BOARD, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.REDSTONE_BLOCK), SlimefunItems.BASIC_CIRCUIT_BOARD, new ItemStack(Material.REDSTONE_BLOCK), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.LAPIS_BLOCK), new ItemStack(Material.LAPIS_BLOCK)}) + .register(plugin); + + new GoldPan(categories.tools, SlimefunItems.GOLD_PAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.STONE), new ItemStack(Material.BOWL), new ItemStack(Material.STONE), new ItemStack(Material.STONE), new ItemStack(Material.STONE), new ItemStack(Material.STONE)}) + .register(plugin); + + new NetherGoldPan(categories.tools, SlimefunItems.NETHER_GOLD_PAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.NETHER_BRICK), SlimefunItems.GOLD_PAN, new ItemStack(Material.NETHER_BRICK), new ItemStack(Material.NETHER_BRICK), new ItemStack(Material.NETHER_BRICK), new ItemStack(Material.NETHER_BRICK)}) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.SIFTED_ORE, RecipeType.GOLD_PAN, + new ItemStack[] {new ItemStack(Material.GRAVEL), null, null, null, null, null, null, null, null}) + .register(plugin); + + new MakeshiftSmeltery(categories.basicMachines, SlimefunItems.MAKESHIFT_SMELTERY).register(plugin); + new Smeltery(categories.basicMachines, SlimefunItems.SMELTERY).register(plugin); + + new SlimefunItem(categories.basicMachines, SlimefunItems.IGNITION_CHAMBER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.IRON_INGOT), new ItemStack(Material.FLINT_AND_STEEL), new ItemStack(Material.IRON_INGOT), new ItemStack(Material.IRON_INGOT), SlimefunItems.BASIC_CIRCUIT_BOARD, new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.OBSERVER), null}) + .register(plugin); + + new PressureChamber(categories.basicMachines, SlimefunItems.PRESSURE_CHAMBER).register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.BATTERY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.REDSTONE), null, SlimefunItems.ZINC_INGOT, SlimefunItems.SULFATE, SlimefunItems.COPPER_INGOT, SlimefunItems.ZINC_INGOT, SlimefunItems.SULFATE, SlimefunItems.COPPER_INGOT}) + .register(plugin); + + registerArmorSet(categories.magicalArmor, new ItemStack(Material.GLOWSTONE), new ItemStack[] {SlimefunItems.GLOWSTONE_HELMET, SlimefunItems.GLOWSTONE_CHESTPLATE, SlimefunItems.GLOWSTONE_LEGGINGS, SlimefunItems.GLOWSTONE_BOOTS}, "GLOWSTONE", false, + new PotionEffect[][] { + new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)}, + new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)}, + new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)}, + new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 0)} + }, plugin); + + registerArmorSet(categories.armor, SlimefunItems.DAMASCUS_STEEL_INGOT, new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_HELMET, SlimefunItems.DAMASCUS_STEEL_CHESTPLATE, SlimefunItems.DAMASCUS_STEEL_LEGGINGS, SlimefunItems.DAMASCUS_STEEL_BOOTS}, "DAMASCUS_STEEL", false, new PotionEffect[0][0], plugin); + + registerArmorSet(categories.armor, SlimefunItems.REINFORCED_ALLOY_INGOT, new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_HELMET, SlimefunItems.REINFORCED_ALLOY_CHESTPLATE, SlimefunItems.REINFORCED_ALLOY_LEGGINGS, SlimefunItems.REINFORCED_ALLOY_BOOTS}, "REINFORCED_ALLOY", false, new PotionEffect[0][0], plugin); + + registerArmorSet(categories.armor, new ItemStack(Material.CACTUS), new ItemStack[] {SlimefunItems.CACTUS_HELMET, SlimefunItems.CACTUS_CHESTPLATE, SlimefunItems.CACTUS_LEGGINGS, SlimefunItems.CACTUS_BOOTS}, "CACTUS", false, new PotionEffect[0][0], plugin); + + new SlimefunItem(categories.resources, SlimefunItems.REINFORCED_ALLOY_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.SOLDER_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.GOLD_24K, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.HARDENED_METAL_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.ALUMINUM_BRONZE_INGOT, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.DAMASCUS_STEEL_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.STEEL_INGOT, SlimefunItems.IRON_DUST, SlimefunItems.CARBON, new ItemStack(Material.IRON_INGOT), null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.STEEL_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.IRON_DUST, SlimefunItems.CARBON, new ItemStack(Material.IRON_INGOT), null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.BRONZE_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.COPPER_DUST, SlimefunItems.TIN_DUST, SlimefunItems.COPPER_INGOT, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.DURALUMIN_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.ALUMINUM_DUST, SlimefunItems.COPPER_DUST, SlimefunItems.ALUMINUM_INGOT, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.BILLON_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.SILVER_DUST, SlimefunItems.COPPER_DUST, SlimefunItems.SILVER_INGOT, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.BRASS_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.COPPER_DUST, SlimefunItems.ZINC_DUST, SlimefunItems.COPPER_INGOT, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.ALUMINUM_BRASS_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.ALUMINUM_DUST, SlimefunItems.BRASS_INGOT, SlimefunItems.ALUMINUM_INGOT, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.ALUMINUM_BRONZE_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.ALUMINUM_DUST, SlimefunItems.BRONZE_INGOT, SlimefunItems.ALUMINUM_INGOT, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.CORINTHIAN_BRONZE_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.SILVER_DUST, SlimefunItems.GOLD_DUST, SlimefunItems.COPPER_DUST, SlimefunItems.BRONZE_INGOT, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.SOLDER_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.LEAD_DUST, SlimefunItems.TIN_DUST, SlimefunItems.LEAD_INGOT, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.SYNTHETIC_SAPPHIRE, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.ALUMINUM_DUST, new ItemStack(Material.GLASS), new ItemStack(Material.GLASS_PANE), SlimefunItems.ALUMINUM_INGOT, new ItemStack(Material.LAPIS_LAZULI), null, null, null, null}) + .setUseableInWorkbench(true) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.SYNTHETIC_DIAMOND, RecipeType.PRESSURE_CHAMBER, + new ItemStack[] {SlimefunItems.CARBON_CHUNK, null, null, null, null, null, null, null, null}) + .setUseableInWorkbench(true) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.RAW_CARBONADO, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.SYNTHETIC_DIAMOND, SlimefunItems.CARBON_CHUNK, new ItemStack(Material.GLASS_PANE), null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.NICKEL_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.IRON_DUST, new ItemStack(Material.IRON_INGOT), SlimefunItems.COPPER_DUST, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.COBALT_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.IRON_DUST, SlimefunItems.COPPER_DUST, SlimefunItems.NICKEL_INGOT, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.CARBONADO, RecipeType.PRESSURE_CHAMBER, + new ItemStack[] {SlimefunItems.RAW_CARBONADO, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.FERROSILICON, RecipeType.SMELTERY, + new ItemStack[] {new ItemStack(Material.IRON_INGOT), SlimefunItems.IRON_DUST, SlimefunItems.SILICON, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.IRON_DUST, RecipeType.ORE_CRUSHER, + new ItemStack[] {new ItemStack(Material.IRON_ORE), null, null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.IRON_DUST, oreCrusher.isOreDoublingEnabled() ? 2 : 1)) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_DUST, RecipeType.ORE_CRUSHER, + new ItemStack[] {new ItemStack(Material.GOLD_ORE), null, null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.GOLD_DUST, oreCrusher.isOreDoublingEnabled() ? 2 : 1)) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.COPPER_DUST, RecipeType.ORE_WASHER, + new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.TIN_DUST, RecipeType.ORE_WASHER, + new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.LEAD_DUST, RecipeType.ORE_WASHER, + new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.SILVER_DUST, RecipeType.ORE_WASHER, + new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.ALUMINUM_DUST, RecipeType.ORE_WASHER, + new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.ZINC_DUST, RecipeType.ORE_WASHER, + new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.MAGNESIUM_DUST, RecipeType.ORE_WASHER, + new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.COPPER_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.COPPER_DUST, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.TIN_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.TIN_DUST, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.SILVER_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.SILVER_DUST, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.LEAD_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.LEAD_DUST, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.ALUMINUM_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.ALUMINUM_DUST, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.ZINC_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.ZINC_DUST, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.MAGNESIUM_INGOT, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.MAGNESIUM_DUST, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.SULFATE, RecipeType.ORE_CRUSHER, + new ItemStack[] {new ItemStack(Material.NETHERRACK, 16), null, null, null, null, null, null, null, null}) + .register(plugin); + + new UnplaceableBlock(categories.resources, SlimefunItems.CARBON, RecipeType.COMPRESSOR, + new ItemStack[] {new ItemStack(Material.COAL, 8), null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.WHEAT_FLOUR, RecipeType.GRIND_STONE, + new ItemStack[] {new ItemStack(Material.WHEAT), null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.STEEL_PLATE, RecipeType.COMPRESSOR, + new ItemStack[] {new SlimefunItemStack(SlimefunItems.STEEL_INGOT, 8), null, null, null, null, null, null, null, null}) + .register(plugin); + + new UnplaceableBlock(categories.resources, SlimefunItems.COMPRESSED_CARBON, RecipeType.COMPRESSOR, + new ItemStack[] {new SlimefunItemStack(SlimefunItems.CARBON, 4), null, null, null, null, null, null, null, null}) + .register(plugin); + + new UnplaceableBlock(categories.resources, SlimefunItems.CARBON_CHUNK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON, new ItemStack(Material.FLINT), SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.COMPRESSED_CARBON}) + .register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.STEEL_THRUSTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.REDSTONE), null, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.STEEL_PLATE, new ItemStack(Material.FIRE_CHARGE), SlimefunItems.STEEL_PLATE}) + .register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.POWER_CRYSTAL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.REDSTONE), SlimefunItems.SYNTHETIC_SAPPHIRE, new ItemStack(Material.REDSTONE), SlimefunItems.SYNTHETIC_SAPPHIRE, SlimefunItems.SYNTHETIC_DIAMOND, SlimefunItems.SYNTHETIC_SAPPHIRE, new ItemStack(Material.REDSTONE), SlimefunItems.SYNTHETIC_SAPPHIRE, new ItemStack(Material.REDSTONE)}) + .register(plugin); + + new Jetpack(categories.technicalGadgets, SlimefunItems.DURALUMIN_JETPACK, + new ItemStack[] {SlimefunItems.DURALUMIN_INGOT, null, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.35, 20) + .register(plugin); + + new Jetpack(categories.technicalGadgets, SlimefunItems.SOLDER_JETPACK, + new ItemStack[] {SlimefunItems.SOLDER_INGOT, null, SlimefunItems.SOLDER_INGOT, SlimefunItems.SOLDER_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.SOLDER_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.4, 30) + .register(plugin); + + new Jetpack(categories.technicalGadgets, SlimefunItems.BILLON_JETPACK, + new ItemStack[] {SlimefunItems.BILLON_INGOT, null, SlimefunItems.BILLON_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BILLON_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.45, 45) + .register(plugin); + + new Jetpack(categories.technicalGadgets, SlimefunItems.STEEL_JETPACK, + new ItemStack[] {SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.5, 60) + .register(plugin); + + new Jetpack(categories.technicalGadgets, SlimefunItems.DAMASCUS_STEEL_JETPACK, + new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, null, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.55, 75) + .register(plugin); + + new Jetpack(categories.technicalGadgets, SlimefunItems.REINFORCED_ALLOY_JETPACK, + new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, null, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.6, 100) + .register(plugin); + + new Jetpack(categories.technicalGadgets, SlimefunItems.CARBONADO_JETPACK, + new ItemStack[] {SlimefunItems.CARBON_CHUNK, null, SlimefunItems.CARBON_CHUNK, SlimefunItems.CARBONADO, SlimefunItems.POWER_CRYSTAL, SlimefunItems.CARBONADO, SlimefunItems.STEEL_THRUSTER, SlimefunItems.LARGE_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.7, 150) + .register(plugin); + + new Parachute(categories.technicalGadgets, SlimefunItems.PARACHUTE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CHAIN, null, SlimefunItems.CHAIN, null, null, null}) + .register(plugin); + + new HologramProjector(categories.technicalGadgets, SlimefunItems.HOLOGRAM_PROJECTOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.POWER_CRYSTAL, null, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_BRASS_INGOT, null, SlimefunItems.ALUMINUM_BRASS_INGOT, null}, + new SlimefunItemStack(SlimefunItems.HOLOGRAM_PROJECTOR, 3)) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.CHAIN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null, null}, + new SlimefunItemStack(SlimefunItems.CHAIN, 8)) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.HOOK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null, null, null}) + .register(plugin); + + new GrapplingHook(categories.tools, SlimefunItems.GRAPPLING_HOOK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, SlimefunItems.HOOK, null, SlimefunItems.CHAIN, null, SlimefunItems.CHAIN, null, null}) + .register(plugin); + + new MagicWorkbench(categories.basicMachines, SlimefunItems.MAGIC_WORKBENCH).register(plugin); + + new SlimefunItem(categories.magicalGadgets, SlimefunItems.STAFF_ELEMENTAL, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.MAGICAL_BOOK_COVER, SlimefunItems.MAGIC_LUMP_3, null, new ItemStack(Material.STICK), SlimefunItems.MAGICAL_BOOK_COVER, SlimefunItems.MAGIC_LUMP_3, null, null}) + .register(plugin); + + new WindStaff(categories.magicalGadgets, SlimefunItems.STAFF_WIND, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, new ItemStack(Material.FEATHER), SlimefunItems.ENDER_LUMP_3, null, SlimefunItems.STAFF_ELEMENTAL, new ItemStack(Material.FEATHER), SlimefunItems.STAFF_ELEMENTAL, null, null}) + .register(plugin); + + new WaterStaff(categories.magicalGadgets, SlimefunItems.STAFF_WATER, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, new ItemStack(Material.LILY_PAD), SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.STAFF_ELEMENTAL, new ItemStack(Material.LILY_PAD), SlimefunItems.STAFF_ELEMENTAL, null, null}) + .register(plugin); + + String[] multiToolItems = new String[] {"PORTABLE_CRAFTER", "MAGIC_EYE_OF_ENDER", "STAFF_ELEMENTAL_WIND", "GRAPPLING_HOOK"}; + + new MultiTool(categories.technicalGadgets, SlimefunItems.DURALUMIN_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.DURALUMIN_INGOT, null, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.DURALUMIN_INGOT, null, SlimefunItems.DURALUMIN_INGOT, null}, + 20, multiToolItems) + .register(plugin); + + new MultiTool(categories.technicalGadgets, SlimefunItems.SOLDER_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SOLDER_INGOT, null, SlimefunItems.SOLDER_INGOT, SlimefunItems.SOLDER_INGOT, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.SOLDER_INGOT, null, SlimefunItems.SOLDER_INGOT, null}, + 30, multiToolItems) + .register(plugin); + + new MultiTool(categories.technicalGadgets, SlimefunItems.BILLON_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.BILLON_INGOT, null, SlimefunItems.BILLON_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.BILLON_INGOT, null, SlimefunItems.BILLON_INGOT, null}, + 40, multiToolItems) + .register(plugin); + + new MultiTool(categories.technicalGadgets, SlimefunItems.STEEL_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_INGOT, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, null}, + 50, multiToolItems) + .register(plugin); + + new MultiTool(categories.technicalGadgets, SlimefunItems.DAMASCUS_STEEL_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, null, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.DAMASCUS_STEEL_INGOT, null, SlimefunItems.DAMASCUS_STEEL_INGOT, null}, + 60, multiToolItems) + .register(plugin); + + new MultiTool(categories.technicalGadgets, SlimefunItems.REINFORCED_ALLOY_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, null, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.REINFORCED_ALLOY_INGOT, null, SlimefunItems.REINFORCED_ALLOY_INGOT, null}, + 75, multiToolItems) + .register(plugin); + + new MultiTool(categories.technicalGadgets, SlimefunItems.CARBONADO_MULTI_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CARBONADO, null, SlimefunItems.CARBONADO, SlimefunItems.CARBONADO, SlimefunItems.LARGE_CAPACITOR, SlimefunItems.CARBONADO, null, SlimefunItems.CARBONADO, null}, + 100, "PORTABLE_CRAFTER", "MAGIC_EYE_OF_ENDER", "STAFF_ELEMENTAL_WIND", "GRAPPLING_HOOK", "GOLD_PAN", "NETHER_GOLD_PAN") + .register(plugin); + + new OreWasher(categories.basicMachines, SlimefunItems.ORE_WASHER).register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_24K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_22K, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_22K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_20K, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_20K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_18K, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_18K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_16K, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_16K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_14K, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_14K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_12K, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_12K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_10K, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_10K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_8K, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_8K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_6K, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_6K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, SlimefunItems.GOLD_4K, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GOLD_4K, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_DUST, null, null, null, null, null, null, null, null}) + .setUseableInWorkbench(true) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.STONE_CHUNK, RecipeType.ORE_WASHER, + new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.SILICON, RecipeType.SMELTERY, + new ItemStack[] {new ItemStack(Material.QUARTZ_BLOCK), null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.SOLAR_PANEL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), SlimefunItems.SILICON, SlimefunItems.SILICON, SlimefunItems.SILICON, SlimefunItems.FERROSILICON, SlimefunItems.FERROSILICON, SlimefunItems.FERROSILICON}) + .register(plugin); + + new SolarHelmet(categories.technicalGadgets, SlimefunItems.SOLAR_HELMET, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.SOLAR_PANEL, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, null, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.MEDIUM_CAPACITOR, null, SlimefunItems.MEDIUM_CAPACITOR}, + 0.1) + .register(plugin); + + new UnplaceableBlock(categories.magicalResources, SlimefunItems.LAVA_CRYSTAL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.BLAZE_POWDER), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.BLAZE_POWDER), SlimefunItems.FIRE_RUNE, new ItemStack(Material.BLAZE_POWDER), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.BLAZE_POWDER), SlimefunItems.MAGIC_LUMP_1}) + .register(plugin); + + new SlimefunItem(categories.magicalGadgets, SlimefunItems.STAFF_FIRE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, null, SlimefunItems.LAVA_CRYSTAL, null, SlimefunItems.STAFF_ELEMENTAL, null, SlimefunItems.STAFF_ELEMENTAL, null, null}) + .register(plugin); + + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { + new StormStaff(categories.magicalGadgets, SlimefunItems.STAFF_STORM, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {SlimefunItems.LIGHTNING_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.LIGHTNING_RUNE, SlimefunItems.STAFF_WATER, SlimefunItems.MAGIC_SUGAR, SlimefunItems.STAFF_WIND, SlimefunItems.LIGHTNING_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.LIGHTNING_RUNE}) + .register(plugin); + + ItemStack weaknessPotion = new ItemStack(Material.POTION); + PotionMeta meta = (PotionMeta) weaknessPotion.getItemMeta(); + meta.setBasePotionData(new PotionData(PotionType.WEAKNESS, false, false)); + weaknessPotion.setItemMeta(meta); + + new MagicalZombiePills(categories.magicalGadgets, SlimefunItems.MAGICAL_ZOMBIE_PILLS, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {new ItemStack(Material.GOLD_INGOT), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GOLD_INGOT), new ItemStack(Material.APPLE), weaknessPotion, new ItemStack(Material.APPLE), new ItemStack(Material.GOLD_INGOT), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GOLD_INGOT)}, + new SlimefunItemStack(SlimefunItems.MAGICAL_ZOMBIE_PILLS, 2)) + .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}) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.COMMON_TALISMAN, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_2, SlimefunItems.GOLD_8K, SlimefunItems.MAGIC_LUMP_2, null, new ItemStack(Material.EMERALD), null, SlimefunItems.MAGIC_LUMP_2, SlimefunItems.GOLD_8K, SlimefunItems.MAGIC_LUMP_2}) + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_ANVIL, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.ANVIL), SlimefunItems.COMMON_TALISMAN, new ItemStack(Material.ANVIL), SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, + true, false, "anvil") + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_MINER, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.SYNTHETIC_SAPPHIRE, SlimefunItems.COMMON_TALISMAN, SlimefunItems.SIFTED_ORE, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, + false, false, "miner", 20) + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_HUNTER, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.SYNTHETIC_SAPPHIRE, SlimefunItems.COMMON_TALISMAN, SlimefunItems.MONSTER_JERKY, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, + false, false, "hunter", 20) + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_LAVA, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.LAVA_CRYSTAL, SlimefunItems.COMMON_TALISMAN, new ItemStack(Material.LAVA_BUCKET), SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, + true, true, "lava", new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 3600, 4)) + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_WATER, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.WATER_BUCKET), SlimefunItems.COMMON_TALISMAN, new ItemStack(Material.FISHING_ROD), SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, + true, true, "water", new PotionEffect(PotionEffectType.WATER_BREATHING, 3600, 4)) + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_ANGEL, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.FEATHER), SlimefunItems.COMMON_TALISMAN, new ItemStack(Material.FEATHER), SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, + false, true, "angel", 75) + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_FIRE, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.LAVA_CRYSTAL, SlimefunItems.COMMON_TALISMAN, SlimefunItems.LAVA_CRYSTAL, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, + true, true, "fire", new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 3600, 4)) + .register(plugin); + + new MagicianTalisman(SlimefunItems.TALISMAN_MAGICIAN, + new ItemStack[] {SlimefunItems.ENDER_LUMP_3, null, SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.ENCHANTING_TABLE), SlimefunItems.COMMON_TALISMAN, new ItemStack(Material.ENCHANTING_TABLE), SlimefunItems.ENDER_LUMP_3, null, SlimefunItems.ENDER_LUMP_3}) + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_TRAVELLER, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.STAFF_WIND, SlimefunItems.TALISMAN_ANGEL, SlimefunItems.STAFF_WIND, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, + false, false, "traveller", 60, new PotionEffect(PotionEffectType.SPEED, 3600, 2)) + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_WARRIOR, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.COMMON_TALISMAN, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, + true, true, "warrior", new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 3600, 2)) + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_KNIGHT, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.GILDED_IRON, SlimefunItems.TALISMAN_WARRIOR, SlimefunItems.GILDED_IRON, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, + "knight", 30, new PotionEffect(PotionEffectType.REGENERATION, 100, 3)) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.GILDED_IRON, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.GOLD_24K, SlimefunItems.IRON_DUST, null, null, null, null, null, null, null}) + .register(plugin); + + new SyntheticEmerald(categories.resources, SlimefunItems.SYNTHETIC_EMERALD, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.SYNTHETIC_SAPPHIRE, SlimefunItems.ALUMINUM_DUST, SlimefunItems.ALUMINUM_INGOT, new ItemStack(Material.GLASS_PANE), null, null, null, null, null}) + .register(plugin); + + registerArmorSet(categories.armor, SlimefunItems.CHAIN, new ItemStack[] { + new ItemStack(Material.CHAINMAIL_HELMET), new ItemStack(Material.CHAINMAIL_CHESTPLATE), new ItemStack(Material.CHAINMAIL_LEGGINGS), new ItemStack(Material.CHAINMAIL_BOOTS) + }, "CHAIN", true, new PotionEffect[0][0], plugin); + + new Talisman(SlimefunItems.TALISMAN_WHIRLWIND, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.STAFF_WIND, SlimefunItems.TALISMAN_TRAVELLER, SlimefunItems.STAFF_WIND, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3} + , false, true, "whirlwind", 60) + .register(plugin); + + new Talisman(SlimefunItems.TALISMAN_WIZARD, + new ItemStack[] {SlimefunItems.ENDER_LUMP_3, null, SlimefunItems.ENDER_LUMP_3, SlimefunItems.MAGIC_EYE_OF_ENDER, SlimefunItems.TALISMAN_MAGICIAN, SlimefunItems.MAGIC_EYE_OF_ENDER, SlimefunItems.ENDER_LUMP_3, null, SlimefunItems.ENDER_LUMP_3}, + false, false, "wizard", 60) + .register(plugin); + + new LumberAxe(categories.tools, SlimefunItems.LUMBER_AXE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.SYNTHETIC_DIAMOND, SlimefunItems.SYNTHETIC_DIAMOND, null, SlimefunItems.SYNTHETIC_EMERALD, SlimefunItems.GILDED_IRON, null, null, SlimefunItems.GILDED_IRON, null}) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.SALT, RecipeType.ORE_WASHER, + new ItemStack[] {new ItemStack(Material.SAND, 2), null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.HEAVY_CREAM, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.MILK_BUCKET), null, null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.HEAVY_CREAM, 2)) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.CHEESE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.MILK_BUCKET), SlimefunItems.SALT, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.BUTTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.HEAVY_CREAM, SlimefunItems.SALT, null, null, null, null, null, null, null}) + .register(plugin); + + registerArmorSet(categories.armor, SlimefunItems.GILDED_IRON, new ItemStack[] { + SlimefunItems.GILDED_IRON_HELMET, SlimefunItems.GILDED_IRON_CHESTPLATE, SlimefunItems.GILDED_IRON_LEGGINGS, SlimefunItems.GILDED_IRON_BOOTS + }, "GILDED_IRON", false, new PotionEffect[0][0], plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.REINFORCED_CLOTH, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.CLOTH, null, SlimefunItems.CLOTH, SlimefunItems.LEAD_INGOT, SlimefunItems.CLOTH, null, SlimefunItems.CLOTH, null}, new SlimefunItemStack(SlimefunItems.REINFORCED_CLOTH, 2)) + .register(plugin); + + new HazmatArmorPiece(categories.armor, SlimefunItems.SCUBA_HELMET, RecipeType.ARMOR_FORGE, + new ItemStack[] {new ItemStack(Material.ORANGE_WOOL), SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.ORANGE_WOOL), SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.GLASS_PANE), SlimefunItems.REINFORCED_CLOTH, null, null, null}, + new PotionEffect[] {new PotionEffect(PotionEffectType.WATER_BREATHING, 300, 1)}) + .register(plugin); + + new HazmatArmorPiece(categories.armor, SlimefunItems.HAZMAT_CHESTPLATE, RecipeType.ARMOR_FORGE, + new ItemStack[] {new ItemStack(Material.ORANGE_WOOL), null, new ItemStack(Material.ORANGE_WOOL), SlimefunItems.REINFORCED_CLOTH, SlimefunItems.REINFORCED_CLOTH, SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.BLACK_WOOL), SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.BLACK_WOOL)}, + new PotionEffect[] {new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 300, 1)}) + .register(plugin); + + new HazmatArmorPiece(categories.armor, SlimefunItems.HAZMAT_LEGGINGS, RecipeType.ARMOR_FORGE, + new ItemStack[] {new ItemStack(Material.BLACK_WOOL), SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.BLACK_WOOL), SlimefunItems.REINFORCED_CLOTH, null, SlimefunItems.REINFORCED_CLOTH, SlimefunItems.REINFORCED_CLOTH, null, SlimefunItems.REINFORCED_CLOTH}, new PotionEffect[0]) + .register(plugin); + + new HazmatArmorPiece(categories.armor, SlimefunItems.HAZMAT_BOOTS, RecipeType.ARMOR_FORGE, + new ItemStack[] {SlimefunItems.REINFORCED_CLOTH, null, SlimefunItems.REINFORCED_CLOTH, SlimefunItems.REINFORCED_CLOTH, null, SlimefunItems.REINFORCED_CLOTH, new ItemStack(Material.BLACK_WOOL), null, new ItemStack(Material.BLACK_WOOL)}, new PotionEffect[0]) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.CRUSHED_ORE, RecipeType.ORE_CRUSHER, + new ItemStack[] {SlimefunItems.SIFTED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.PULVERIZED_ORE, RecipeType.ORE_CRUSHER, + new ItemStack[] {SlimefunItems.CRUSHED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.PURE_ORE_CLUSTER, RecipeType.ORE_WASHER, + new ItemStack[] {SlimefunItems.PULVERIZED_ORE, null, null, null, null, null, null, null, null}) + .register(plugin); + + new UnplaceableBlock(categories.misc, SlimefunItems.TINY_URANIUM, RecipeType.ORE_CRUSHER, + new ItemStack[] {SlimefunItems.PURE_ORE_CLUSTER, null, null, null, null, null, null, null, null}) + .register(plugin); + + new RadioactiveItem(categories.misc, Radioactivity.MODERATE, SlimefunItems.SMALL_URANIUM, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM, SlimefunItems.TINY_URANIUM}) + .register(plugin); + + new RadioactiveItem(categories.resources, Radioactivity.HIGH, SlimefunItems.URANIUM, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SMALL_URANIUM, SlimefunItems.SMALL_URANIUM, null, SlimefunItems.SMALL_URANIUM, SlimefunItems.SMALL_URANIUM, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.REDSTONE_ALLOY, RecipeType.SMELTERY, + new ItemStack[] {new ItemStack(Material.REDSTONE), new ItemStack(Material.REDSTONE_BLOCK), SlimefunItems.FERROSILICON, SlimefunItems.HARDENED_METAL_INGOT, null, null, null, null, null}) + .register(plugin); + + registerArmorSet(categories.armor, SlimefunItems.GOLD_12K, new ItemStack[] { + SlimefunItems.GOLD_HELMET, SlimefunItems.GOLD_CHESTPLATE, SlimefunItems.GOLD_LEGGINGS, SlimefunItems.GOLD_BOOTS + }, "GOLD_12K", false, new PotionEffect[0][0], plugin); + + new SlimefunItem(categories.misc, SlimefunItems.CLOTH, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.WHITE_WOOL), null, null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CLOTH, 8)) + .register(plugin); + + new Bandage(categories.usefulItems, SlimefunItems.RAG, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH, new ItemStack(Material.STRING), null, new ItemStack(Material.STRING), SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH}, + new SlimefunItemStack(SlimefunItems.RAG, 2), 0) + .register(plugin); + + new Bandage(categories.usefulItems, SlimefunItems.BANDAGE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.RAG, new ItemStack(Material.STRING), SlimefunItems.RAG, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.BANDAGE, 4), 1) + .register(plugin); + + new Splint(categories.usefulItems, SlimefunItems.SPLINT, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.STICK), new ItemStack(Material.STICK), new ItemStack(Material.STICK), null, new ItemStack(Material.IRON_INGOT), null}, + new SlimefunItemStack(SlimefunItems.SPLINT, 4)) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.TIN_CAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, null, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT, SlimefunItems.TIN_INGOT}, + new SlimefunItemStack(SlimefunItems.TIN_CAN, 8)) + .register(plugin); + + new Vitamins(categories.usefulItems, SlimefunItems.VITAMINS, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.TIN_CAN, new ItemStack(Material.APPLE), new ItemStack(Material.RED_MUSHROOM), new ItemStack(Material.SUGAR), null, null, null, null, null}) + .register(plugin); + + new Medicine(categories.usefulItems, SlimefunItems.MEDICINE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.VITAMINS, new ItemStack(Material.GLASS_BOTTLE), SlimefunItems.HEAVY_CREAM, null, null, null, null, null, null}) + .register(plugin); + + new SlimefunArmorPiece(categories.technicalGadgets, SlimefunItems.NIGHT_VISION_GOGGLES, RecipeType.ARMOR_FORGE, + new ItemStack[] {new ItemStack(Material.COAL_BLOCK), new ItemStack(Material.COAL_BLOCK), new ItemStack(Material.COAL_BLOCK), new ItemStack(Material.LIME_STAINED_GLASS_PANE), new ItemStack(Material.COAL_BLOCK), new ItemStack(Material.LIME_STAINED_GLASS_PANE), new ItemStack(Material.COAL_BLOCK), null, new ItemStack(Material.COAL_BLOCK)}, + new PotionEffect[] {new PotionEffect(PotionEffectType.NIGHT_VISION, 600, 20)}) + .register(plugin); + + new PickaxeOfContainment(categories.tools, SlimefunItems.PICKAXE_OF_CONTAINMENT, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.FERROSILICON, SlimefunItems.FERROSILICON, SlimefunItems.FERROSILICON, null, SlimefunItems.GILDED_IRON, null, null, SlimefunItems.GILDED_IRON, null}) + .register(plugin); + + new HerculesPickaxe(categories.tools, SlimefunItems.HERCULES_PICKAXE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, null, SlimefunItems.FERROSILICON, null, null, SlimefunItems.FERROSILICON, null}) + .register(plugin); + + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { + new TableSaw(categories.basicMachines, SlimefunItems.TABLE_SAW).register(plugin); + } + + new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_HELMET_STEEL, RecipeType.ARMOR_FORGE, + new ItemStack[] {new ItemStack(Material.SLIME_BALL), SlimefunItems.STEEL_PLATE, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), null, null, null}, null) + .register(plugin); + + new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_CHESTPLATE_STEEL, RecipeType.ARMOR_FORGE, + new ItemStack[] {new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), SlimefunItems.STEEL_PLATE, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL)}, null) + .register(plugin); + + new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_LEGGINGS_STEEL, RecipeType.ARMOR_FORGE, + new ItemStack[] {new ItemStack(Material.SLIME_BALL), SlimefunItems.STEEL_PLATE, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL)}, + new PotionEffect[] {new PotionEffect(PotionEffectType.SPEED, 300, 2)}) + .register(plugin); + + new SlimefunArmorPiece(categories.magicalArmor, SlimefunItems.SLIME_BOOTS_STEEL, RecipeType.ARMOR_FORGE, + new ItemStack[] {null, null, null, new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), SlimefunItems.STEEL_PLATE, new ItemStack(Material.SLIME_BALL)}, + new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP, 300, 5)}) + .register(plugin); + + new VampireBlade(categories.weapons, SlimefunItems.BLADE_OF_VAMPIRES, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, new ItemStack(Material.WITHER_SKELETON_SKULL), null, null, new ItemStack(Material.WITHER_SKELETON_SKULL), null, null, new ItemStack(Material.BLAZE_ROD), null}) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.GOLD_24K_BLOCK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K, SlimefunItems.GOLD_24K}) + .register(plugin); + + new Composter(categories.basicMachines, SlimefunItems.COMPOSTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.OAK_SLAB), null, new ItemStack(Material.OAK_SLAB), new ItemStack(Material.OAK_SLAB), null, new ItemStack(Material.OAK_SLAB), new ItemStack(Material.OAK_SLAB), new ItemStack(Material.CAULDRON), new ItemStack(Material.OAK_SLAB)}) + .register(plugin); + + new SlimefunItem(categories.magicalArmor, SlimefunItems.FARMER_SHOES, RecipeType.ARMOR_FORGE, + new ItemStack[] {null, null, null, new ItemStack(Material.HAY_BLOCK), null, new ItemStack(Material.HAY_BLOCK), new ItemStack(Material.HAY_BLOCK), null, new ItemStack(Material.HAY_BLOCK)}) + .register(plugin); + + new ExplosivePickaxe(categories.tools, SlimefunItems.EXPLOSIVE_PICKAXE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {new ItemStack(Material.TNT), SlimefunItems.SYNTHETIC_DIAMOND, new ItemStack(Material.TNT), null, SlimefunItems.FERROSILICON, null, null, SlimefunItems.FERROSILICON, null}) + .register(plugin); + + new ExplosiveShovel(categories.tools, SlimefunItems.EXPLOSIVE_SHOVEL, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.SYNTHETIC_DIAMOND, null, null, new ItemStack(Material.TNT), null, null, SlimefunItems.FERROSILICON, null}) + .register(plugin); + + new AutomatedPanningMachine(categories.basicMachines, SlimefunItems.AUTOMATED_PANNING_MACHINE).register(plugin); + + new IndustrialMiner(categories.basicMachines, SlimefunItems.INDUSTRIAL_MINER, Material.IRON_BLOCK, false, 3).register(plugin); + new AdvancedIndustrialMiner(categories.basicMachines, SlimefunItems.ADVANCED_INDUSTRIAL_MINER).register(plugin); + + new SlimefunItem(categories.magicalArmor, SlimefunItems.BOOTS_OF_THE_STOMPER, RecipeType.ARMOR_FORGE, + new ItemStack[] {null, null, null, new ItemStack(Material.YELLOW_WOOL), null, new ItemStack(Material.YELLOW_WOOL), new ItemStack(Material.PISTON), null, new ItemStack(Material.PISTON)}) + .register(plugin); + + new PickaxeOfTheSeeker(categories.tools, SlimefunItems.PICKAXE_OF_THE_SEEKER, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {new ItemStack(Material.COMPASS), SlimefunItems.SYNTHETIC_DIAMOND, new ItemStack(Material.COMPASS), null, SlimefunItems.FERROSILICON, null, null, SlimefunItems.FERROSILICON, null}) + .register(plugin); + + new SlimefunBackpack(9, categories.usefulItems, SlimefunItems.BACKPACK_SMALL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.LEATHER), null, new ItemStack(Material.LEATHER), SlimefunItems.GOLD_6K, new ItemStack(Material.CHEST), SlimefunItems.GOLD_6K, new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER)}) + .register(plugin); + + new SlimefunBackpack(18, categories.usefulItems, SlimefunItems.BACKPACK_MEDIUM, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.LEATHER), null, new ItemStack(Material.LEATHER), SlimefunItems.GOLD_10K, SlimefunItems.BACKPACK_SMALL, SlimefunItems.GOLD_10K, new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER)}) + .register(plugin); + + new SlimefunBackpack(27, categories.usefulItems, SlimefunItems.BACKPACK_LARGE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.LEATHER), null, new ItemStack(Material.LEATHER), SlimefunItems.GOLD_14K, SlimefunItems.BACKPACK_MEDIUM, SlimefunItems.GOLD_14K, new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER), new ItemStack(Material.LEATHER)}) + .register(plugin); + + new SlimefunBackpack(36, categories.usefulItems, SlimefunItems.WOVEN_BACKPACK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CLOTH, null, SlimefunItems.CLOTH, SlimefunItems.GOLD_16K, SlimefunItems.BACKPACK_LARGE, SlimefunItems.GOLD_16K, SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH}) + .register(plugin); + + new Crucible(categories.basicMachines, SlimefunItems.CRUCIBLE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.TERRACOTTA), null, new ItemStack(Material.TERRACOTTA), new ItemStack(Material.TERRACOTTA), null, new ItemStack(Material.TERRACOTTA), new ItemStack(Material.TERRACOTTA), new ItemStack(Material.FLINT_AND_STEEL), new ItemStack(Material.TERRACOTTA)}) + .register(plugin); + + new SlimefunBackpack(45, categories.usefulItems, SlimefunItems.GILDED_BACKPACK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GOLD_22K, null, SlimefunItems.GOLD_22K, new ItemStack(Material.LEATHER), SlimefunItems.WOVEN_BACKPACK, new ItemStack(Material.LEATHER), SlimefunItems.GOLD_22K, null, SlimefunItems.GOLD_22K}) + .register(plugin); + + new SlimefunBackpack(54, categories.usefulItems, SlimefunItems.RADIANT_BACKPACK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GOLD_24K, null, SlimefunItems.GOLD_24K, new ItemStack(Material.LEATHER), SlimefunItems.GILDED_BACKPACK, new ItemStack(Material.LEATHER), SlimefunItems.GOLD_24K, null, SlimefunItems.GOLD_24K}) + .register(plugin); + + new RestoredBackpack(categories.usefulItems).register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.MAGNET, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.NICKEL_INGOT, SlimefunItems.ALUMINUM_DUST, SlimefunItems.IRON_DUST, SlimefunItems.COBALT_INGOT, null, null, null, null, null}) + .register(plugin); + + new InfusedMagnet(categories.magicalGadgets, SlimefunItems.INFUSED_MAGNET, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.ENDER_LUMP_2, SlimefunItems.MAGNET, SlimefunItems.ENDER_LUMP_2, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}) + .register(plugin); + + new SlimefunItem(categories.tools, SlimefunItems.COBALT_PICKAXE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.COBALT_INGOT, SlimefunItems.COBALT_INGOT, SlimefunItems.COBALT_INGOT, null, SlimefunItems.NICKEL_INGOT, null, null, SlimefunItems.NICKEL_INGOT, null}) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.NECROTIC_SKULL, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, null, new ItemStack(Material.WITHER_SKELETON_SKULL), null, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.ESSENCE_OF_AFTERLIFE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {SlimefunItems.ENDER_LUMP_3, SlimefunItems.AIR_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.EARTH_RUNE, SlimefunItems.NECROTIC_SKULL, SlimefunItems.FIRE_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.WATER_RUNE, SlimefunItems.ENDER_LUMP_3}) + .register(plugin); + + new SoulboundBackpack(36, categories.magicalGadgets, SlimefunItems.BOUND_BACKPACK, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.ENDER_LUMP_2, null, SlimefunItems.ENDER_LUMP_2, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.WOVEN_BACKPACK, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.ENDER_LUMP_2, null, SlimefunItems.ENDER_LUMP_2}) + .register(plugin); + + new JetBoots(categories.technicalGadgets, SlimefunItems.DURALUMIN_JETBOOTS, + new ItemStack[] {null, null, null, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.35, 20) + .register(plugin); + + new JetBoots(categories.technicalGadgets, SlimefunItems.SOLDER_JETBOOTS, + new ItemStack[] {null, null, null, SlimefunItems.SOLDER_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.SOLDER_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.4, 30) + .register(plugin); + + new JetBoots(categories.technicalGadgets, SlimefunItems.BILLON_JETBOOTS, + new ItemStack[] {null, null, null, SlimefunItems.BILLON_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BILLON_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.45, 40) + .register(plugin); + + new JetBoots(categories.technicalGadgets, SlimefunItems.STEEL_JETBOOTS, + new ItemStack[] {null, null, null, SlimefunItems.STEEL_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.5, 50) + .register(plugin); + + new JetBoots(categories.technicalGadgets, SlimefunItems.DAMASCUS_STEEL_JETBOOTS, + new ItemStack[] {null, null, null, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.55, 75) + .register(plugin); + + new JetBoots(categories.technicalGadgets, SlimefunItems.REINFORCED_ALLOY_JETBOOTS, + new ItemStack[] {null, null, null, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.STEEL_THRUSTER, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.6, 100) + .register(plugin); + + new JetBoots(categories.technicalGadgets, SlimefunItems.CARBONADO_JETBOOTS, + new ItemStack[] {null, null, null, SlimefunItems.CARBONADO, SlimefunItems.POWER_CRYSTAL, SlimefunItems.CARBONADO, SlimefunItems.STEEL_THRUSTER, SlimefunItems.LARGE_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.7, 125) + .register(plugin); + + new JetBoots(categories.technicalGadgets, SlimefunItems.ARMORED_JETBOOTS, + new ItemStack[] {null, null, null, SlimefunItems.STEEL_PLATE, SlimefunItems.POWER_CRYSTAL, SlimefunItems.STEEL_PLATE, SlimefunItems.STEEL_THRUSTER, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.STEEL_THRUSTER}, + 0.45, 50) + .register(plugin); + + new SeismicAxe(categories.weapons, SlimefunItems.SEISMIC_AXE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.HARDENED_METAL_INGOT, null, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.STAFF_ELEMENTAL, null, null, SlimefunItems.STAFF_ELEMENTAL, null}) + .register(plugin); + + new PickaxeOfVeinMining(categories.tools, SlimefunItems.PICKAXE_OF_VEIN_MINING, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {new ItemStack(Material.EMERALD_ORE), SlimefunItems.SYNTHETIC_DIAMOND, new ItemStack(Material.EMERALD_ORE), null, SlimefunItems.GILDED_IRON, null, null, SlimefunItems.GILDED_IRON, null}) + .register(plugin); + + new SoulboundItem(categories.weapons, SlimefunItems.SOULBOUND_SWORD, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_SWORD), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new SoulboundItem(categories.weapons, SlimefunItems.SOULBOUND_TRIDENT, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.TRIDENT), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new SoulboundItem(categories.weapons, SlimefunItems.SOULBOUND_BOW, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.BOW), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new SoulboundItem(categories.tools, SlimefunItems.SOULBOUND_PICKAXE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_PICKAXE), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new SoulboundItem(categories.tools, SlimefunItems.SOULBOUND_AXE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_AXE), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new SoulboundItem(categories.tools, SlimefunItems.SOULBOUND_SHOVEL, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_SHOVEL), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new SoulboundItem(categories.tools, SlimefunItems.SOULBOUND_HOE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_HOE), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new SoulboundItem(categories.magicalArmor, SlimefunItems.SOULBOUND_HELMET, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_HELMET), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new SoulboundItem(categories.magicalArmor, SlimefunItems.SOULBOUND_CHESTPLATE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_CHESTPLATE), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new SoulboundItem(categories.magicalArmor, SlimefunItems.SOULBOUND_LEGGINGS, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_LEGGINGS), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new SoulboundItem(categories.magicalArmor, SlimefunItems.SOULBOUND_BOOTS, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_BOOTS), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); + + new Juicer(categories.basicMachines, SlimefunItems.JUICER).register(plugin); + + new Juice(categories.food, SlimefunItems.APPLE_JUICE, RecipeType.JUICER, + new ItemStack[] {new ItemStack(Material.APPLE), null, null, null, null, null, null, null, null}) + .register(plugin); + + new Juice(categories.food, SlimefunItems.CARROT_JUICE, RecipeType.JUICER, + new ItemStack[] {new ItemStack(Material.CARROT), null, null, null, null, null, null, null, null}) + .register(plugin); + + new Juice(categories.food, SlimefunItems.MELON_JUICE, RecipeType.JUICER, + new ItemStack[] {new ItemStack(Material.MELON_SLICE), null, null, null, null, null, null, null, null}) + .register(plugin); + + new Juice(categories.food, SlimefunItems.PUMPKIN_JUICE, RecipeType.JUICER, + new ItemStack[] {new ItemStack(Material.PUMPKIN), null, null, null, null, null, null, null, null}) + .register(plugin); + + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { + new Juice(categories.food, SlimefunItems.SWEET_BERRY_JUICE, RecipeType.JUICER, + new ItemStack[] {new ItemStack(Material.SWEET_BERRIES), null, null, null, null, null, null, null, null}) + .register(plugin); + } + + new Juice(categories.food, SlimefunItems.GOLDEN_APPLE_JUICE, RecipeType.JUICER, + new ItemStack[] {new ItemStack(Material.GOLDEN_APPLE), null, null, null, null, null, null, null, null}) + .register(plugin); + + new BrokenSpawner(categories.magicalResources, SlimefunItems.BROKEN_SPAWNER, new RecipeType(new NamespacedKey(plugin, "pickaxe_of_containment"), SlimefunItems.PICKAXE_OF_CONTAINMENT), + new ItemStack[] {null, null, null, null, new ItemStack(Material.SPAWNER), null, null, null, null}) + .register(plugin); + + new RepairedSpawner(categories.magicalGadgets, SlimefunItems.REPAIRED_SPAWNER, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {SlimefunItems.ENDER_RUNE, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.BROKEN_SPAWNER, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.FILLED_FLASK_OF_KNOWLEDGE, SlimefunItems.ENDER_RUNE}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 1, 1, 1, SlimefunItems.ENHANCED_FURNACE, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, new ItemStack(Material.FURNACE), SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 2, 1, 1, SlimefunItems.ENHANCED_FURNACE_2, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 2, 2, 1, SlimefunItems.ENHANCED_FURNACE_3, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_2, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 3, 2, 1, SlimefunItems.ENHANCED_FURNACE_4, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_3, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 3, 2, 2, SlimefunItems.ENHANCED_FURNACE_5, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_4, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 3, 3, 2, SlimefunItems.ENHANCED_FURNACE_6, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_5, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 4, 3, 2, SlimefunItems.ENHANCED_FURNACE_7, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_6, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 4, 4, 2, SlimefunItems.ENHANCED_FURNACE_8, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_7, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 5, 4, 2, SlimefunItems.ENHANCED_FURNACE_9, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_8, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 5, 5, 2, SlimefunItems.ENHANCED_FURNACE_10, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_9, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 5, 5, 3, SlimefunItems.ENHANCED_FURNACE_11, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.ENHANCED_FURNACE_10, SlimefunItems.HEATING_COIL, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 10, 10, 3, SlimefunItems.REINFORCED_FURNACE, + new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.ENHANCED_FURNACE_11, SlimefunItems.HEATING_COIL, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.REINFORCED_ALLOY_INGOT}) + .register(plugin); + + new EnhancedFurnace(categories.basicMachines, 20, 10, 3, SlimefunItems.CARBONADO_EDGED_FURNACE, + new ItemStack[] {SlimefunItems.CARBONADO, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.CARBONADO, SlimefunItems.HEATING_COIL, SlimefunItems.REINFORCED_FURNACE, SlimefunItems.HEATING_COIL, SlimefunItems.CARBONADO, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CARBONADO}) + .register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.ELECTRO_MAGNET, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.NICKEL_INGOT, SlimefunItems.MAGNET, SlimefunItems.COBALT_INGOT, null, SlimefunItems.BATTERY, null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.ELECTRIC_MOTOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, null, SlimefunItems.ELECTRO_MAGNET, null, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE}) + .register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.HEATING_COIL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE, SlimefunItems.COPPER_WIRE}) + .register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.COPPER_WIRE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_INGOT, null, null, null}, + new SlimefunItemStack(SlimefunItems.COPPER_WIRE, 8)) + .register(plugin); + + new BlockPlacer(categories.basicMachines, SlimefunItems.BLOCK_PLACER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GOLD_4K, new ItemStack(Material.PISTON), SlimefunItems.GOLD_4K, new ItemStack(Material.IRON_INGOT), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.IRON_INGOT), SlimefunItems.GOLD_4K, new ItemStack(Material.PISTON), SlimefunItems.GOLD_4K}) + .register(plugin); + + new TelepositionScroll(categories.magicalGadgets, SlimefunItems.SCROLL_OF_DIMENSIONAL_TELEPOSITION, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, SlimefunItems.ENDER_LUMP_3, SlimefunItems.MAGIC_EYE_OF_ENDER, SlimefunItems.ENDER_LUMP_3, SlimefunItems.MAGICAL_BOOK_COVER, SlimefunItems.ENDER_LUMP_3, SlimefunItems.MAGIC_EYE_OF_ENDER, SlimefunItems.ENDER_LUMP_3, null}) + .register(plugin); + + new ExplosiveBow(categories.weapons, SlimefunItems.EXPLOSIVE_BOW, + new ItemStack[] {null, new ItemStack(Material.STICK), new ItemStack(Material.GUNPOWDER), SlimefunItems.STAFF_FIRE, null, SlimefunItems.SULFATE, null, new ItemStack(Material.STICK), new ItemStack(Material.GUNPOWDER)}) + .register(plugin); + + new IcyBow(categories.weapons, SlimefunItems.ICY_BOW, + new ItemStack[] {null, new ItemStack(Material.STICK), new ItemStack(Material.ICE), SlimefunItems.STAFF_WATER, null, new ItemStack(Material.PACKED_ICE), null, new ItemStack(Material.STICK), new ItemStack(Material.ICE)}) + .register(plugin); + + new KnowledgeTome(categories.magicalGadgets, SlimefunItems.TOME_OF_KNOWLEDGE_SHARING, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, new ItemStack(Material.FEATHER), null, new ItemStack(Material.INK_SAC), SlimefunItems.MAGICAL_BOOK_COVER, new ItemStack(Material.GLASS_BOTTLE), null, new ItemStack(Material.WRITABLE_BOOK), null}) + .register(plugin); + + new KnowledgeFlask(categories.magicalGadgets, SlimefunItems.FLASK_OF_KNOWLEDGE, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, null, null, SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.GLASS_PANE), SlimefunItems.MAGIC_LUMP_2, null, SlimefunItems.MAGIC_LUMP_2, null}, + new SlimefunItemStack(SlimefunItems.FLASK_OF_KNOWLEDGE, 8)) + .register(plugin); + + new BirthdayCake(categories.birthday, new SlimefunItemStack("BIRTHDAY_CAKE", Material.CAKE, "&bBirthday Cake"), RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.TORCH), null, new ItemStack(Material.SUGAR), new ItemStack(Material.CAKE), new ItemStack(Material.SUGAR), null, null, null}) + .register(plugin); + + new Juice(categories.christmas, SlimefunItems.CHRISTMAS_MILK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.MILK_BUCKET), new ItemStack(Material.GLASS_BOTTLE), null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_MILK, 4)) + .register(plugin); + + new Juice(categories.christmas, SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CHRISTMAS_MILK, new ItemStack(Material.COCOA_BEANS), null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, 2)) + .register(plugin); + + new Juice(categories.christmas, SlimefunItems.CHRISTMAS_EGG_NOG, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CHRISTMAS_MILK, new ItemStack(Material.EGG), null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_EGG_NOG, 2)) + .register(plugin); + + new Juice(categories.christmas, SlimefunItems.CHRISTMAS_APPLE_CIDER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.APPLE_JUICE, new ItemStack(Material.SUGAR), null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_CIDER, 2)) + .register(plugin); + + new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_COOKIE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.COOKIE), new ItemStack(Material.SUGAR), new ItemStack(Material.LIME_DYE), null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_COOKIE, 16)) + .register(plugin); + + new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_FRUIT_CAKE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.EGG), new ItemStack(Material.APPLE), new ItemStack(Material.MELON), new ItemStack(Material.SUGAR), null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_FRUIT_CAKE, 4)) + .register(plugin); + + new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_APPLE_PIE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.APPLE), new ItemStack(Material.EGG), null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_PIE, 2)) + .register(plugin); + + new Juice(categories.christmas, SlimefunItems.CHRISTMAS_HOT_CHOCOLATE, RecipeType.SMELTERY, + new ItemStack[] {SlimefunItems.CHRISTMAS_CHOCOLATE_MILK, null, null, null, null, null, null, null, null}, SlimefunItems.CHRISTMAS_HOT_CHOCOLATE) + .register(plugin); + + new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CAKE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.EGG), new ItemStack(Material.SUGAR), SlimefunItems.WHEAT_FLOUR, new ItemStack(Material.MILK_BUCKET), null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CAKE, 4)) + .register(plugin); + + new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CARAMEL, RecipeType.SMELTERY, + new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.SUGAR), null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CARAMEL, 4)) + .register(plugin); + + new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CARAMEL_APPLE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.CHRISTMAS_CARAMEL, null, null, new ItemStack(Material.APPLE), null, null, new ItemStack(Material.STICK), null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CARAMEL_APPLE, 2)) + .register(plugin); + + new SlimefunItem(categories.christmas, SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.COCOA_BEANS), null, null, new ItemStack(Material.APPLE), null, null, new ItemStack(Material.STICK), null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, 2)) + .register(plugin); + + new ChristmasPresent(categories.christmas, SlimefunItems.CHRISTMAS_PRESENT, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, new ItemStack(Material.NAME_TAG), null, new ItemStack(Material.RED_WOOL), new ItemStack(Material.GREEN_WOOL), new ItemStack(Material.RED_WOOL), new ItemStack(Material.RED_WOOL), new ItemStack(Material.GREEN_WOOL), new ItemStack(Material.RED_WOOL)}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_HOT_CHOCOLATE, 1), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CHOCOLATE_APPLE, 4), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CARAMEL_APPLE, 4), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_CAKE, 4), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_COOKIE, 8), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_PRESENT, 1), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_EGG_NOG, 1), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_MILK, 1), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_CIDER, 1), + new SlimefunItemStack(SlimefunItems.CHRISTMAS_FRUIT_CAKE, 4), new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_PIE, 4), new ItemStack(Material.EMERALD) - ).register(plugin); - - new SlimefunItem(categories.easter, SlimefunItems.EASTER_CARROT_PIE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.CARROT), new ItemStack(Material.EGG), null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.EASTER_CARROT_PIE, 2)) - .register(plugin); - - new SlimefunItem(categories.easter, SlimefunItems.EASTER_APPLE_PIE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.APPLE), new ItemStack(Material.EGG), null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_PIE, 2)) - .register(plugin); - - new EasterEgg(categories.easter, SlimefunItems.EASTER_EGG, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.LIME_DYE), new ItemStack(Material.EGG), new ItemStack(Material.PURPLE_DYE), null, null, null}, - new SlimefunItemStack(SlimefunItems.EASTER_EGG, 2), - // Gifts: - new SlimefunItemStack(SlimefunItems.EASTER_CARROT_PIE, 4), - new SlimefunItemStack(SlimefunItems.CARROT_JUICE, 1), - new ItemStack(Material.EMERALD), - new ItemStack(Material.CAKE), - new ItemStack(Material.RABBIT_FOOT), - new ItemStack(Material.GOLDEN_CARROT, 4) - ).register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.REINFORCED_PLATE, RecipeType.COMPRESSOR, - new ItemStack[] {new SlimefunItemStack(SlimefunItems.REINFORCED_ALLOY_INGOT, 8), null, null, null, null, null, null, null, null}) - .register(plugin); - - new HardenedGlass(categories.technicalComponents, SlimefunItems.HARDENED_GLASS, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), SlimefunItems.REINFORCED_PLATE, new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS)}, - new SlimefunItemStack(SlimefunItems.HARDENED_GLASS, 16)) - .register(plugin); - - new SlimefunItem(categories.technicalComponents, SlimefunItems.COOLING_UNIT, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.ICE), new ItemStack(Material.ICE), new ItemStack(Material.ICE), SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_INGOT, new ItemStack(Material.ICE), new ItemStack(Material.ICE), new ItemStack(Material.ICE)}) - .register(plugin); - - new Cooler(27, categories.usefulItems, SlimefunItems.COOLER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.COOLING_UNIT, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_INGOT}) - .register(plugin); - - new WitherProofBlock(categories.technicalComponents, SlimefunItems.WITHER_PROOF_OBSIDIAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.LEAD_INGOT, new ItemStack(Material.OBSIDIAN), SlimefunItems.LEAD_INGOT, new ItemStack(Material.OBSIDIAN), SlimefunItems.HARDENED_GLASS, new ItemStack(Material.OBSIDIAN), SlimefunItems.LEAD_INGOT, new ItemStack(Material.OBSIDIAN), SlimefunItems.LEAD_INGOT}, - new SlimefunItemStack(SlimefunItems.WITHER_PROOF_OBSIDIAN, 4)) - .register(plugin); - - new AncientPedestal(categories.magicalResources, SlimefunItems.ANCIENT_PEDESTAL, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {new ItemStack(Material.OBSIDIAN), SlimefunItems.GOLD_8K, new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.STONE), null, new ItemStack(Material.OBSIDIAN), SlimefunItems.GOLD_8K, new ItemStack(Material.OBSIDIAN)}, - new SlimefunItemStack(SlimefunItems.ANCIENT_PEDESTAL, 4)) - .register(plugin); - - new AncientAltar(categories.magicalGadgets, 8, SlimefunItems.ANCIENT_ALTAR, RecipeType.MAGIC_WORKBENCH, - new ItemStack[] {null, new ItemStack(Material.ENCHANTING_TABLE), null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.GOLD_8K, SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.OBSIDIAN), SlimefunItems.GOLD_8K, new ItemStack(Material.OBSIDIAN)}) - .register(plugin); - - new EnergyRegulator(categories.electricity, SlimefunItems.ENERGY_REGULATOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SILVER_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.SILVER_INGOT}) - .register(plugin); - - new SlimefunItem(categories.misc, SlimefunItems.DUCT_TAPE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.ALUMINUM_DUST, SlimefunItems.ALUMINUM_DUST, SlimefunItems.ALUMINUM_DUST, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.PAPER), new ItemStack(Material.PAPER), new ItemStack(Material.PAPER)}, - new SlimefunItemStack(SlimefunItems.DUCT_TAPE, 2)) - .register(plugin); - - new Capacitor(categories.electricity, 128, SlimefunItems.SMALL_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.DURALUMIN_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.DURALUMIN_INGOT, new ItemStack(Material.REDSTONE), SlimefunItems.SULFATE, new ItemStack(Material.REDSTONE), SlimefunItems.DURALUMIN_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.DURALUMIN_INGOT}) - .register(plugin); - - new Capacitor(categories.electricity, 512, SlimefunItems.MEDIUM_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.BILLON_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.BILLON_INGOT, new ItemStack(Material.REDSTONE), SlimefunItems.SMALL_CAPACITOR, new ItemStack(Material.REDSTONE), SlimefunItems.BILLON_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.BILLON_INGOT}) - .register(plugin); - - new Capacitor(categories.electricity, 1024, SlimefunItems.BIG_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.STEEL_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.STEEL_INGOT, new ItemStack(Material.REDSTONE), SlimefunItems.MEDIUM_CAPACITOR, new ItemStack(Material.REDSTONE), SlimefunItems.STEEL_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.STEEL_INGOT}) - .register(plugin); - - new Capacitor(categories.electricity, 8192, SlimefunItems.LARGE_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.REINFORCED_ALLOY_INGOT, new ItemStack(Material.REDSTONE), SlimefunItems.BIG_CAPACITOR, new ItemStack(Material.REDSTONE), SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.REINFORCED_ALLOY_INGOT}) - .register(plugin); - - new Capacitor(categories.electricity, 65536, SlimefunItems.CARBONADO_EDGED_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CARBONADO, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.CARBONADO, new ItemStack(Material.REDSTONE), SlimefunItems.LARGE_CAPACITOR, new ItemStack(Material.REDSTONE), SlimefunItems.CARBONADO, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.CARBONADO}) - .register(plugin); - - new SolarGenerator(categories.electricity, 2, 0, SlimefunItems.SOLAR_GENERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SOLAR_PANEL, SlimefunItems.SOLAR_PANEL, SlimefunItems.SOLAR_PANEL, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_INGOT, null, SlimefunItems.ALUMINUM_INGOT, null}) - .register(plugin); - - new SolarGenerator(categories.electricity, 8, 0, SlimefunItems.SOLAR_GENERATOR_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SOLAR_GENERATOR, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR, SlimefunItems.ALUMINUM_INGOT, new ItemStack(Material.REDSTONE), SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR}) - .register(plugin); - - new SolarGenerator(categories.electricity, 32, 0, SlimefunItems.SOLAR_GENERATOR_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SOLAR_GENERATOR_2, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR_2, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.CARBONADO, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR_2, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR_2}) - .register(plugin); - - new SolarGenerator(categories.electricity, 128, 64, SlimefunItems.SOLAR_GENERATOR_4, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SOLAR_GENERATOR_3, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.SOLAR_GENERATOR_3, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.SOLAR_GENERATOR_3, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.SOLAR_GENERATOR_3}) - .register(plugin); - - new ChargingBench(categories.electricity, SlimefunItems.CHARGING_BENCH, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.ELECTRO_MAGNET, null, SlimefunItems.BATTERY, new ItemStack(Material.CRAFTING_TABLE), SlimefunItems.BATTERY, null, SlimefunItems.SMALL_CAPACITOR, null}) - .register(plugin); - - new ElectricFurnace(categories.electricity, SlimefunItems.ELECTRIC_FURNACE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.FURNACE), null, SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON, SlimefunItems.GILDED_IRON, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.GILDED_IRON}) { - - @Override - public int getEnergyConsumption() { - return 2; - } - - @Override - public int getCapacity() { - return 64; - } - - @Override - public int getSpeed() { - return 1; - } - - }.register(plugin); - - new ElectricFurnace(categories.electricity, SlimefunItems.ELECTRIC_FURNACE_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.ELECTRIC_MOTOR, null, SlimefunItems.GILDED_IRON, SlimefunItems.ELECTRIC_FURNACE, SlimefunItems.GILDED_IRON, SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON}) { - - @Override - public int getEnergyConsumption() { - return 3; - } - - @Override - public int getCapacity() { - return 128; - } - - @Override - public int getSpeed() { - return 2; - } - - }.register(plugin); - - new ElectricFurnace(categories.electricity, SlimefunItems.ELECTRIC_FURNACE_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.ELECTRIC_MOTOR, null, SlimefunItems.STEEL_INGOT, SlimefunItems.ELECTRIC_FURNACE_2, SlimefunItems.STEEL_INGOT, SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON}) { - - @Override - public int getEnergyConsumption() { - return 5; - } - - @Override - public int getCapacity() { - return 128; - } - - @Override - public int getSpeed() { - return 4; - } - - }.register(plugin); - - new ElectricGoldPan(categories.electricity, SlimefunItems.ELECTRIC_GOLD_PAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GOLD_PAN, null, new ItemStack(Material.FLINT), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.FLINT), SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 1; - } - - @Override - public int getCapacity() { - return 128; - } - - @Override - public int getSpeed() { - return 1; - } - - }.register(plugin); - - new ElectricGoldPan(categories.electricity, SlimefunItems.ELECTRIC_GOLD_PAN_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GOLD_PAN, null, new ItemStack(Material.IRON_INGOT), SlimefunItems.ELECTRIC_GOLD_PAN, new ItemStack(Material.IRON_INGOT), SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 2; - } - - @Override - public int getCapacity() { - return 128; - } - - @Override - public int getSpeed() { - return 3; - } - - }.register(plugin); - - new ElectricGoldPan(categories.electricity, SlimefunItems.ELECTRIC_GOLD_PAN_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GOLD_PAN, null, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ELECTRIC_GOLD_PAN_2, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.COBALT_INGOT, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.COBALT_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 7; - } - - @Override - public int getCapacity() { - return 512; - } - - @Override - public int getSpeed() { - return 10; - } - - }.register(plugin); - - new ElectricDustWasher(categories.electricity, SlimefunItems.ELECTRIC_DUST_WASHER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.WATER_BUCKET), null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ELECTRIC_GOLD_PAN, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 3; - } - - @Override - public int getCapacity() { - return 128; - } - - @Override - public int getSpeed() { - return 1; - } - - }.register(plugin); - - new ElectricDustWasher(categories.electricity, SlimefunItems.ELECTRIC_DUST_WASHER_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.WATER_BUCKET), null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ELECTRIC_DUST_WASHER, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 5; - } - - @Override - public int getCapacity() { - return 128; - } - - @Override - public int getSpeed() { - return 2; - } - - }.register(plugin); - - new ElectricDustWasher(categories.electricity, SlimefunItems.ELECTRIC_DUST_WASHER_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.WATER_BUCKET), null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ELECTRIC_DUST_WASHER_2, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.CORINTHIAN_BRONZE_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 15; - } - - @Override - public int getCapacity() { - return 512; - } - - @Override - public int getSpeed() { - return 10; - } - - }.register(plugin); - - new ElectricIngotFactory(categories.electricity, SlimefunItems.ELECTRIC_INGOT_FACTORY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.FLINT_AND_STEEL), null, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_DUST_WASHER, SlimefunItems.HEATING_COIL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.DAMASCUS_STEEL_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 4; - } - - @Override - public int getCapacity() { - return 256; - } - - @Override - public int getSpeed() { - return 1; - } - - }.register(plugin); - - new ElectricIngotFactory(categories.electricity, SlimefunItems.ELECTRIC_INGOT_FACTORY_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GILDED_IRON, new ItemStack(Material.FLINT_AND_STEEL), SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_INGOT_FACTORY, SlimefunItems.HEATING_COIL, SlimefunItems.BRASS_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.BRASS_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 7; - } - - @Override - public int getCapacity() { - return 256; - } - - @Override - public int getSpeed() { - return 2; - } - - }.register(plugin); - - new ElectricIngotFactory(categories.electricity, SlimefunItems.ELECTRIC_INGOT_FACTORY_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GILDED_IRON, new ItemStack(Material.FLINT_AND_STEEL), SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_INGOT_FACTORY_2, SlimefunItems.HEATING_COIL, SlimefunItems.BRASS_INGOT, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.BRASS_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 20; - } - - @Override - public int getCapacity() { - return 512; - } - - @Override - public int getSpeed() { - return 8; - } - - }.register(plugin); - - new ElectrifiedCrucible(categories.electricity, SlimefunItems.ELECTRIFIED_CRUCIBLE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.LEAD_INGOT, SlimefunItems.CRUCIBLE, SlimefunItems.LEAD_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.LARGE_CAPACITOR, SlimefunItems.LEAD_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 24; - } - - @Override - public int getCapacity() { - return 1024; - } - - @Override - public int getSpeed() { - return 1; - } - - }.register(plugin); - - new ElectrifiedCrucible(categories.electricity, SlimefunItems.ELECTRIFIED_CRUCIBLE_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.ELECTRIFIED_CRUCIBLE, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.LEAD_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 40; - } - - @Override - public int getCapacity() { - return 1024; - } - - @Override - public int getSpeed() { - return 2; - } - - }.register(plugin); - - new ElectrifiedCrucible(categories.electricity, SlimefunItems.ELECTRIFIED_CRUCIBLE_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.ELECTRIFIED_CRUCIBLE_2, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.STEEL_PLATE, SlimefunItems.POWER_CRYSTAL, SlimefunItems.STEEL_PLATE, SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 60; - } - - @Override - public int getCapacity() { - return 1024; - } - - @Override - public int getSpeed() { - return 4; - } - - }.register(plugin); - - new ElectricOreGrinder(categories.electricity, SlimefunItems.ELECTRIC_ORE_GRINDER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.DIAMOND_PICKAXE), null, SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON, SlimefunItems.GILDED_IRON, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.GILDED_IRON}) { - - @Override - public int getEnergyConsumption() { - return 6; - } - - @Override - public int getCapacity() { - return 128; - } - - @Override - public int getSpeed() { - return 1; - } - - }.register(plugin); - - new ElectricOreGrinder(categories.electricity, SlimefunItems.ELECTRIC_ORE_GRINDER_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.DIAMOND_PICKAXE), null, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_ORE_GRINDER, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.GILDED_IRON}) { - - @Override - public int getEnergyConsumption() { - return 15; - } - - @Override - public int getCapacity() { - return 512; - } - - @Override - public int getSpeed() { - return 4; - } - - }.register(plugin); - - new HeatedPressureChamber(categories.electricity, SlimefunItems.HEATED_PRESSURE_CHAMBER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.LEAD_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, new ItemStack(Material.GLASS), SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.LEAD_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 5; - } - - @Override - public int getCapacity() { - return 128; - } - - @Override - public int getSpeed() { - return 1; - } - - }.register(plugin); - - new HeatedPressureChamber(categories.electricity, SlimefunItems.HEATED_PRESSURE_CHAMBER_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.LEAD_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.HEATED_PRESSURE_CHAMBER, SlimefunItems.LEAD_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.REINFORCED_ALLOY_INGOT}) { - - @Override - public int getEnergyConsumption() { - return 22; - } - - @Override - public int getCapacity() { - return 256; - } - - @Override - public int getSpeed() { - return 5; - } - - }.register(plugin); - - new ElectricIngotPulverizer(categories.electricity, SlimefunItems.ELECTRIC_INGOT_PULVERIZER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.ELECTRIC_ORE_GRINDER, null, SlimefunItems.LEAD_INGOT, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.LEAD_INGOT}) - .register(plugin); - - new CoalGenerator(categories.electricity, SlimefunItems.COAL_GENERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.HEATING_COIL, new ItemStack(Material.FURNACE), SlimefunItems.HEATING_COIL, SlimefunItems.NICKEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.NICKEL_INGOT, null, SlimefunItems.NICKEL_INGOT, null}) { - - @Override - public int getEnergyProduction() { - return 8; - } - - @Override - public int getCapacity() { - return 64; - } - - }.register(plugin); - - new CoalGenerator(categories.electricity, SlimefunItems.COAL_GENERATOR_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.MAGMA_BLOCK), SlimefunItems.HEATING_COIL, new ItemStack(Material.MAGMA_BLOCK), SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.COAL_GENERATOR, SlimefunItems.HARDENED_METAL_INGOT, null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public int getEnergyProduction() { - return 15; - } - - @Override - public int getCapacity() { - return 256; - } - - }.register(plugin); - - new BioGenerator(categories.electricity, SlimefunItems.BIO_REACTOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.HEATING_COIL, SlimefunItems.COMPOSTER, SlimefunItems.HEATING_COIL, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_BRASS_INGOT, null, SlimefunItems.ALUMINUM_BRASS_INGOT, null}) { - - @Override - public int getEnergyProduction() { - return 4; - } - - @Override - public int getCapacity() { - return 128; - } - - }.register(plugin); - - if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { - new AutoDrier(categories.electricity, SlimefunItems.AUTO_DRIER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[]{null, null, null, SlimefunItems.HEATING_COIL, new ItemStack(Material.SMOKER), SlimefunItems.HEATING_COIL, null, new ItemStack(Material.CAMPFIRE), null}) - .register(plugin); - } - else { - new AutoDrier(categories.electricity, SlimefunItems.AUTO_DRIER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[]{null, null, null, SlimefunItems.HEATING_COIL, new ItemStack(Material.FURNACE), SlimefunItems.HEATING_COIL, null, new ItemStack(Material.TORCH), null}) - .register(plugin); - } - - new AutoBrewer(categories.electricity, SlimefunItems.AUTO_BREWER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.HEATING_COIL, null, SlimefunItems.REINFORCED_PLATE, new ItemStack(Material.BREWING_STAND), SlimefunItems.REINFORCED_PLATE, null, SlimefunItems.ELECTRIC_MOTOR, null}) { + ).register(plugin); + + new SlimefunItem(categories.easter, SlimefunItems.EASTER_CARROT_PIE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.CARROT), new ItemStack(Material.EGG), null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.EASTER_CARROT_PIE, 2)) + .register(plugin); + + new SlimefunItem(categories.easter, SlimefunItems.EASTER_APPLE_PIE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.SUGAR), new ItemStack(Material.APPLE), new ItemStack(Material.EGG), null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.CHRISTMAS_APPLE_PIE, 2)) + .register(plugin); + + new EasterEgg(categories.easter, SlimefunItems.EASTER_EGG, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.LIME_DYE), new ItemStack(Material.EGG), new ItemStack(Material.PURPLE_DYE), null, null, null}, + new SlimefunItemStack(SlimefunItems.EASTER_EGG, 2), + // Gifts: + new SlimefunItemStack(SlimefunItems.EASTER_CARROT_PIE, 4), + new SlimefunItemStack(SlimefunItems.CARROT_JUICE, 1), + new ItemStack(Material.EMERALD), + new ItemStack(Material.CAKE), + new ItemStack(Material.RABBIT_FOOT), + new ItemStack(Material.GOLDEN_CARROT, 4) + ).register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.REINFORCED_PLATE, RecipeType.COMPRESSOR, + new ItemStack[] {new SlimefunItemStack(SlimefunItems.REINFORCED_ALLOY_INGOT, 8), null, null, null, null, null, null, null, null}) + .register(plugin); + + new HardenedGlass(categories.technicalComponents, SlimefunItems.HARDENED_GLASS, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), SlimefunItems.REINFORCED_PLATE, new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS), new ItemStack(Material.GLASS)}, + new SlimefunItemStack(SlimefunItems.HARDENED_GLASS, 16)) + .register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.COOLING_UNIT, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.ICE), new ItemStack(Material.ICE), new ItemStack(Material.ICE), SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_INGOT, new ItemStack(Material.ICE), new ItemStack(Material.ICE), new ItemStack(Material.ICE)}) + .register(plugin); + + new Cooler(27, categories.usefulItems, SlimefunItems.COOLER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.CLOTH, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.COOLING_UNIT, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_INGOT}) + .register(plugin); + + new WitherProofBlock(categories.technicalComponents, SlimefunItems.WITHER_PROOF_OBSIDIAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.LEAD_INGOT, new ItemStack(Material.OBSIDIAN), SlimefunItems.LEAD_INGOT, new ItemStack(Material.OBSIDIAN), SlimefunItems.HARDENED_GLASS, new ItemStack(Material.OBSIDIAN), SlimefunItems.LEAD_INGOT, new ItemStack(Material.OBSIDIAN), SlimefunItems.LEAD_INGOT}, + new SlimefunItemStack(SlimefunItems.WITHER_PROOF_OBSIDIAN, 4)) + .register(plugin); + + new AncientPedestal(categories.magicalResources, SlimefunItems.ANCIENT_PEDESTAL, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {new ItemStack(Material.OBSIDIAN), SlimefunItems.GOLD_8K, new ItemStack(Material.OBSIDIAN), null, new ItemStack(Material.STONE), null, new ItemStack(Material.OBSIDIAN), SlimefunItems.GOLD_8K, new ItemStack(Material.OBSIDIAN)}, + new SlimefunItemStack(SlimefunItems.ANCIENT_PEDESTAL, 4)) + .register(plugin); + + new AncientAltar(categories.magicalGadgets, 8, SlimefunItems.ANCIENT_ALTAR, RecipeType.MAGIC_WORKBENCH, + new ItemStack[] {null, new ItemStack(Material.ENCHANTING_TABLE), null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.GOLD_8K, SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.OBSIDIAN), SlimefunItems.GOLD_8K, new ItemStack(Material.OBSIDIAN)}) + .register(plugin); + + new EnergyRegulator(categories.electricity, SlimefunItems.ENERGY_REGULATOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SILVER_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.SILVER_INGOT}) + .register(plugin); + + new SlimefunItem(categories.misc, SlimefunItems.DUCT_TAPE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.ALUMINUM_DUST, SlimefunItems.ALUMINUM_DUST, SlimefunItems.ALUMINUM_DUST, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.SLIME_BALL), new ItemStack(Material.PAPER), new ItemStack(Material.PAPER), new ItemStack(Material.PAPER)}, + new SlimefunItemStack(SlimefunItems.DUCT_TAPE, 2)) + .register(plugin); + + new Capacitor(categories.electricity, 128, SlimefunItems.SMALL_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.DURALUMIN_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.DURALUMIN_INGOT, new ItemStack(Material.REDSTONE), SlimefunItems.SULFATE, new ItemStack(Material.REDSTONE), SlimefunItems.DURALUMIN_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.DURALUMIN_INGOT}) + .register(plugin); + + new Capacitor(categories.electricity, 512, SlimefunItems.MEDIUM_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.BILLON_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.BILLON_INGOT, new ItemStack(Material.REDSTONE), SlimefunItems.SMALL_CAPACITOR, new ItemStack(Material.REDSTONE), SlimefunItems.BILLON_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.BILLON_INGOT}) + .register(plugin); + + new Capacitor(categories.electricity, 1024, SlimefunItems.BIG_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.STEEL_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.STEEL_INGOT, new ItemStack(Material.REDSTONE), SlimefunItems.MEDIUM_CAPACITOR, new ItemStack(Material.REDSTONE), SlimefunItems.STEEL_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.STEEL_INGOT}) + .register(plugin); + + new Capacitor(categories.electricity, 8192, SlimefunItems.LARGE_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.REINFORCED_ALLOY_INGOT, new ItemStack(Material.REDSTONE), SlimefunItems.BIG_CAPACITOR, new ItemStack(Material.REDSTONE), SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.REINFORCED_ALLOY_INGOT}) + .register(plugin); + + new Capacitor(categories.electricity, 65536, SlimefunItems.CARBONADO_EDGED_CAPACITOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CARBONADO, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.CARBONADO, new ItemStack(Material.REDSTONE), SlimefunItems.LARGE_CAPACITOR, new ItemStack(Material.REDSTONE), SlimefunItems.CARBONADO, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.CARBONADO}) + .register(plugin); + + new SolarGenerator(categories.electricity, 2, 0, SlimefunItems.SOLAR_GENERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SOLAR_PANEL, SlimefunItems.SOLAR_PANEL, SlimefunItems.SOLAR_PANEL, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_INGOT, null, SlimefunItems.ALUMINUM_INGOT, null}) + .register(plugin); + + new SolarGenerator(categories.electricity, 8, 0, SlimefunItems.SOLAR_GENERATOR_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SOLAR_GENERATOR, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR, SlimefunItems.ALUMINUM_INGOT, new ItemStack(Material.REDSTONE), SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR}) + .register(plugin); + + new SolarGenerator(categories.electricity, 32, 0, SlimefunItems.SOLAR_GENERATOR_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SOLAR_GENERATOR_2, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR_2, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.CARBONADO, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR_2, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.SOLAR_GENERATOR_2}) + .register(plugin); + + new SolarGenerator(categories.electricity, 128, 64, SlimefunItems.SOLAR_GENERATOR_4, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SOLAR_GENERATOR_3, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.SOLAR_GENERATOR_3, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.SOLAR_GENERATOR_3, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.SOLAR_GENERATOR_3}) + .register(plugin); + + new ChargingBench(categories.electricity, SlimefunItems.CHARGING_BENCH, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.ELECTRO_MAGNET, null, SlimefunItems.BATTERY, new ItemStack(Material.CRAFTING_TABLE), SlimefunItems.BATTERY, null, SlimefunItems.SMALL_CAPACITOR, null}) + .register(plugin); + + new ElectricFurnace(categories.electricity, SlimefunItems.ELECTRIC_FURNACE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.FURNACE), null, SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON, SlimefunItems.GILDED_IRON, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.GILDED_IRON}) { + + @Override + public int getEnergyConsumption() { + return 2; + } + + @Override + public int getCapacity() { + return 64; + } + + @Override + public int getSpeed() { + return 1; + } + + }.register(plugin); + + new ElectricFurnace(categories.electricity, SlimefunItems.ELECTRIC_FURNACE_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.ELECTRIC_MOTOR, null, SlimefunItems.GILDED_IRON, SlimefunItems.ELECTRIC_FURNACE, SlimefunItems.GILDED_IRON, SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON}) { + + @Override + public int getEnergyConsumption() { + return 3; + } + + @Override + public int getCapacity() { + return 128; + } + + @Override + public int getSpeed() { + return 2; + } + + }.register(plugin); + + new ElectricFurnace(categories.electricity, SlimefunItems.ELECTRIC_FURNACE_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.ELECTRIC_MOTOR, null, SlimefunItems.STEEL_INGOT, SlimefunItems.ELECTRIC_FURNACE_2, SlimefunItems.STEEL_INGOT, SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON}) { + + @Override + public int getEnergyConsumption() { + return 5; + } + + @Override + public int getCapacity() { + return 128; + } + + @Override + public int getSpeed() { + return 4; + } + + }.register(plugin); + + new ElectricGoldPan(categories.electricity, SlimefunItems.ELECTRIC_GOLD_PAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GOLD_PAN, null, new ItemStack(Material.FLINT), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.FLINT), SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_INGOT}) { + + @Override + public int getEnergyConsumption() { + return 1; + } + + @Override + public int getCapacity() { + return 128; + } @Override public int getSpeed() { return 1; } - }.register(plugin); + }.register(plugin); - new ElectricPress(categories.electricity, SlimefunItems.ELECTRIC_PRESS, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.PISTON), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.PISTON), null, SlimefunItems.MEDIUM_CAPACITOR, null, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT}) { + new ElectricGoldPan(categories.electricity, SlimefunItems.ELECTRIC_GOLD_PAN_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GOLD_PAN, null, new ItemStack(Material.IRON_INGOT), SlimefunItems.ELECTRIC_GOLD_PAN, new ItemStack(Material.IRON_INGOT), SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT}) { - @Override - public int getEnergyConsumption() { - return 8; - } + @Override + public int getEnergyConsumption() { + return 2; + } - @Override - public int getCapacity() { - return 256; - } + @Override + public int getCapacity() { + return 128; + } - @Override - public int getSpeed() { - return 1; - } + @Override + public int getSpeed() { + return 3; + } + + }.register(plugin); - }.register(plugin); + new ElectricGoldPan(categories.electricity, SlimefunItems.ELECTRIC_GOLD_PAN_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GOLD_PAN, null, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ELECTRIC_GOLD_PAN_2, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.COBALT_INGOT, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.COBALT_INGOT}) { - new ElectricPress(categories.electricity, SlimefunItems.ELECTRIC_PRESS_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.STICKY_PISTON), SlimefunItems.ELECTRIC_PRESS, new ItemStack(Material.STICKY_PISTON), SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.BIG_CAPACITOR, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT}) { + @Override + public int getEnergyConsumption() { + return 7; + } - @Override - public int getEnergyConsumption() { - return 20; - } + @Override + public int getCapacity() { + return 512; + } - @Override - public int getCapacity() { - return 1024; - } + @Override + public int getSpeed() { + return 10; + } + + }.register(plugin); - @Override - public int getSpeed() { - return 3; - } + new ElectricDustWasher(categories.electricity, SlimefunItems.ELECTRIC_DUST_WASHER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.WATER_BUCKET), null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ELECTRIC_GOLD_PAN, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_INGOT}) { - }.register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.MAGNESIUM_SALT, RecipeType.HEATED_PRESSURE_CHAMBER, - new ItemStack[] {SlimefunItems.MAGNESIUM_DUST, SlimefunItems.SALT, null, null, null, null, null, null, null}) - .register(plugin); - - new MagnesiumGenerator(categories.electricity, SlimefunItems.MAGNESIUM_GENERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.ELECTRIC_MOTOR, null, SlimefunItems.COMPRESSED_CARBON, new ItemStack(Material.WATER_BUCKET), SlimefunItems.COMPRESSED_CARBON, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT}) { - - @Override - public int getEnergyProduction() { - return 18; - } + @Override + public int getEnergyConsumption() { + return 3; + } - @Override - public int getCapacity() { - return 128; - } + @Override + public int getCapacity() { + return 128; + } - }.register(plugin); + @Override + public int getSpeed() { + return 1; + } + + }.register(plugin); - new AutoEnchanter(categories.electricity, SlimefunItems.AUTO_ENCHANTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.ENCHANTING_TABLE), null, SlimefunItems.CARBONADO, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CARBONADO, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.WITHER_PROOF_OBSIDIAN}) - .register(plugin); + new ElectricDustWasher(categories.electricity, SlimefunItems.ELECTRIC_DUST_WASHER_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.WATER_BUCKET), null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ELECTRIC_DUST_WASHER, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT}) { - new AutoDisenchanter(categories.electricity, SlimefunItems.AUTO_DISENCHANTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.REDSTONE), new ItemStack(Material.ANVIL), new ItemStack(Material.REDSTONE), SlimefunItems.CARBONADO, SlimefunItems.AUTO_ENCHANTER, SlimefunItems.CARBONADO, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.WITHER_PROOF_OBSIDIAN}) - .register(plugin); + @Override + public int getEnergyConsumption() { + return 5; + } - new AutoAnvil(categories.electricity, SlimefunItems.AUTO_ANVIL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.ANVIL), null, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.REINFORCED_ALLOY_INGOT, new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK)}) { + @Override + public int getCapacity() { + return 128; + } - @Override - public int getRepairFactor() { - return 10; - } + @Override + public int getSpeed() { + return 2; + } + + }.register(plugin); - @Override - public int getCapacity() { - return 128; - } + new ElectricDustWasher(categories.electricity, SlimefunItems.ELECTRIC_DUST_WASHER_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.WATER_BUCKET), null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ELECTRIC_DUST_WASHER_2, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.CORINTHIAN_BRONZE_INGOT}) { - @Override - public int getEnergyConsumption() { - return 12; - } + @Override + public int getEnergyConsumption() { + return 15; + } - }.register(plugin); + @Override + public int getCapacity() { + return 512; + } - new AutoAnvil(categories.electricity, SlimefunItems.AUTO_ANVIL_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.AUTO_ANVIL, null, SlimefunItems.STEEL_PLATE, SlimefunItems.HEATING_COIL, SlimefunItems.STEEL_PLATE, new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK)}) { + @Override + public int getSpeed() { + return 10; + } + + }.register(plugin); - @Override - public int getRepairFactor() { - return 4; - } + new ElectricIngotFactory(categories.electricity, SlimefunItems.ELECTRIC_INGOT_FACTORY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.FLINT_AND_STEEL), null, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_DUST_WASHER, SlimefunItems.HEATING_COIL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.DAMASCUS_STEEL_INGOT}) { + + @Override + public int getEnergyConsumption() { + return 4; + } - @Override - public int getCapacity() { - return 256; - } + @Override + public int getCapacity() { + return 256; + } - @Override - public int getEnergyConsumption() { - return 16; - } + @Override + public int getSpeed() { + return 1; + } - }.register(plugin); + }.register(plugin); - new Multimeter(categories.technicalGadgets, SlimefunItems.MULTIMETER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.COPPER_INGOT, null, SlimefunItems.COPPER_INGOT, null, SlimefunItems.REDSTONE_ALLOY, null, null, SlimefunItems.GOLD_6K, null}) - .register(plugin); + new ElectricIngotFactory(categories.electricity, SlimefunItems.ELECTRIC_INGOT_FACTORY_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GILDED_IRON, new ItemStack(Material.FLINT_AND_STEEL), SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_INGOT_FACTORY, SlimefunItems.HEATING_COIL, SlimefunItems.BRASS_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.BRASS_INGOT}) { - new SlimefunItem(categories.technicalComponents, SlimefunItems.PLASTIC_SHEET, RecipeType.HEATED_PRESSURE_CHAMBER, - new ItemStack[] {null, null, null, null, SlimefunItems.OIL_BUCKET, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.PLASTIC_SHEET, 8)) - .register(plugin); + @Override + public int getEnergyConsumption() { + return 7; + } - new UnplaceableBlock(categories.technicalComponents, SlimefunItems.ANDROID_MEMORY_CORE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.BRASS_INGOT, new ItemStack(Material.ORANGE_STAINED_GLASS), SlimefunItems.BRASS_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.TIN_DUST, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BRASS_INGOT, new ItemStack(Material.ORANGE_STAINED_GLASS), SlimefunItems.BRASS_INGOT}) - .register(plugin); + @Override + public int getCapacity() { + return 256; + } - new GPSTransmitter(categories.gps, SlimefunItems.GPS_TRANSMITTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.STEEL_INGOT, SlimefunItems.ADVANCED_CIRCUIT_BOARD, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.STEEL_INGOT}) { - - @Override - public int getMultiplier(int y) { - return y; - } + @Override + public int getSpeed() { + return 2; + } - @Override - public int getCapacity() { - return 16; - } + }.register(plugin); - @Override - public int getEnergyConsumption() { - return 1; - } + new ElectricIngotFactory(categories.electricity, SlimefunItems.ELECTRIC_INGOT_FACTORY_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GILDED_IRON, new ItemStack(Material.FLINT_AND_STEEL), SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_INGOT_FACTORY_2, SlimefunItems.HEATING_COIL, SlimefunItems.BRASS_INGOT, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.BRASS_INGOT}) { - }.register(plugin); + @Override + public int getEnergyConsumption() { + return 20; + } - new GPSTransmitter(categories.gps, SlimefunItems.GPS_TRANSMITTER_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GPS_TRANSMITTER, SlimefunItems.BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER, SlimefunItems.BRONZE_INGOT, SlimefunItems.CARBON, SlimefunItems.BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER, SlimefunItems.BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER}) { - - @Override - public int getMultiplier(int y) { - return y * 4 + 100; - } + @Override + public int getCapacity() { + return 512; + } - @Override - public int getCapacity() { - return 64; - } + @Override + public int getSpeed() { + return 8; + } - @Override - public int getEnergyConsumption() { - return 3; - } + }.register(plugin); - }.register(plugin); + new ElectrifiedCrucible(categories.electricity, SlimefunItems.ELECTRIFIED_CRUCIBLE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.LEAD_INGOT, SlimefunItems.CRUCIBLE, SlimefunItems.LEAD_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.LARGE_CAPACITOR, SlimefunItems.LEAD_INGOT}) { - new GPSTransmitter(categories.gps, SlimefunItems.GPS_TRANSMITTER_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GPS_TRANSMITTER_2, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER_2, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.CARBONADO, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER_2, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER_2}) { - - @Override - public int getMultiplier(int y) { - return y * 16 + 500; - } + @Override + public int getEnergyConsumption() { + return 24; + } - @Override - public int getCapacity() { - return 256; - } + @Override + public int getCapacity() { + return 1024; + } - @Override - public int getEnergyConsumption() { - return 11; - } + @Override + public int getSpeed() { + return 1; + } - }.register(plugin); + }.register(plugin); - new GPSTransmitter(categories.gps, SlimefunItems.GPS_TRANSMITTER_4, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GPS_TRANSMITTER_3, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.GPS_TRANSMITTER_3, SlimefunItems.NICKEL_INGOT, SlimefunItems.CARBONADO, SlimefunItems.NICKEL_INGOT, SlimefunItems.GPS_TRANSMITTER_3, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.GPS_TRANSMITTER_3}) { - - @Override - public int getMultiplier(int y) { - return y * 64 + 600; - } + new ElectrifiedCrucible(categories.electricity, SlimefunItems.ELECTRIFIED_CRUCIBLE_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.ELECTRIFIED_CRUCIBLE, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.LEAD_INGOT}) { - @Override - public int getCapacity() { - return 1024; - } + @Override + public int getEnergyConsumption() { + return 40; + } - @Override - public int getEnergyConsumption() { - return 46; - } - - }.register(plugin); + @Override + public int getCapacity() { + return 1024; + } - new GPSControlPanel(categories.gps, SlimefunItems.GPS_CONTROL_PANEL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.COBALT_INGOT, SlimefunItems.ADVANCED_CIRCUIT_BOARD, SlimefunItems.COBALT_INGOT, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.ALUMINUM_BRASS_INGOT}) - .register(plugin); + @Override + public int getSpeed() { + return 2; + } - new GPSMarkerTool(categories.gps, SlimefunItems.GPS_MARKER_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.ELECTRO_MAGNET, null, new ItemStack(Material.LAPIS_LAZULI), SlimefunItems.BASIC_CIRCUIT_BOARD, new ItemStack(Material.LAPIS_LAZULI), new ItemStack(Material.REDSTONE), SlimefunItems.REDSTONE_ALLOY, new ItemStack(Material.REDSTONE)}) - .register(plugin); + }.register(plugin); - new SlimefunItem(categories.gps, SlimefunItems.GPS_EMERGENCY_TRANSMITTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.ELECTRO_MAGNET, null, null, SlimefunItems.GPS_TRANSMITTER, null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) - .register(plugin); + new ElectrifiedCrucible(categories.electricity, SlimefunItems.ELECTRIFIED_CRUCIBLE_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.ELECTRIFIED_CRUCIBLE_2, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.STEEL_PLATE, SlimefunItems.POWER_CRYSTAL, SlimefunItems.STEEL_PLATE, SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT}) { + + @Override + public int getEnergyConsumption() { + return 60; + } + + @Override + public int getCapacity() { + return 1024; + } + + @Override + public int getSpeed() { + return 4; + } + + }.register(plugin); + + new ElectricOreGrinder(categories.electricity, SlimefunItems.ELECTRIC_ORE_GRINDER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.DIAMOND_PICKAXE), null, SlimefunItems.GILDED_IRON, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON, SlimefunItems.GILDED_IRON, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.GILDED_IRON}) { + + @Override + public int getEnergyConsumption() { + return 6; + } + + @Override + public int getCapacity() { + return 128; + } + + @Override + public int getSpeed() { + return 1; + } + + }.register(plugin); + + new ElectricOreGrinder(categories.electricity, SlimefunItems.ELECTRIC_ORE_GRINDER_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.DIAMOND_PICKAXE), null, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_ORE_GRINDER, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.GILDED_IRON}) { + + @Override + public int getEnergyConsumption() { + return 15; + } + + @Override + public int getCapacity() { + return 512; + } + + @Override + public int getSpeed() { + return 4; + } + + }.register(plugin); + + new HeatedPressureChamber(categories.electricity, SlimefunItems.HEATED_PRESSURE_CHAMBER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.LEAD_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, new ItemStack(Material.GLASS), SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.LEAD_INGOT}) { + + @Override + public int getEnergyConsumption() { + return 5; + } + + @Override + public int getCapacity() { + return 128; + } + + @Override + public int getSpeed() { + return 1; + } + + }.register(plugin); + + new HeatedPressureChamber(categories.electricity, SlimefunItems.HEATED_PRESSURE_CHAMBER_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.LEAD_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.HEATED_PRESSURE_CHAMBER, SlimefunItems.LEAD_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.REINFORCED_ALLOY_INGOT}) { + + @Override + public int getEnergyConsumption() { + return 22; + } + + @Override + public int getCapacity() { + return 256; + } + + @Override + public int getSpeed() { + return 5; + } + + }.register(plugin); + + new ElectricIngotPulverizer(categories.electricity, SlimefunItems.ELECTRIC_INGOT_PULVERIZER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.ELECTRIC_ORE_GRINDER, null, SlimefunItems.LEAD_INGOT, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.LEAD_INGOT}) + .register(plugin); + + new CoalGenerator(categories.electricity, SlimefunItems.COAL_GENERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.HEATING_COIL, new ItemStack(Material.FURNACE), SlimefunItems.HEATING_COIL, SlimefunItems.NICKEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.NICKEL_INGOT, null, SlimefunItems.NICKEL_INGOT, null}) { + + @Override + public int getEnergyProduction() { + return 8; + } + + @Override + public int getCapacity() { + return 64; + } + + }.register(plugin); + + new CoalGenerator(categories.electricity, SlimefunItems.COAL_GENERATOR_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.MAGMA_BLOCK), SlimefunItems.HEATING_COIL, new ItemStack(Material.MAGMA_BLOCK), SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.COAL_GENERATOR, SlimefunItems.HARDENED_METAL_INGOT, null, SlimefunItems.ELECTRIC_MOTOR, null}) { + + @Override + public int getEnergyProduction() { + return 15; + } + + @Override + public int getCapacity() { + return 256; + } + + }.register(plugin); + + new BioGenerator(categories.electricity, SlimefunItems.BIO_REACTOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.HEATING_COIL, SlimefunItems.COMPOSTER, SlimefunItems.HEATING_COIL, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_BRASS_INGOT, null, SlimefunItems.ALUMINUM_BRASS_INGOT, null}) { + + @Override + public int getEnergyProduction() { + return 4; + } + + @Override + public int getCapacity() { + return 128; + } + + }.register(plugin); + + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { + new AutoDrier(categories.electricity, SlimefunItems.AUTO_DRIER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[]{null, null, null, SlimefunItems.HEATING_COIL, new ItemStack(Material.SMOKER), SlimefunItems.HEATING_COIL, null, new ItemStack(Material.CAMPFIRE), null}) + .register(plugin); + } + else { + new AutoDrier(categories.electricity, SlimefunItems.AUTO_DRIER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[]{null, null, null, SlimefunItems.HEATING_COIL, new ItemStack(Material.FURNACE), SlimefunItems.HEATING_COIL, null, new ItemStack(Material.TORCH), null}) + .register(plugin); + } + + new AutoBrewer(categories.electricity, SlimefunItems.AUTO_BREWER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.HEATING_COIL, null, SlimefunItems.REINFORCED_PLATE, new ItemStack(Material.BREWING_STAND), SlimefunItems.REINFORCED_PLATE, null, SlimefunItems.ELECTRIC_MOTOR, null}) { + + @Override + public int getSpeed() { + return 1; + } + + }.register(plugin); + + new ElectricPress(categories.electricity, SlimefunItems.ELECTRIC_PRESS, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.PISTON), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.PISTON), null, SlimefunItems.MEDIUM_CAPACITOR, null, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT}) { + + @Override + public int getEnergyConsumption() { + return 8; + } + + @Override + public int getCapacity() { + return 256; + } + + @Override + public int getSpeed() { + return 1; + } + + }.register(plugin); + + new ElectricPress(categories.electricity, SlimefunItems.ELECTRIC_PRESS_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.STICKY_PISTON), SlimefunItems.ELECTRIC_PRESS, new ItemStack(Material.STICKY_PISTON), SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.BIG_CAPACITOR, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.DAMASCUS_STEEL_INGOT}) { + + @Override + public int getEnergyConsumption() { + return 20; + } + + @Override + public int getCapacity() { + return 1024; + } + + @Override + public int getSpeed() { + return 3; + } + + }.register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.MAGNESIUM_SALT, RecipeType.HEATED_PRESSURE_CHAMBER, + new ItemStack[] {SlimefunItems.MAGNESIUM_DUST, SlimefunItems.SALT, null, null, null, null, null, null, null}) + .register(plugin); + + new MagnesiumGenerator(categories.electricity, SlimefunItems.MAGNESIUM_GENERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.ELECTRIC_MOTOR, null, SlimefunItems.COMPRESSED_CARBON, new ItemStack(Material.WATER_BUCKET), SlimefunItems.COMPRESSED_CARBON, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT, SlimefunItems.DURALUMIN_INGOT}) { + + @Override + public int getEnergyProduction() { + return 18; + } + + @Override + public int getCapacity() { + return 128; + } + + }.register(plugin); + + new AutoEnchanter(categories.electricity, SlimefunItems.AUTO_ENCHANTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.ENCHANTING_TABLE), null, SlimefunItems.CARBONADO, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CARBONADO, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.WITHER_PROOF_OBSIDIAN}) + .register(plugin); + + new AutoDisenchanter(categories.electricity, SlimefunItems.AUTO_DISENCHANTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.REDSTONE), new ItemStack(Material.ANVIL), new ItemStack(Material.REDSTONE), SlimefunItems.CARBONADO, SlimefunItems.AUTO_ENCHANTER, SlimefunItems.CARBONADO, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.WITHER_PROOF_OBSIDIAN}) + .register(plugin); + + new AutoAnvil(categories.electricity, SlimefunItems.AUTO_ANVIL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.ANVIL), null, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.REINFORCED_ALLOY_INGOT, new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK)}) { + + @Override + public int getRepairFactor() { + return 10; + } + + @Override + public int getCapacity() { + return 128; + } + + @Override + public int getEnergyConsumption() { + return 12; + } + + }.register(plugin); + + new AutoAnvil(categories.electricity, SlimefunItems.AUTO_ANVIL_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.AUTO_ANVIL, null, SlimefunItems.STEEL_PLATE, SlimefunItems.HEATING_COIL, SlimefunItems.STEEL_PLATE, new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK), new ItemStack(Material.IRON_BLOCK)}) { + + @Override + public int getRepairFactor() { + return 4; + } + + @Override + public int getCapacity() { + return 256; + } + + @Override + public int getEnergyConsumption() { + return 16; + } + + }.register(plugin); + + new Multimeter(categories.technicalGadgets, SlimefunItems.MULTIMETER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.COPPER_INGOT, null, SlimefunItems.COPPER_INGOT, null, SlimefunItems.REDSTONE_ALLOY, null, null, SlimefunItems.GOLD_6K, null}) + .register(plugin); + + new SlimefunItem(categories.technicalComponents, SlimefunItems.PLASTIC_SHEET, RecipeType.HEATED_PRESSURE_CHAMBER, + new ItemStack[] {null, null, null, null, SlimefunItems.OIL_BUCKET, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.PLASTIC_SHEET, 8)) + .register(plugin); + + new UnplaceableBlock(categories.technicalComponents, SlimefunItems.ANDROID_MEMORY_CORE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.BRASS_INGOT, new ItemStack(Material.ORANGE_STAINED_GLASS), SlimefunItems.BRASS_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.TIN_DUST, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BRASS_INGOT, new ItemStack(Material.ORANGE_STAINED_GLASS), SlimefunItems.BRASS_INGOT}) + .register(plugin); + + new GPSTransmitter(categories.gps, SlimefunItems.GPS_TRANSMITTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.STEEL_INGOT, SlimefunItems.ADVANCED_CIRCUIT_BOARD, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.STEEL_INGOT}) { + + @Override + public int getMultiplier(int y) { + return y; + } + + @Override + public int getCapacity() { + return 16; + } + + @Override + public int getEnergyConsumption() { + return 1; + } + + }.register(plugin); + + new GPSTransmitter(categories.gps, SlimefunItems.GPS_TRANSMITTER_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GPS_TRANSMITTER, SlimefunItems.BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER, SlimefunItems.BRONZE_INGOT, SlimefunItems.CARBON, SlimefunItems.BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER, SlimefunItems.BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER}) { + + @Override + public int getMultiplier(int y) { + return y * 4 + 100; + } + + @Override + public int getCapacity() { + return 64; + } + + @Override + public int getEnergyConsumption() { + return 3; + } + + }.register(plugin); + + new GPSTransmitter(categories.gps, SlimefunItems.GPS_TRANSMITTER_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GPS_TRANSMITTER_2, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER_2, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.CARBONADO, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER_2, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.GPS_TRANSMITTER_2}) { + + @Override + public int getMultiplier(int y) { + return y * 16 + 500; + } + + @Override + public int getCapacity() { + return 256; + } + + @Override + public int getEnergyConsumption() { + return 11; + } + + }.register(plugin); + + new GPSTransmitter(categories.gps, SlimefunItems.GPS_TRANSMITTER_4, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GPS_TRANSMITTER_3, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.GPS_TRANSMITTER_3, SlimefunItems.NICKEL_INGOT, SlimefunItems.CARBONADO, SlimefunItems.NICKEL_INGOT, SlimefunItems.GPS_TRANSMITTER_3, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.GPS_TRANSMITTER_3}) { + + @Override + public int getMultiplier(int y) { + return y * 64 + 600; + } + + @Override + public int getCapacity() { + return 1024; + } + + @Override + public int getEnergyConsumption() { + return 46; + } + + }.register(plugin); + + new GPSControlPanel(categories.gps, SlimefunItems.GPS_CONTROL_PANEL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.COBALT_INGOT, SlimefunItems.ADVANCED_CIRCUIT_BOARD, SlimefunItems.COBALT_INGOT, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.ALUMINUM_BRASS_INGOT}) + .register(plugin); + + new GPSMarkerTool(categories.gps, SlimefunItems.GPS_MARKER_TOOL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.ELECTRO_MAGNET, null, new ItemStack(Material.LAPIS_LAZULI), SlimefunItems.BASIC_CIRCUIT_BOARD, new ItemStack(Material.LAPIS_LAZULI), new ItemStack(Material.REDSTONE), SlimefunItems.REDSTONE_ALLOY, new ItemStack(Material.REDSTONE)}) + .register(plugin); + + new SlimefunItem(categories.gps, SlimefunItems.GPS_EMERGENCY_TRANSMITTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.ELECTRO_MAGNET, null, null, SlimefunItems.GPS_TRANSMITTER, null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null}) + .register(plugin); new SlimefunItem(categories.androids, SlimefunItems.ANDROID_INTERFACE_ITEMS, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.STEEL_INGOT, SlimefunItems.PLASTIC_SHEET, SlimefunItems.STEEL_INGOT, SlimefunItems.BASIC_CIRCUIT_BOARD, new ItemStack(Material.BLUE_STAINED_GLASS), SlimefunItems.PLASTIC_SHEET, SlimefunItems.STEEL_INGOT, SlimefunItems.PLASTIC_SHEET}) @@ -2197,1034 +2197,1034 @@ public final class SlimefunItemSetup { new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.STEEL_INGOT, SlimefunItems.PLASTIC_SHEET, new ItemStack(Material.RED_STAINED_GLASS), SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.STEEL_INGOT, SlimefunItems.PLASTIC_SHEET, SlimefunItems.STEEL_INGOT, SlimefunItems.PLASTIC_SHEET}) .register(plugin); - new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.COAL_GENERATOR, SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.CHEST), SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET}) { + new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.COAL_GENERATOR, SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.CHEST), SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET, SlimefunItems.PLASTIC_SHEET}) { - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } + @Override + public float getFuelEfficiency() { + return 1; + } + + @Override + public int getTier() { + return 1; + } - } - .register(plugin); + } + .register(plugin); - new MinerAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_MINER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_PICKAXE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_PICKAXE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { + new MinerAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_MINER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_PICKAXE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_PICKAXE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } + @Override + public float getFuelEfficiency() { + return 1; + } + + @Override + public int getTier() { + return 1; + } - } - .register(plugin); + } + .register(plugin); - new FarmerAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_FARMER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_HOE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_HOE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { + new FarmerAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_FARMER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_HOE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_HOE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } + @Override + public float getFuelEfficiency() { + return 1; + } + + @Override + public int getTier() { + return 1; + } - } - .register(plugin); + } + .register(plugin); - new WoodcutterAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_WOODCUTTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_AXE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_AXE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { + new WoodcutterAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_WOODCUTTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.DIAMOND_AXE), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_AXE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } + @Override + public float getFuelEfficiency() { + return 1; + } + + @Override + public int getTier() { + return 1; + } - } - .register(plugin); + } + .register(plugin); - new FisherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { + new FisherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } + @Override + public float getFuelEfficiency() { + return 1; + } + + @Override + public int getTier() { + return 1; + } - } - .register(plugin); + } + .register(plugin); - new ButcherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { + new ButcherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - @Override - public float getFuelEfficiency() { - return 1; - } - - @Override - public int getTier() { - return 1; - } + @Override + public float getFuelEfficiency() { + return 1; + } + + @Override + public int getTier() { + return 1; + } - } - .register(plugin); + } + .register(plugin); - new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.COMBUSTION_REACTOR, SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.CHEST), SlimefunItems.PLASTIC_SHEET, SlimefunItems.POWER_CRYSTAL, SlimefunItems.PLASTIC_SHEET}) { + new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.COMBUSTION_REACTOR, SlimefunItems.PROGRAMMABLE_ANDROID, new ItemStack(Material.CHEST), SlimefunItems.PLASTIC_SHEET, SlimefunItems.POWER_CRYSTAL, SlimefunItems.PLASTIC_SHEET}) { - @Override - public float getFuelEfficiency() { - return 1.5F; - } - - @Override - public int getTier() { - return 2; - } + @Override + public float getFuelEfficiency() { + return 1.5F; + } + + @Override + public int getTier() { + return 2; + } - } - .register(plugin); + } + .register(plugin); - new FisherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { + new FisherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - @Override - public float getFuelEfficiency() { - return 1.5F; - } - - @Override - public int getTier() { - return 2; - } - - } - .register(plugin); + @Override + public float getFuelEfficiency() { + return 1.5F; + } + + @Override + public int getTier() { + return 2; + } + + } + .register(plugin); - new ButcherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1.5F; - } - - @Override - public int getTier() { - return 2; - } - - } - .register(plugin); - - new AdvancedFarmerAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2_FARMER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_HOE), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.DIAMOND_HOE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1.5F; - } - - @Override - public int getTier() { - return 2; - } - - } - .register(plugin); - - new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.NUCLEAR_REACTOR, SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.CHEST), SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BLISTERING_INGOT_3}) { - - @Override - public float getFuelEfficiency() { - return 1F; - } - - @Override - public int getTier() { - return 3; - } - - } - .register(plugin); - - new FisherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_3_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID_3, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1F; - } - - @Override - public int getTier() { - return 3; - } - - } - .register(plugin); - - new ButcherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_3_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER_3, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID_3, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public float getFuelEfficiency() { - return 1F; - } - - @Override - public int getTier() { - return 3; - } - - } - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.BLANK_RUNE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.STONE), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.STONE), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.OBSIDIAN), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.STONE), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.STONE)}) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.AIR_RUNE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.FEATHER), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.FEATHER), new ItemStack(Material.GHAST_TEAR), SlimefunItems.BLANK_RUNE, new ItemStack(Material.GHAST_TEAR), new ItemStack(Material.FEATHER), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.FEATHER)}, - new SlimefunItemStack(SlimefunItems.AIR_RUNE, 4)) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.EARTH_RUNE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.DIRT), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.STONE), new ItemStack(Material.OBSIDIAN), SlimefunItems.BLANK_RUNE, new ItemStack(Material.OBSIDIAN), new ItemStack(Material.STONE), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.DIRT)}, - new SlimefunItemStack(SlimefunItems.EARTH_RUNE, 4)) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.FIRE_RUNE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.FIRE_CHARGE), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.FIRE_CHARGE), new ItemStack(Material.BLAZE_POWDER), SlimefunItems.EARTH_RUNE, new ItemStack(Material.FLINT_AND_STEEL), new ItemStack(Material.FIRE_CHARGE), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.FIRE_CHARGE)}, - new SlimefunItemStack(SlimefunItems.FIRE_RUNE, 4)) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.WATER_RUNE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.SALMON), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.WATER_BUCKET), new ItemStack(Material.SAND), SlimefunItems.BLANK_RUNE, new ItemStack(Material.SAND), new ItemStack(Material.WATER_BUCKET), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.COD)}, - new SlimefunItemStack(SlimefunItems.WATER_RUNE, 4)) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_RUNE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.ENDER_PEARL), new ItemStack(Material.ENDER_EYE), SlimefunItems.BLANK_RUNE, new ItemStack(Material.ENDER_EYE), new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.ENDER_PEARL)}, - new SlimefunItemStack(SlimefunItems.ENDER_RUNE, 6)) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.LIGHTNING_RUNE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.IRON_INGOT), SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.IRON_INGOT), SlimefunItems.AIR_RUNE, new ItemStack(Material.PHANTOM_MEMBRANE), SlimefunItems.WATER_RUNE, new ItemStack(Material.IRON_INGOT), SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.IRON_INGOT)}, - new SlimefunItemStack(SlimefunItems.LIGHTNING_RUNE, 4)) - .register(plugin); - - new SlimefunItem(categories.magicalResources, SlimefunItems.RAINBOW_RUNE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.CYAN_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.ENDER_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(YELLOW_DYE), SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.MAGENTA_DYE)}) - .register(plugin); - - new SoulboundRune(categories.magicalResources, SlimefunItems.SOULBOUND_RUNE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.ENDER_LUMP_3, SlimefunItems.ENDER_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.MAGIC_LUMP_3}) - .register(plugin); - - new EnchantmentRune(categories.magicalResources, SlimefunItems.ENCHANTMENT_RUNE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, SlimefunItems.MAGICAL_GLASS, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.MAGICAL_GLASS, SlimefunItems.LIGHTNING_RUNE, SlimefunItems.MAGICAL_GLASS, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.MAGICAL_GLASS, SlimefunItems.MAGIC_LUMP_3}) - .register(plugin); - - new InfernalBonemeal(categories.magicalGadgets, SlimefunItems.INFERNAL_BONEMEAL, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.NETHER_WART), SlimefunItems.EARTH_RUNE, new ItemStack(Material.NETHER_WART), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.BONE_MEAL), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.NETHER_WART), new ItemStack(Material.BLAZE_POWDER), new ItemStack(Material.NETHER_WART)}, - new SlimefunItemStack(SlimefunItems.INFERNAL_BONEMEAL, 8)) - .register(plugin); - - new SlimefunItem(categories.magicalGadgets, SlimefunItems.ELYTRA_SCALE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {SlimefunItems.ENDER_LUMP_3, SlimefunItems.AIR_RUNE, SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.PHANTOM_MEMBRANE), new ItemStack(Material.FEATHER), new ItemStack(Material.PHANTOM_MEMBRANE), SlimefunItems.ENDER_LUMP_3, SlimefunItems.AIR_RUNE, SlimefunItems.ENDER_LUMP_3}) - .register(plugin); - - new VanillaItem(categories.magicalGadgets, new ItemStack(Material.ELYTRA), "ELYTRA", RecipeType.ANCIENT_ALTAR, - new ItemStack[] {SlimefunItems.ELYTRA_SCALE, SlimefunItems.AIR_RUNE, SlimefunItems.ELYTRA_SCALE, SlimefunItems.AIR_RUNE, new ItemStack(Material.LEATHER_CHESTPLATE), SlimefunItems.AIR_RUNE, SlimefunItems.ELYTRA_SCALE, SlimefunItems.AIR_RUNE, SlimefunItems.ELYTRA_SCALE}) - .register(plugin); - - new SlimefunItem(categories.magicalGadgets, SlimefunItems.INFUSED_ELYTRA, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.ELYTRA_SCALE, SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.FLASK_OF_KNOWLEDGE, new ItemStack(Material.ELYTRA), SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.ELYTRA_SCALE, SlimefunItems.FLASK_OF_KNOWLEDGE}) - .register(plugin); - - new SoulboundItem(categories.magicalGadgets, SlimefunItems.SOULBOUND_ELYTRA, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.ELYTRA_SCALE, new ItemStack(Material.ELYTRA), SlimefunItems.ELYTRA_SCALE, SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.FLASK_OF_KNOWLEDGE}) - .register(plugin); - - new VanillaItem(categories.magicalGadgets, new ItemStack(Material.TOTEM_OF_UNDYING), "TOTEM_OF_UNDYING", RecipeType.ANCIENT_ALTAR, - new ItemStack[] {SlimefunItems.ESSENCE_OF_AFTERLIFE, new ItemStack(Material.EMERALD_BLOCK), SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.COMMON_TALISMAN, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.ESSENCE_OF_AFTERLIFE, new ItemStack(Material.EMERALD_BLOCK), SlimefunItems.ESSENCE_OF_AFTERLIFE}) - .register(plugin); - - new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_WOOL, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL, 8), new RainbowTickHandler(MaterialCollections.getAllWoolColors())) - .register(plugin); - - new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_GLASS, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS, 8), new RainbowTickHandler(MaterialCollections.getAllStainedGlassColors())) - .register(plugin); - - new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_GLASS_PANE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE, 8), new RainbowTickHandler(MaterialCollections.getAllStainedGlassPaneColors())) - .register(plugin); - - new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_CLAY, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY, 8), new RainbowTickHandler(MaterialCollections.getAllTerracottaColors())) - .register(plugin); - - new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_CONCRETE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE, 8), new RainbowTickHandler(MaterialCollections.getAllConcreteColors())) - .register(plugin); - - new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA, 8), new RainbowTickHandler(MaterialCollections.getAllGlazedTerracottaColors())) - .register(plugin); - - // Christmas - - new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_WOOL_XMAS, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL_XMAS, 2), new RainbowTickHandler(Material.RED_WOOL, Material.GREEN_WOOL)) - .register(plugin); - - new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_GLASS_XMAS, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_XMAS, 2), new RainbowTickHandler(Material.RED_STAINED_GLASS, Material.GREEN_STAINED_GLASS)) - .register(plugin); - - new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_GLASS_PANE_XMAS, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE_XMAS, 2), new RainbowTickHandler(Material.RED_STAINED_GLASS_PANE, Material.GREEN_STAINED_GLASS_PANE)) - .register(plugin); - - new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_CLAY_XMAS, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY_XMAS, 2), new RainbowTickHandler(Material.RED_TERRACOTTA, Material.GREEN_TERRACOTTA)) - .register(plugin); - - new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_CONCRETE_XMAS, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE_XMAS, 2), new RainbowTickHandler(Material.RED_CONCRETE, Material.GREEN_CONCRETE)) - .register(plugin); - - new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_XMAS, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_XMAS, 2), new RainbowTickHandler(Material.RED_GLAZED_TERRACOTTA, Material.GREEN_GLAZED_TERRACOTTA)) - .register(plugin); - - // Valentines Day - - new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_WOOL_VALENTINE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_WOOL, Material.PINK_WOOL)) - .register(plugin); - - new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_GLASS_VALENTINE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_STAINED_GLASS, Material.PINK_STAINED_GLASS)) - .register(plugin); - - new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_GLASS_PANE_VALENTINE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_STAINED_GLASS_PANE, Material.PINK_STAINED_GLASS_PANE)) - .register(plugin); - - new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_CLAY_VALENTINE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_TERRACOTTA, Material.PINK_TERRACOTTA)) - .register(plugin); - - new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_CONCRETE_VALENTINE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_CONCRETE, Material.PINK_CONCRETE)) - .register(plugin); - - new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_VALENTINE, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_GLAZED_TERRACOTTA, Material.PINK_GLAZED_TERRACOTTA)) - .register(plugin); - - // Halloween - - new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_WOOL_HALLOWEEN, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_WOOL, Material.BLACK_WOOL)) - .register(plugin); - - new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_GLASS_HALLOWEEN, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_STAINED_GLASS, Material.BLACK_STAINED_GLASS)) - .register(plugin); - - new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_GLASS_PANE_HALLOWEEN, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_STAINED_GLASS_PANE, Material.BLACK_STAINED_GLASS_PANE)) - .register(plugin); - - new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_CLAY_HALLOWEEN, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_TERRACOTTA, Material.BLACK_TERRACOTTA)) - .register(plugin); - - new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_CONCRETE_HALLOWEEN, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_CONCRETE, Material.BLACK_CONCRETE)) - .register(plugin); - - new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_HALLOWEEN, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, - new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_GLAZED_TERRACOTTA, Material.BLACK_GLAZED_TERRACOTTA)) - .register(plugin); - - new WitherProofBlock(categories.technicalComponents, SlimefunItems.WITHER_PROOF_GLASS, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.LEAD_INGOT, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.LEAD_INGOT, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.HARDENED_GLASS, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.LEAD_INGOT, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.LEAD_INGOT}, - new SlimefunItemStack(SlimefunItems.WITHER_PROOF_GLASS, 4)) - .register(plugin); - - new GEOScanner(categories.gps, SlimefunItems.GPS_GEO_SCANNER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, null, SlimefunItems.ELECTRO_MAGNET, null, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_INGOT, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ELECTRO_MAGNET}) - .register(plugin); - - new PortableGEOScanner(categories.gps, SlimefunItems.PORTABLE_GEO_SCANNER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.ELECTRO_MAGNET, new ItemStack(Material.COMPASS), SlimefunItems.ELECTRO_MAGNET, SlimefunItems.STEEL_INGOT, SlimefunItems.GPS_MARKER_TOOL, SlimefunItems.STEEL_INGOT, SlimefunItems.SOLDER_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.SOLDER_INGOT}) - .register(plugin); - - new OilPump(categories.gps, SlimefunItems.OIL_PUMP, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.STEEL_INGOT, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.STEEL_INGOT, null, new ItemStack(Material.BUCKET), null}) { - - @Override - public int getEnergyConsumption() { - return 14; - } - - @Override - public int getCapacity() { - return 256; - } - - @Override - public int getSpeed() { - return 1; - } - - }.register(plugin); - - new GEOMiner(categories.gps, SlimefunItems.GEO_MINER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.DIAMOND_PICKAXE), SlimefunItems.MEDIUM_CAPACITOR, new ItemStack(Material.DIAMOND_PICKAXE), SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.OIL_PUMP, SlimefunItems.REINFORCED_ALLOY_INGOT, null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public int getSpeed() { - return 1; - } - - @Override - public int getCapacity() { - return 512; - } - - @Override - public int getEnergyConsumption() { - return 24; - } - - }.register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.OIL_BUCKET, new RecipeType(new NamespacedKey(plugin, "oil_pump"), SlimefunItems.OIL_PUMP), - new ItemStack[] {null, null, null, null, new ItemStack(Material.BUCKET), null, null, null, null}) - .register(plugin); - - new SlimefunItem(categories.resources, SlimefunItems.FUEL_BUCKET, RecipeType.REFINERY, - new ItemStack[] {null, null, null, null, SlimefunItems.OIL_BUCKET, null, null, null, null}) - .register(plugin); - - new RadioactiveItem(categories.resources, Radioactivity.MODERATE, SlimefunItems.NETHER_ICE, RecipeType.GEO_MINER, - new ItemStack[] {null, null, null, null, null, null, null, null, null}) - .register(plugin); - - new Refinery(categories.electricity, SlimefunItems.REFINERY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.HARDENED_GLASS, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.HARDENED_GLASS, SlimefunItems.HARDENED_GLASS, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.HARDENED_GLASS, new ItemStack(Material.PISTON), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.PISTON)}) { - - @Override - public int getEnergyConsumption() { - return 16; - } - - @Override - public int getCapacity() { - return 256; - } - - @Override - public int getSpeed() { - return 1; - } - - }.register(plugin); - - new LavaGenerator(categories.electricity, SlimefunItems.LAVA_GENERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.GOLD_16K, null, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HEATING_COIL}) { - - @Override - public int getEnergyProduction() { - return 10; - } - - @Override - public int getCapacity() { - return 512; - } - - }.register(plugin); - - new LavaGenerator(categories.electricity, SlimefunItems.LAVA_GENERATOR_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.LAVA_GENERATOR, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.HEATING_COIL, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.HEATING_COIL}) { - - @Override - public int getEnergyProduction() { - return 20; - } - - @Override - public int getCapacity() { - return 1024; - } - - }.register(plugin); - - new CombustionGenerator(categories.electricity, SlimefunItems.COMBUSTION_REACTOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.STEEL_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.STEEL_INGOT, SlimefunItems.HEATING_COIL}) { - - @Override - public int getEnergyProduction() { - return 12; - } - - @Override - public int getCapacity() { - return 256; - } - - }.register(plugin); - - new TeleporterPylon(categories.gps, SlimefunItems.GPS_TELEPORTER_PYLON, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.ZINC_INGOT, new ItemStack(Material.GLASS), SlimefunItems.ZINC_INGOT, new ItemStack(Material.GLASS), SlimefunItems.HEATING_COIL, new ItemStack(Material.GLASS), SlimefunItems.ZINC_INGOT, new ItemStack(Material.GLASS), SlimefunItems.ZINC_INGOT}, - new SlimefunItemStack(SlimefunItems.GPS_TELEPORTER_PYLON, 8)) - .register(plugin); - - new Teleporter(categories.gps, SlimefunItems.GPS_TELEPORTATION_MATRIX, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GPS_TELEPORTER_PYLON, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.GPS_TELEPORTER_PYLON, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.GPS_CONTROL_PANEL, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.GPS_TELEPORTER_PYLON, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.GPS_TELEPORTER_PYLON}) - .register(plugin); - - new SlimefunItem(categories.gps, SlimefunItems.GPS_ACTIVATION_DEVICE_SHARED, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.STONE_PRESSURE_PLATE), null, new ItemStack(Material.REDSTONE), SlimefunItems.GPS_TRANSMITTER, new ItemStack(Material.REDSTONE), SlimefunItems.BILLON_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.BILLON_INGOT}) - .register(plugin); - - new PersonalActivationPlate(categories.gps, SlimefunItems.GPS_ACTIVATION_DEVICE_PERSONAL, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.LEAD_INGOT, null, SlimefunItems.COBALT_INGOT, SlimefunItems.GPS_ACTIVATION_DEVICE_SHARED, SlimefunItems.COBALT_INGOT, null, SlimefunItems.LEAD_INGOT, null}) - .register(plugin); - - new InfusedHopper(categories.magicalGadgets, SlimefunItems.INFUSED_HOPPER, RecipeType.ANCIENT_ALTAR, - new ItemStack[] {new ItemStack(Material.OBSIDIAN), SlimefunItems.EARTH_RUNE, new ItemStack(Material.HOPPER), SlimefunItems.ENDER_RUNE, SlimefunItems.INFUSED_MAGNET, SlimefunItems.ENDER_RUNE, new ItemStack(Material.HOPPER), SlimefunItems.EARTH_RUNE, new ItemStack(Material.OBSIDIAN)}) - .register(plugin); - - new RadioactiveItem(categories.resources, Radioactivity.HIGH, SlimefunItems.BLISTERING_INGOT, RecipeType.HEATED_PRESSURE_CHAMBER, - new ItemStack[] {SlimefunItems.GOLD_24K, SlimefunItems.URANIUM, null, null, null, null, null, null, null}) - .register(plugin); - - new RadioactiveItem(categories.resources, Radioactivity.VERY_HIGH, SlimefunItems.BLISTERING_INGOT_2, RecipeType.HEATED_PRESSURE_CHAMBER, - new ItemStack[] {SlimefunItems.BLISTERING_INGOT, SlimefunItems.CARBONADO, null, null, null, null, null, null, null}) - .register(plugin); - - new RadioactiveItem(categories.resources, Radioactivity.VERY_HIGH, SlimefunItems.BLISTERING_INGOT_3, RecipeType.HEATED_PRESSURE_CHAMBER, - new ItemStack[] {SlimefunItems.BLISTERING_INGOT_2, new ItemStack(Material.NETHER_STAR), null, null, null, null, null, null, null}) - .register(plugin); - - new RadioactiveItem(categories.resources, Radioactivity.VERY_HIGH, SlimefunItems.ENRICHED_NETHER_ICE, RecipeType.HEATED_PRESSURE_CHAMBER, - new ItemStack[] {SlimefunItems.NETHER_ICE, SlimefunItems.PLUTONIUM, null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.ENRICHED_NETHER_ICE, 4)) - .register(plugin); - - new ElevatorPlate(categories.gps, SlimefunItems.ELEVATOR_PLATE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.STONE_PRESSURE_PLATE), null, new ItemStack(Material.PISTON), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.PISTON), SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ALUMINUM_BRONZE_INGOT}, - new SlimefunItemStack(SlimefunItems.ELEVATOR_PLATE, 2)) - .register(plugin); - - new FoodFabricator(categories.electricity, SlimefunItems.FOOD_FABRICATOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.BILLON_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.TIN_CAN, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.TIN_CAN, null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public int getEnergyConsumption() { - return 7; - } - - @Override - public int getCapacity() { - return 256; - } - - @Override - public int getSpeed() { - return 1; - } - - }.register(plugin); - - new FoodFabricator(categories.electricity, SlimefunItems.FOOD_FABRICATOR_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.FOOD_FABRICATOR, SlimefunItems.ELECTRIC_MOTOR, null, SlimefunItems.ELECTRO_MAGNET, null}) { - - @Override - public int getEnergyConsumption() { - return 24; - } - - @Override - public int getCapacity() { - return 512; - } - - @Override - public int getSpeed() { - return 6; - } + new ButcherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { + + @Override + public float getFuelEfficiency() { + return 1.5F; + } + + @Override + public int getTier() { + return 2; + } + + } + .register(plugin); + + new AdvancedFarmerAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_2_FARMER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER, null, new ItemStack(Material.DIAMOND_HOE), SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.DIAMOND_HOE), null, SlimefunItems.ELECTRIC_MOTOR, null}) { + + @Override + public float getFuelEfficiency() { + return 1.5F; + } + + @Override + public int getTier() { + return 2; + } + + } + .register(plugin); + + new ProgrammableAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.PLASTIC_SHEET, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.PLASTIC_SHEET, SlimefunItems.NUCLEAR_REACTOR, SlimefunItems.PROGRAMMABLE_ANDROID_2, new ItemStack(Material.CHEST), SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.POWER_CRYSTAL, SlimefunItems.BLISTERING_INGOT_3}) { + + @Override + public float getFuelEfficiency() { + return 1F; + } + + @Override + public int getTier() { + return 3; + } + + } + .register(plugin); + + new FisherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_3_FISHERMAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, null, new ItemStack(Material.FISHING_ROD), SlimefunItems.PROGRAMMABLE_ANDROID_3, new ItemStack(Material.FISHING_ROD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { + + @Override + public float getFuelEfficiency() { + return 1F; + } + + @Override + public int getTier() { + return 3; + } + + } + .register(plugin); + + new ButcherAndroid(categories.androids, SlimefunItems.PROGRAMMABLE_ANDROID_3_BUTCHER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GPS_TRANSMITTER_3, null, new ItemStack(Material.DIAMOND_SWORD), SlimefunItems.PROGRAMMABLE_ANDROID_3, new ItemStack(Material.DIAMOND_SWORD), null, SlimefunItems.ELECTRIC_MOTOR, null}) { + + @Override + public float getFuelEfficiency() { + return 1F; + } + + @Override + public int getTier() { + return 3; + } + + } + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.BLANK_RUNE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.STONE), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.STONE), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.OBSIDIAN), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.STONE), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.STONE)}) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.AIR_RUNE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.FEATHER), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.FEATHER), new ItemStack(Material.GHAST_TEAR), SlimefunItems.BLANK_RUNE, new ItemStack(Material.GHAST_TEAR), new ItemStack(Material.FEATHER), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.FEATHER)}, + new SlimefunItemStack(SlimefunItems.AIR_RUNE, 4)) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.EARTH_RUNE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.DIRT), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.STONE), new ItemStack(Material.OBSIDIAN), SlimefunItems.BLANK_RUNE, new ItemStack(Material.OBSIDIAN), new ItemStack(Material.STONE), SlimefunItems.MAGIC_LUMP_1, new ItemStack(Material.DIRT)}, + new SlimefunItemStack(SlimefunItems.EARTH_RUNE, 4)) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.FIRE_RUNE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.FIRE_CHARGE), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.FIRE_CHARGE), new ItemStack(Material.BLAZE_POWDER), SlimefunItems.EARTH_RUNE, new ItemStack(Material.FLINT_AND_STEEL), new ItemStack(Material.FIRE_CHARGE), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.FIRE_CHARGE)}, + new SlimefunItemStack(SlimefunItems.FIRE_RUNE, 4)) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.WATER_RUNE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.SALMON), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.WATER_BUCKET), new ItemStack(Material.SAND), SlimefunItems.BLANK_RUNE, new ItemStack(Material.SAND), new ItemStack(Material.WATER_BUCKET), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.COD)}, + new SlimefunItemStack(SlimefunItems.WATER_RUNE, 4)) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.ENDER_RUNE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.ENDER_PEARL), new ItemStack(Material.ENDER_EYE), SlimefunItems.BLANK_RUNE, new ItemStack(Material.ENDER_EYE), new ItemStack(Material.ENDER_PEARL), SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.ENDER_PEARL)}, + new SlimefunItemStack(SlimefunItems.ENDER_RUNE, 6)) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.LIGHTNING_RUNE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.IRON_INGOT), SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.IRON_INGOT), SlimefunItems.AIR_RUNE, new ItemStack(Material.PHANTOM_MEMBRANE), SlimefunItems.WATER_RUNE, new ItemStack(Material.IRON_INGOT), SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.IRON_INGOT)}, + new SlimefunItemStack(SlimefunItems.LIGHTNING_RUNE, 4)) + .register(plugin); + + new SlimefunItem(categories.magicalResources, SlimefunItems.RAINBOW_RUNE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.CYAN_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.ENDER_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(YELLOW_DYE), SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.MAGENTA_DYE)}) + .register(plugin); + + new SoulboundRune(categories.magicalResources, SlimefunItems.SOULBOUND_RUNE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.ENDER_LUMP_3, SlimefunItems.ENDER_RUNE, SlimefunItems.ENDER_LUMP_3, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.MAGIC_LUMP_3}) + .register(plugin); + + new EnchantmentRune(categories.magicalResources, SlimefunItems.ENCHANTMENT_RUNE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, SlimefunItems.MAGICAL_GLASS, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.MAGICAL_GLASS, SlimefunItems.LIGHTNING_RUNE, SlimefunItems.MAGICAL_GLASS, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.MAGICAL_GLASS, SlimefunItems.MAGIC_LUMP_3}) + .register(plugin); + + new InfernalBonemeal(categories.magicalGadgets, SlimefunItems.INFERNAL_BONEMEAL, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.NETHER_WART), SlimefunItems.EARTH_RUNE, new ItemStack(Material.NETHER_WART), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.BONE_MEAL), SlimefunItems.MAGIC_LUMP_2, new ItemStack(Material.NETHER_WART), new ItemStack(Material.BLAZE_POWDER), new ItemStack(Material.NETHER_WART)}, + new SlimefunItemStack(SlimefunItems.INFERNAL_BONEMEAL, 8)) + .register(plugin); + + new SlimefunItem(categories.magicalGadgets, SlimefunItems.ELYTRA_SCALE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {SlimefunItems.ENDER_LUMP_3, SlimefunItems.AIR_RUNE, SlimefunItems.ENDER_LUMP_3, new ItemStack(Material.PHANTOM_MEMBRANE), new ItemStack(Material.FEATHER), new ItemStack(Material.PHANTOM_MEMBRANE), SlimefunItems.ENDER_LUMP_3, SlimefunItems.AIR_RUNE, SlimefunItems.ENDER_LUMP_3}) + .register(plugin); + + new VanillaItem(categories.magicalGadgets, new ItemStack(Material.ELYTRA), "ELYTRA", RecipeType.ANCIENT_ALTAR, + new ItemStack[] {SlimefunItems.ELYTRA_SCALE, SlimefunItems.AIR_RUNE, SlimefunItems.ELYTRA_SCALE, SlimefunItems.AIR_RUNE, new ItemStack(Material.LEATHER_CHESTPLATE), SlimefunItems.AIR_RUNE, SlimefunItems.ELYTRA_SCALE, SlimefunItems.AIR_RUNE, SlimefunItems.ELYTRA_SCALE}) + .register(plugin); + + new SlimefunItem(categories.magicalGadgets, SlimefunItems.INFUSED_ELYTRA, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.ELYTRA_SCALE, SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.FLASK_OF_KNOWLEDGE, new ItemStack(Material.ELYTRA), SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.ELYTRA_SCALE, SlimefunItems.FLASK_OF_KNOWLEDGE}) + .register(plugin); + + new SoulboundItem(categories.magicalGadgets, SlimefunItems.SOULBOUND_ELYTRA, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.ELYTRA_SCALE, new ItemStack(Material.ELYTRA), SlimefunItems.ELYTRA_SCALE, SlimefunItems.FLASK_OF_KNOWLEDGE, SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.FLASK_OF_KNOWLEDGE}) + .register(plugin); + + new VanillaItem(categories.magicalGadgets, new ItemStack(Material.TOTEM_OF_UNDYING), "TOTEM_OF_UNDYING", RecipeType.ANCIENT_ALTAR, + new ItemStack[] {SlimefunItems.ESSENCE_OF_AFTERLIFE, new ItemStack(Material.EMERALD_BLOCK), SlimefunItems.ESSENCE_OF_AFTERLIFE, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.COMMON_TALISMAN, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.ESSENCE_OF_AFTERLIFE, new ItemStack(Material.EMERALD_BLOCK), SlimefunItems.ESSENCE_OF_AFTERLIFE}) + .register(plugin); + + new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_WOOL, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.WHITE_WOOL)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL, 8), new RainbowTickHandler(MaterialCollections.getAllWoolColors())) + .register(plugin); + + new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_GLASS, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.WHITE_STAINED_GLASS)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS, 8), new RainbowTickHandler(MaterialCollections.getAllStainedGlassColors())) + .register(plugin); + + new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_GLASS_PANE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE, 8), new RainbowTickHandler(MaterialCollections.getAllStainedGlassPaneColors())) + .register(plugin); + + new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_CLAY, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.WHITE_TERRACOTTA)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY, 8), new RainbowTickHandler(MaterialCollections.getAllTerracottaColors())) + .register(plugin); + + new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_CONCRETE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.WHITE_CONCRETE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE, 8), new RainbowTickHandler(MaterialCollections.getAllConcreteColors())) + .register(plugin); + + new RainbowBlock(categories.magicalGadgets, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA, 8), new RainbowTickHandler(MaterialCollections.getAllGlazedTerracottaColors())) + .register(plugin); + + // Christmas + + new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_WOOL_XMAS, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL_XMAS, 2), new RainbowTickHandler(Material.RED_WOOL, Material.GREEN_WOOL)) + .register(plugin); + + new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_GLASS_XMAS, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_XMAS, 2), new RainbowTickHandler(Material.RED_STAINED_GLASS, Material.GREEN_STAINED_GLASS)) + .register(plugin); + + new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_GLASS_PANE_XMAS, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE_XMAS, 2), new RainbowTickHandler(Material.RED_STAINED_GLASS_PANE, Material.GREEN_STAINED_GLASS_PANE)) + .register(plugin); + + new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_CLAY_XMAS, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY_XMAS, 2), new RainbowTickHandler(Material.RED_TERRACOTTA, Material.GREEN_TERRACOTTA)) + .register(plugin); + + new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_CONCRETE_XMAS, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE_XMAS, 2), new RainbowTickHandler(Material.RED_CONCRETE, Material.GREEN_CONCRETE)) + .register(plugin); + + new RainbowBlock(categories.christmas, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_XMAS, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(GREEN_DYE), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(GREEN_DYE), SlimefunItems.CHRISTMAS_COOKIE, new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_XMAS, 2), new RainbowTickHandler(Material.RED_GLAZED_TERRACOTTA, Material.GREEN_GLAZED_TERRACOTTA)) + .register(plugin); + + // Valentines Day + + new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_WOOL_VALENTINE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_WOOL, Material.PINK_WOOL)) + .register(plugin); + + new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_GLASS_VALENTINE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_STAINED_GLASS, Material.PINK_STAINED_GLASS)) + .register(plugin); + + new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_GLASS_PANE_VALENTINE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_STAINED_GLASS_PANE, Material.PINK_STAINED_GLASS_PANE)) + .register(plugin); + + new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_CLAY_VALENTINE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_TERRACOTTA, Material.PINK_TERRACOTTA)) + .register(plugin); + + new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_CONCRETE_VALENTINE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_CONCRETE, Material.PINK_CONCRETE)) + .register(plugin); + + new RainbowBlock(categories.valentinesDay, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_VALENTINE, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(RED_DYE), new ItemStack(Material.POPPY), new ItemStack(Material.PINK_DYE), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(Material.PINK_DYE), new ItemStack(Material.POPPY), new ItemStack(RED_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_VALENTINE, 2), new RainbowTickHandler(Material.MAGENTA_GLAZED_TERRACOTTA, Material.PINK_GLAZED_TERRACOTTA)) + .register(plugin); + + // Halloween + + new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_WOOL_HALLOWEEN, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_WOOL), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_WOOL), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_WOOL_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_WOOL, Material.BLACK_WOOL)) + .register(plugin); + + new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_GLASS_HALLOWEEN, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_STAINED_GLASS, Material.BLACK_STAINED_GLASS)) + .register(plugin); + + new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_GLASS_PANE_HALLOWEEN, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_STAINED_GLASS_PANE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_STAINED_GLASS_PANE), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLASS_PANE_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_STAINED_GLASS_PANE, Material.BLACK_STAINED_GLASS_PANE)) + .register(plugin); + + new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_CLAY_HALLOWEEN, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_TERRACOTTA), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_CLAY_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_TERRACOTTA, Material.BLACK_TERRACOTTA)) + .register(plugin); + + new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_CONCRETE_HALLOWEEN, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_CONCRETE), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_CONCRETE), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_CONCRETE_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_CONCRETE, Material.BLACK_CONCRETE)) + .register(plugin); + + new RainbowBlock(categories.halloween, SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_HALLOWEEN, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.ORANGE_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(BLACK_DYE), new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), SlimefunItems.RAINBOW_RUNE, new ItemStack(Material.WHITE_GLAZED_TERRACOTTA), new ItemStack(BLACK_DYE), new ItemStack(Material.PUMPKIN), new ItemStack(Material.ORANGE_DYE)}, + new SlimefunItemStack(SlimefunItems.RAINBOW_GLAZED_TERRACOTTA_HALLOWEEN, 2), new RainbowTickHandler(Material.ORANGE_GLAZED_TERRACOTTA, Material.BLACK_GLAZED_TERRACOTTA)) + .register(plugin); + + new WitherProofBlock(categories.technicalComponents, SlimefunItems.WITHER_PROOF_GLASS, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.LEAD_INGOT, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.LEAD_INGOT, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.HARDENED_GLASS, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.LEAD_INGOT, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.LEAD_INGOT}, + new SlimefunItemStack(SlimefunItems.WITHER_PROOF_GLASS, 4)) + .register(plugin); + + new GEOScanner(categories.gps, SlimefunItems.GPS_GEO_SCANNER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, null, SlimefunItems.ELECTRO_MAGNET, null, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_INGOT, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ELECTRO_MAGNET}) + .register(plugin); + + new PortableGEOScanner(categories.gps, SlimefunItems.PORTABLE_GEO_SCANNER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.ELECTRO_MAGNET, new ItemStack(Material.COMPASS), SlimefunItems.ELECTRO_MAGNET, SlimefunItems.STEEL_INGOT, SlimefunItems.GPS_MARKER_TOOL, SlimefunItems.STEEL_INGOT, SlimefunItems.SOLDER_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.SOLDER_INGOT}) + .register(plugin); + + new OilPump(categories.gps, SlimefunItems.OIL_PUMP, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.STEEL_INGOT, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.STEEL_INGOT, SlimefunItems.STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.STEEL_INGOT, null, new ItemStack(Material.BUCKET), null}) { + + @Override + public int getEnergyConsumption() { + return 14; + } + + @Override + public int getCapacity() { + return 256; + } + + @Override + public int getSpeed() { + return 1; + } + + }.register(plugin); + + new GEOMiner(categories.gps, SlimefunItems.GEO_MINER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.DIAMOND_PICKAXE), SlimefunItems.MEDIUM_CAPACITOR, new ItemStack(Material.DIAMOND_PICKAXE), SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.OIL_PUMP, SlimefunItems.REINFORCED_ALLOY_INGOT, null, SlimefunItems.ELECTRIC_MOTOR, null}) { + + @Override + public int getSpeed() { + return 1; + } + + @Override + public int getCapacity() { + return 512; + } + + @Override + public int getEnergyConsumption() { + return 24; + } + + }.register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.OIL_BUCKET, new RecipeType(new NamespacedKey(plugin, "oil_pump"), SlimefunItems.OIL_PUMP), + new ItemStack[] {null, null, null, null, new ItemStack(Material.BUCKET), null, null, null, null}) + .register(plugin); + + new SlimefunItem(categories.resources, SlimefunItems.FUEL_BUCKET, RecipeType.REFINERY, + new ItemStack[] {null, null, null, null, SlimefunItems.OIL_BUCKET, null, null, null, null}) + .register(plugin); + + new RadioactiveItem(categories.resources, Radioactivity.MODERATE, SlimefunItems.NETHER_ICE, RecipeType.GEO_MINER, + new ItemStack[] {null, null, null, null, null, null, null, null, null}) + .register(plugin); + + new Refinery(categories.electricity, SlimefunItems.REFINERY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.HARDENED_GLASS, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.HARDENED_GLASS, SlimefunItems.HARDENED_GLASS, SlimefunItems.REDSTONE_ALLOY, SlimefunItems.HARDENED_GLASS, new ItemStack(Material.PISTON), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.PISTON)}) { + + @Override + public int getEnergyConsumption() { + return 16; + } + + @Override + public int getCapacity() { + return 256; + } + + @Override + public int getSpeed() { + return 1; + } + + }.register(plugin); + + new LavaGenerator(categories.electricity, SlimefunItems.LAVA_GENERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.GOLD_16K, null, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HEATING_COIL}) { + + @Override + public int getEnergyProduction() { + return 10; + } + + @Override + public int getCapacity() { + return 512; + } + + }.register(plugin); + + new LavaGenerator(categories.electricity, SlimefunItems.LAVA_GENERATOR_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.LAVA_GENERATOR, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.HEATING_COIL, SlimefunItems.COMPRESSED_CARBON, SlimefunItems.HEATING_COIL}) { + + @Override + public int getEnergyProduction() { + return 20; + } + + @Override + public int getCapacity() { + return 1024; + } + + }.register(plugin); + + new CombustionGenerator(categories.electricity, SlimefunItems.COMBUSTION_REACTOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.STEEL_INGOT, null, SlimefunItems.STEEL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.STEEL_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.STEEL_INGOT, SlimefunItems.HEATING_COIL}) { + + @Override + public int getEnergyProduction() { + return 12; + } + + @Override + public int getCapacity() { + return 256; + } + + }.register(plugin); + + new TeleporterPylon(categories.gps, SlimefunItems.GPS_TELEPORTER_PYLON, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.ZINC_INGOT, new ItemStack(Material.GLASS), SlimefunItems.ZINC_INGOT, new ItemStack(Material.GLASS), SlimefunItems.HEATING_COIL, new ItemStack(Material.GLASS), SlimefunItems.ZINC_INGOT, new ItemStack(Material.GLASS), SlimefunItems.ZINC_INGOT}, + new SlimefunItemStack(SlimefunItems.GPS_TELEPORTER_PYLON, 8)) + .register(plugin); + + new Teleporter(categories.gps, SlimefunItems.GPS_TELEPORTATION_MATRIX, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GPS_TELEPORTER_PYLON, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.GPS_TELEPORTER_PYLON, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.GPS_CONTROL_PANEL, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.GPS_TELEPORTER_PYLON, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.GPS_TELEPORTER_PYLON}) + .register(plugin); + + new SlimefunItem(categories.gps, SlimefunItems.GPS_ACTIVATION_DEVICE_SHARED, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.STONE_PRESSURE_PLATE), null, new ItemStack(Material.REDSTONE), SlimefunItems.GPS_TRANSMITTER, new ItemStack(Material.REDSTONE), SlimefunItems.BILLON_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.BILLON_INGOT}) + .register(plugin); + + new PersonalActivationPlate(categories.gps, SlimefunItems.GPS_ACTIVATION_DEVICE_PERSONAL, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.LEAD_INGOT, null, SlimefunItems.COBALT_INGOT, SlimefunItems.GPS_ACTIVATION_DEVICE_SHARED, SlimefunItems.COBALT_INGOT, null, SlimefunItems.LEAD_INGOT, null}) + .register(plugin); + + new InfusedHopper(categories.magicalGadgets, SlimefunItems.INFUSED_HOPPER, RecipeType.ANCIENT_ALTAR, + new ItemStack[] {new ItemStack(Material.OBSIDIAN), SlimefunItems.EARTH_RUNE, new ItemStack(Material.HOPPER), SlimefunItems.ENDER_RUNE, SlimefunItems.INFUSED_MAGNET, SlimefunItems.ENDER_RUNE, new ItemStack(Material.HOPPER), SlimefunItems.EARTH_RUNE, new ItemStack(Material.OBSIDIAN)}) + .register(plugin); + + new RadioactiveItem(categories.resources, Radioactivity.HIGH, SlimefunItems.BLISTERING_INGOT, RecipeType.HEATED_PRESSURE_CHAMBER, + new ItemStack[] {SlimefunItems.GOLD_24K, SlimefunItems.URANIUM, null, null, null, null, null, null, null}) + .register(plugin); + + new RadioactiveItem(categories.resources, Radioactivity.VERY_HIGH, SlimefunItems.BLISTERING_INGOT_2, RecipeType.HEATED_PRESSURE_CHAMBER, + new ItemStack[] {SlimefunItems.BLISTERING_INGOT, SlimefunItems.CARBONADO, null, null, null, null, null, null, null}) + .register(plugin); + + new RadioactiveItem(categories.resources, Radioactivity.VERY_HIGH, SlimefunItems.BLISTERING_INGOT_3, RecipeType.HEATED_PRESSURE_CHAMBER, + new ItemStack[] {SlimefunItems.BLISTERING_INGOT_2, new ItemStack(Material.NETHER_STAR), null, null, null, null, null, null, null}) + .register(plugin); + + new RadioactiveItem(categories.resources, Radioactivity.VERY_HIGH, SlimefunItems.ENRICHED_NETHER_ICE, RecipeType.HEATED_PRESSURE_CHAMBER, + new ItemStack[] {SlimefunItems.NETHER_ICE, SlimefunItems.PLUTONIUM, null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.ENRICHED_NETHER_ICE, 4)) + .register(plugin); + + new ElevatorPlate(categories.gps, SlimefunItems.ELEVATOR_PLATE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.STONE_PRESSURE_PLATE), null, new ItemStack(Material.PISTON), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.PISTON), SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ALUMINUM_BRONZE_INGOT}, + new SlimefunItemStack(SlimefunItems.ELEVATOR_PLATE, 2)) + .register(plugin); + + new FoodFabricator(categories.electricity, SlimefunItems.FOOD_FABRICATOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.BILLON_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.BILLON_INGOT, SlimefunItems.TIN_CAN, SlimefunItems.SMALL_CAPACITOR, SlimefunItems.TIN_CAN, null, SlimefunItems.ELECTRIC_MOTOR, null}) { + + @Override + public int getEnergyConsumption() { + return 7; + } + + @Override + public int getCapacity() { + return 256; + } + + @Override + public int getSpeed() { + return 1; + } + + }.register(plugin); + + new FoodFabricator(categories.electricity, SlimefunItems.FOOD_FABRICATOR_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.FOOD_FABRICATOR, SlimefunItems.ELECTRIC_MOTOR, null, SlimefunItems.ELECTRO_MAGNET, null}) { + + @Override + public int getEnergyConsumption() { + return 24; + } + + @Override + public int getCapacity() { + return 512; + } + + @Override + public int getSpeed() { + return 6; + } - }.register(plugin); + }.register(plugin); - new OrganicFood(categories.misc, SlimefunItems.WHEAT_ORGANIC_FOOD, Material.WHEAT) - .register(plugin); - - new OrganicFood(categories.misc, SlimefunItems.CARROT_ORGANIC_FOOD, Material.CARROT) - .register(plugin); + new OrganicFood(categories.misc, SlimefunItems.WHEAT_ORGANIC_FOOD, Material.WHEAT) + .register(plugin); + + new OrganicFood(categories.misc, SlimefunItems.CARROT_ORGANIC_FOOD, Material.CARROT) + .register(plugin); - new OrganicFood(categories.misc, SlimefunItems.POTATO_ORGANIC_FOOD, Material.POTATO) - .register(plugin); + new OrganicFood(categories.misc, SlimefunItems.POTATO_ORGANIC_FOOD, Material.POTATO) + .register(plugin); - new OrganicFood(categories.misc, SlimefunItems.SEEDS_ORGANIC_FOOD, Material.WHEAT_SEEDS) - .register(plugin); + new OrganicFood(categories.misc, SlimefunItems.SEEDS_ORGANIC_FOOD, Material.WHEAT_SEEDS) + .register(plugin); - new OrganicFood(categories.misc, SlimefunItems.BEETROOT_ORGANIC_FOOD, Material.BEETROOT) - .register(plugin); + new OrganicFood(categories.misc, SlimefunItems.BEETROOT_ORGANIC_FOOD, Material.BEETROOT) + .register(plugin); - new OrganicFood(categories.misc, SlimefunItems.MELON_ORGANIC_FOOD, Material.MELON_SLICE) - .register(plugin); + new OrganicFood(categories.misc, SlimefunItems.MELON_ORGANIC_FOOD, Material.MELON_SLICE) + .register(plugin); - new OrganicFood(categories.misc, SlimefunItems.APPLE_ORGANIC_FOOD, Material.APPLE) - .register(plugin); + new OrganicFood(categories.misc, SlimefunItems.APPLE_ORGANIC_FOOD, Material.APPLE) + .register(plugin); - if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { - new OrganicFood(categories.misc, SlimefunItems.SWEET_BERRIES_ORGANIC_FOOD, Material.SWEET_BERRIES) - .register(plugin); - } + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { + new OrganicFood(categories.misc, SlimefunItems.SWEET_BERRIES_ORGANIC_FOOD, Material.SWEET_BERRIES) + .register(plugin); + } - new OrganicFood(categories.misc, SlimefunItems.KELP_ORGANIC_FOOD, Material.DRIED_KELP) - .register(plugin); + new OrganicFood(categories.misc, SlimefunItems.KELP_ORGANIC_FOOD, Material.DRIED_KELP) + .register(plugin); new OrganicFood(categories.misc, SlimefunItems.COCOA_ORGANIC_FOOD, Material.COCOA_BEANS) .register(plugin); - new AutoBreeder(categories.electricity, SlimefunItems.AUTO_BREEDER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.GOLD_18K, SlimefunItems.TIN_CAN, SlimefunItems.GOLD_18K, SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.HAY_BLOCK), SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.LEAD_INGOT, SlimefunItems.FOOD_FABRICATOR, SlimefunItems.LEAD_INGOT}) - .register(plugin); + new AutoBreeder(categories.electricity, SlimefunItems.AUTO_BREEDER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.GOLD_18K, SlimefunItems.TIN_CAN, SlimefunItems.GOLD_18K, SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.HAY_BLOCK), SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.LEAD_INGOT, SlimefunItems.FOOD_FABRICATOR, SlimefunItems.LEAD_INGOT}) + .register(plugin); - new AnimalGrowthAccelerator(categories.electricity, SlimefunItems.ANIMAL_GROWTH_ACCELERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.WHEAT_ORGANIC_FOOD, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.AUTO_BREEDER, SlimefunItems.REINFORCED_ALLOY_INGOT}) - .register(plugin); + new AnimalGrowthAccelerator(categories.electricity, SlimefunItems.ANIMAL_GROWTH_ACCELERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.WHEAT_ORGANIC_FOOD, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.AUTO_BREEDER, SlimefunItems.REINFORCED_ALLOY_INGOT}) + .register(plugin); new TreeGrowthAccelerator(categories.electricity, SlimefunItems.TREE_GROWTH_ACCELERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {null, SlimefunItems.CARBONADO, null, SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.DIAMOND_AXE), SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.MAGNESIUM_SALT, SlimefunItems.BIG_CAPACITOR, SlimefunItems.MAGNESIUM_SALT}) .register(plugin); - + new XPCollector(categories.electricity, SlimefunItems.EXP_COLLECTOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.AUTO_ENCHANTER, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_BRONZE_INGOT}) - .register(plugin); + new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.AUTO_ENCHANTER, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_BRONZE_INGOT}) + .register(plugin); - new FoodComposter(categories.electricity, SlimefunItems.FOOD_COMPOSTER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.FOOD_FABRICATOR, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.TIN_CAN, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.TIN_CAN, null, SlimefunItems.ELECTRIC_MOTOR, null}) { - - @Override - public int getEnergyConsumption() { - return 8; - } + new FoodComposter(categories.electricity, SlimefunItems.FOOD_COMPOSTER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.FOOD_FABRICATOR, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.TIN_CAN, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.TIN_CAN, null, SlimefunItems.ELECTRIC_MOTOR, null}) { + + @Override + public int getEnergyConsumption() { + return 8; + } - @Override - public int getCapacity() { - return 256; - } + @Override + public int getCapacity() { + return 256; + } - @Override - public int getSpeed() { - return 1; - } + @Override + public int getSpeed() { + return 1; + } - }.register(plugin); + }.register(plugin); - new FoodComposter(categories.electricity, SlimefunItems.FOOD_COMPOSTER_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.FOOD_COMPOSTER, SlimefunItems.ELECTRIC_MOTOR, null, SlimefunItems.ELECTRO_MAGNET, null}) { + new FoodComposter(categories.electricity, SlimefunItems.FOOD_COMPOSTER_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.HARDENED_METAL_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.FOOD_COMPOSTER, SlimefunItems.ELECTRIC_MOTOR, null, SlimefunItems.ELECTRO_MAGNET, null}) { - @Override - public int getEnergyConsumption() { - return 26; - } + @Override + public int getEnergyConsumption() { + return 26; + } - @Override - public int getCapacity() { - return 512; - } + @Override + public int getCapacity() { + return 512; + } - @Override - public int getSpeed() { - return 10; - } + @Override + public int getSpeed() { + return 10; + } - }.register(plugin); + }.register(plugin); - new OrganicFertilizer(categories.misc, SlimefunItems.WHEAT_FERTILIZER, SlimefunItems.WHEAT_ORGANIC_FOOD) - .register(plugin); + new OrganicFertilizer(categories.misc, SlimefunItems.WHEAT_FERTILIZER, SlimefunItems.WHEAT_ORGANIC_FOOD) + .register(plugin); - new OrganicFertilizer(categories.misc, SlimefunItems.CARROT_FERTILIZER, SlimefunItems.CARROT_ORGANIC_FOOD) - .register(plugin); + new OrganicFertilizer(categories.misc, SlimefunItems.CARROT_FERTILIZER, SlimefunItems.CARROT_ORGANIC_FOOD) + .register(plugin); - new OrganicFertilizer(categories.misc, SlimefunItems.POTATO_FERTILIZER, SlimefunItems.POTATO_ORGANIC_FOOD) - .register(plugin); + new OrganicFertilizer(categories.misc, SlimefunItems.POTATO_FERTILIZER, SlimefunItems.POTATO_ORGANIC_FOOD) + .register(plugin); - new OrganicFertilizer(categories.misc, SlimefunItems.SEEDS_FERTILIZER, SlimefunItems.SEEDS_ORGANIC_FOOD) - .register(plugin); + new OrganicFertilizer(categories.misc, SlimefunItems.SEEDS_FERTILIZER, SlimefunItems.SEEDS_ORGANIC_FOOD) + .register(plugin); - new OrganicFertilizer(categories.misc, SlimefunItems.BEETROOT_FERTILIZER, SlimefunItems.BEETROOT_ORGANIC_FOOD) - .register(plugin); + new OrganicFertilizer(categories.misc, SlimefunItems.BEETROOT_FERTILIZER, SlimefunItems.BEETROOT_ORGANIC_FOOD) + .register(plugin); - new OrganicFertilizer(categories.misc, SlimefunItems.MELON_FERTILIZER, SlimefunItems.MELON_ORGANIC_FOOD) - .register(plugin); + new OrganicFertilizer(categories.misc, SlimefunItems.MELON_FERTILIZER, SlimefunItems.MELON_ORGANIC_FOOD) + .register(plugin); - new OrganicFertilizer(categories.misc, SlimefunItems.APPLE_FERTILIZER, SlimefunItems.APPLE_ORGANIC_FOOD) - .register(plugin); + new OrganicFertilizer(categories.misc, SlimefunItems.APPLE_FERTILIZER, SlimefunItems.APPLE_ORGANIC_FOOD) + .register(plugin); - new OrganicFertilizer(categories.misc, SlimefunItems.SWEET_BERRIES_FERTILIZER, SlimefunItems.SWEET_BERRIES_ORGANIC_FOOD) - .register(plugin); + new OrganicFertilizer(categories.misc, SlimefunItems.SWEET_BERRIES_FERTILIZER, SlimefunItems.SWEET_BERRIES_ORGANIC_FOOD) + .register(plugin); - new OrganicFertilizer(categories.misc, SlimefunItems.KELP_FERTILIZER, SlimefunItems.KELP_ORGANIC_FOOD) - .register(plugin); + new OrganicFertilizer(categories.misc, SlimefunItems.KELP_FERTILIZER, SlimefunItems.KELP_ORGANIC_FOOD) + .register(plugin); new OrganicFertilizer(categories.misc, SlimefunItems.COCOA_FERTILIZER, SlimefunItems.COCOA_ORGANIC_FOOD) .register(plugin); - new CropGrowthAccelerator(categories.electricity, SlimefunItems.CROP_GROWTH_ACCELERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.PROGRAMMABLE_ANDROID_FARMER, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ANIMAL_GROWTH_ACCELERATOR, SlimefunItems.ELECTRO_MAGNET}) { + new CropGrowthAccelerator(categories.electricity, SlimefunItems.CROP_GROWTH_ACCELERATOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.PROGRAMMABLE_ANDROID_FARMER, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ANIMAL_GROWTH_ACCELERATOR, SlimefunItems.ELECTRO_MAGNET}) { - @Override - public int getEnergyConsumption() { - return 25; - } + @Override + public int getEnergyConsumption() { + return 25; + } - @Override - public int getRadius() { - return 3; - } + @Override + public int getRadius() { + return 3; + } - @Override - public int getSpeed() { - return 3; - } + @Override + public int getSpeed() { + return 3; + } - }.register(plugin); + }.register(plugin); - new CropGrowthAccelerator(categories.electricity, SlimefunItems.CROP_GROWTH_ACCELERATOR_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CROP_GROWTH_ACCELERATOR, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ADVANCED_CIRCUIT_BOARD, SlimefunItems.ELECTRO_MAGNET}) { + new CropGrowthAccelerator(categories.electricity, SlimefunItems.CROP_GROWTH_ACCELERATOR_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CROP_GROWTH_ACCELERATOR, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.ADVANCED_CIRCUIT_BOARD, SlimefunItems.ELECTRO_MAGNET}) { - @Override - public int getEnergyConsumption() { - return 30; - } + @Override + public int getEnergyConsumption() { + return 30; + } - @Override - public int getRadius() { - return 4; - } + @Override + public int getRadius() { + return 4; + } - @Override - public int getSpeed() { - return 4; - } + @Override + public int getSpeed() { + return 4; + } - }.register(plugin); + }.register(plugin); - new Freezer(categories.electricity, SlimefunItems.FREEZER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.SILVER_INGOT, null, SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.PACKED_ICE), SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.COOLING_UNIT, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.COOLING_UNIT}) { - - @Override - public int getEnergyConsumption() { - return 9; - } + new Freezer(categories.electricity, SlimefunItems.FREEZER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.SILVER_INGOT, null, SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.PACKED_ICE), SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.COOLING_UNIT, SlimefunItems.MEDIUM_CAPACITOR, SlimefunItems.COOLING_UNIT}) { + + @Override + public int getEnergyConsumption() { + return 9; + } - @Override - public int getSpeed() { - return 1; - } + @Override + public int getSpeed() { + return 1; + } - }.register(plugin); + }.register(plugin); - new Freezer(categories.electricity, SlimefunItems.FREEZER_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.SILVER_INGOT, null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.FREEZER, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.COOLING_UNIT, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.COOLING_UNIT}) { + new Freezer(categories.electricity, SlimefunItems.FREEZER_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.SILVER_INGOT, null, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.FREEZER, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.COOLING_UNIT, SlimefunItems.ALUMINUM_BRASS_INGOT, SlimefunItems.COOLING_UNIT}) { - @Override - public int getEnergyConsumption() { - return 15; - } + @Override + public int getEnergyConsumption() { + return 15; + } - @Override - public int getSpeed() { - return 2; - } + @Override + public int getSpeed() { + return 2; + } - }.register(plugin); + }.register(plugin); - new CoolantCell(categories.technicalComponents, SlimefunItems.REACTOR_COOLANT_CELL, RecipeType.FREEZER, - new ItemStack[] {new ItemStack(Material.BLUE_ICE), null, null, null, null, null, null, null, null}) - .register(plugin); + new CoolantCell(categories.technicalComponents, SlimefunItems.REACTOR_COOLANT_CELL, RecipeType.FREEZER, + new ItemStack[] {new ItemStack(Material.BLUE_ICE), null, null, null, null, null, null, null, null}) + .register(plugin); - new CoolantCell(categories.technicalComponents, SlimefunItems.NETHER_ICE_COOLANT_CELL, RecipeType.HEATED_PRESSURE_CHAMBER, - new ItemStack[] {SlimefunItems.ENRICHED_NETHER_ICE, null, null, null, null, null, null, null, null}, - new SlimefunItemStack(SlimefunItems.NETHER_ICE_COOLANT_CELL, 8)) - .register(plugin); + new CoolantCell(categories.technicalComponents, SlimefunItems.NETHER_ICE_COOLANT_CELL, RecipeType.HEATED_PRESSURE_CHAMBER, + new ItemStack[] {SlimefunItems.ENRICHED_NETHER_ICE, null, null, null, null, null, null, null, null}, + new SlimefunItemStack(SlimefunItems.NETHER_ICE_COOLANT_CELL, 8)) + .register(plugin); - new RadioactiveItem(categories.resources, Radioactivity.HIGH, SlimefunItems.NEPTUNIUM, RecipeType.NUCLEAR_REACTOR, - new ItemStack[] {SlimefunItems.URANIUM, null, null, null, null, null, null, null, null}) - .register(plugin); + new RadioactiveItem(categories.resources, Radioactivity.HIGH, SlimefunItems.NEPTUNIUM, RecipeType.NUCLEAR_REACTOR, + new ItemStack[] {SlimefunItems.URANIUM, null, null, null, null, null, null, null, null}) + .register(plugin); - new RadioactiveItem(categories.resources, Radioactivity.VERY_HIGH, SlimefunItems.PLUTONIUM, RecipeType.NUCLEAR_REACTOR, - new ItemStack[] {SlimefunItems.NEPTUNIUM, null, null, null, null, null, null, null, null}) - .register(plugin); + new RadioactiveItem(categories.resources, Radioactivity.VERY_HIGH, SlimefunItems.PLUTONIUM, RecipeType.NUCLEAR_REACTOR, + new ItemStack[] {SlimefunItems.NEPTUNIUM, null, null, null, null, null, null, null, null}) + .register(plugin); - new RadioactiveItem(categories.resources, Radioactivity.VERY_HIGH, SlimefunItems.BOOSTED_URANIUM, RecipeType.HEATED_PRESSURE_CHAMBER, - new ItemStack[] {SlimefunItems.PLUTONIUM, SlimefunItems.URANIUM, null, null, null, null, null, null, null}) - .register(plugin); + new RadioactiveItem(categories.resources, Radioactivity.VERY_HIGH, SlimefunItems.BOOSTED_URANIUM, RecipeType.HEATED_PRESSURE_CHAMBER, + new ItemStack[] {SlimefunItems.PLUTONIUM, SlimefunItems.URANIUM, null, null, null, null, null, null, null}) + .register(plugin); - new NuclearReactor(categories.electricity, SlimefunItems.NUCLEAR_REACTOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.CARBONADO_EDGED_CAPACITOR, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.REINFORCED_PLATE, SlimefunItems.COOLING_UNIT, SlimefunItems.REINFORCED_PLATE, SlimefunItems.LEAD_INGOT, SlimefunItems.REINFORCED_PLATE, SlimefunItems.LEAD_INGOT}){ - - @Override - public int getEnergyProduction() { - return 250; - } + new NuclearReactor(categories.electricity, SlimefunItems.NUCLEAR_REACTOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.CARBONADO_EDGED_CAPACITOR, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.REINFORCED_PLATE, SlimefunItems.COOLING_UNIT, SlimefunItems.REINFORCED_PLATE, SlimefunItems.LEAD_INGOT, SlimefunItems.REINFORCED_PLATE, SlimefunItems.LEAD_INGOT}){ + + @Override + public int getEnergyProduction() { + return 250; + } - @Override - public int getCapacity() { - return 16384; - } - - }.register(plugin); + @Override + public int getCapacity() { + return 16384; + } + + }.register(plugin); - new NetherStarReactor(categories.electricity, SlimefunItems.NETHER_STAR_REACTOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.BOOSTED_URANIUM, SlimefunItems.CARBONADO_EDGED_CAPACITOR, SlimefunItems.BOOSTED_URANIUM, SlimefunItems.REINFORCED_PLATE, new ItemStack(Material.NETHER_STAR), SlimefunItems.REINFORCED_PLATE, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.REINFORCED_PLATE, SlimefunItems.CORINTHIAN_BRONZE_INGOT}){ + new NetherStarReactor(categories.electricity, SlimefunItems.NETHER_STAR_REACTOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.BOOSTED_URANIUM, SlimefunItems.CARBONADO_EDGED_CAPACITOR, SlimefunItems.BOOSTED_URANIUM, SlimefunItems.REINFORCED_PLATE, new ItemStack(Material.NETHER_STAR), SlimefunItems.REINFORCED_PLATE, SlimefunItems.CORINTHIAN_BRONZE_INGOT, SlimefunItems.REINFORCED_PLATE, SlimefunItems.CORINTHIAN_BRONZE_INGOT}){ - @Override - public int getEnergyProduction() { - return 512; - } + @Override + public int getEnergyProduction() { + return 512; + } - @Override - public int getCapacity() { - return 32768; - } + @Override + public int getCapacity() { + return 32768; + } - }.register(plugin); + }.register(plugin); - new SlimefunItem(categories.cargo, SlimefunItems.CARGO_MOTOR, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.HARDENED_GLASS, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.HARDENED_GLASS, SlimefunItems.SILVER_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.SILVER_INGOT, SlimefunItems.HARDENED_GLASS, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.HARDENED_GLASS}, - new SlimefunItemStack(SlimefunItems.CARGO_MOTOR, 4)) - .register(plugin); + new SlimefunItem(categories.cargo, SlimefunItems.CARGO_MOTOR, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.HARDENED_GLASS, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.HARDENED_GLASS, SlimefunItems.SILVER_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.SILVER_INGOT, SlimefunItems.HARDENED_GLASS, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.HARDENED_GLASS}, + new SlimefunItemStack(SlimefunItems.CARGO_MOTOR, 4)) + .register(plugin); - new CargoManager(categories.cargo, SlimefunItems.CARGO_MANAGER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.HOLOGRAM_PROJECTOR, null, SlimefunItems.REINFORCED_PLATE, SlimefunItems.CARGO_MOTOR, SlimefunItems.REINFORCED_PLATE, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.ALUMINUM_BRONZE_INGOT}) - .register(plugin); + new CargoManager(categories.cargo, SlimefunItems.CARGO_MANAGER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.HOLOGRAM_PROJECTOR, null, SlimefunItems.REINFORCED_PLATE, SlimefunItems.CARGO_MOTOR, SlimefunItems.REINFORCED_PLATE, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.ALUMINUM_BRONZE_INGOT}) + .register(plugin); - new CargoConnectorNode(categories.cargo, SlimefunItems.CARGO_CONNECTOR_NODE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.BRONZE_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.BRONZE_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.CARGO_MOTOR, SlimefunItems.SILVER_INGOT, SlimefunItems.BRONZE_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.BRONZE_INGOT}, - new SlimefunItemStack(SlimefunItems.CARGO_CONNECTOR_NODE, 4)) - .register(plugin); + new CargoConnectorNode(categories.cargo, SlimefunItems.CARGO_CONNECTOR_NODE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.BRONZE_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.BRONZE_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.CARGO_MOTOR, SlimefunItems.SILVER_INGOT, SlimefunItems.BRONZE_INGOT, SlimefunItems.SILVER_INGOT, SlimefunItems.BRONZE_INGOT}, + new SlimefunItemStack(SlimefunItems.CARGO_CONNECTOR_NODE, 4)) + .register(plugin); - new CargoInputNode(categories.cargo, SlimefunItems.CARGO_INPUT_NODE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.HOPPER), null, SlimefunItems.BILLON_INGOT, SlimefunItems.CARGO_CONNECTOR_NODE, SlimefunItems.BILLON_INGOT, null, new ItemStack(Material.HOPPER), null}, - new SlimefunItemStack(SlimefunItems.CARGO_INPUT_NODE, 2)) - .register(plugin); + new CargoInputNode(categories.cargo, SlimefunItems.CARGO_INPUT_NODE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.HOPPER), null, SlimefunItems.BILLON_INGOT, SlimefunItems.CARGO_CONNECTOR_NODE, SlimefunItems.BILLON_INGOT, null, new ItemStack(Material.HOPPER), null}, + new SlimefunItemStack(SlimefunItems.CARGO_INPUT_NODE, 2)) + .register(plugin); - new CargoOutputNode(categories.cargo, SlimefunItems.CARGO_OUTPUT_NODE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.HOPPER), null, SlimefunItems.BRASS_INGOT, SlimefunItems.CARGO_CONNECTOR_NODE, SlimefunItems.BRASS_INGOT, null, new ItemStack(Material.HOPPER), null}, - new SlimefunItemStack(SlimefunItems.CARGO_OUTPUT_NODE, 2)) - .register(plugin); + new CargoOutputNode(categories.cargo, SlimefunItems.CARGO_OUTPUT_NODE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.HOPPER), null, SlimefunItems.BRASS_INGOT, SlimefunItems.CARGO_CONNECTOR_NODE, SlimefunItems.BRASS_INGOT, null, new ItemStack(Material.HOPPER), null}, + new SlimefunItemStack(SlimefunItems.CARGO_OUTPUT_NODE, 2)) + .register(plugin); - new AdvancedCargoOutputNode(categories.cargo, SlimefunItems.CARGO_OUTPUT_NODE_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.CARGO_MOTOR, null, SlimefunItems.COBALT_INGOT, SlimefunItems.CARGO_OUTPUT_NODE, SlimefunItems.COBALT_INGOT, null, SlimefunItems.CARGO_MOTOR, null}) - .register(plugin); + new AdvancedCargoOutputNode(categories.cargo, SlimefunItems.CARGO_OUTPUT_NODE_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.CARGO_MOTOR, null, SlimefunItems.COBALT_INGOT, SlimefunItems.CARGO_OUTPUT_NODE, SlimefunItems.COBALT_INGOT, null, SlimefunItems.CARGO_MOTOR, null}) + .register(plugin); - new AutomatedCraftingChamber(categories.electricity, SlimefunItems.AUTOMATED_CRAFTING_CHAMBER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, new ItemStack(Material.CRAFTING_TABLE), null, SlimefunItems.CARGO_MOTOR, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.CARGO_MOTOR, null, SlimefunItems.ELECTRIC_MOTOR, null}) { + new AutomatedCraftingChamber(categories.electricity, SlimefunItems.AUTOMATED_CRAFTING_CHAMBER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, new ItemStack(Material.CRAFTING_TABLE), null, SlimefunItems.CARGO_MOTOR, SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.CARGO_MOTOR, null, SlimefunItems.ELECTRIC_MOTOR, null}) { - @Override - public int getEnergyConsumption() { - return 10; - } + @Override + public int getEnergyConsumption() { + return 10; + } - @Override - public int getCapacity() { - return 256; - } + @Override + public int getCapacity() { + return 256; + } - }.register(plugin); + }.register(plugin); - new ReactorAccessPort(categories.cargo, SlimefunItems.REACTOR_ACCESS_PORT, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.LEAD_INGOT, SlimefunItems.CARGO_MOTOR, SlimefunItems.LEAD_INGOT, null, SlimefunItems.ELECTRIC_MOTOR, null}) - .register(plugin); + new ReactorAccessPort(categories.cargo, SlimefunItems.REACTOR_ACCESS_PORT, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.LEAD_INGOT, SlimefunItems.CARGO_MOTOR, SlimefunItems.LEAD_INGOT, null, SlimefunItems.ELECTRIC_MOTOR, null}) + .register(plugin); - new FluidPump(categories.electricity, SlimefunItems.FLUID_PUMP, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.MEDIUM_CAPACITOR, null, new ItemStack(Material.BUCKET), SlimefunItems.CARGO_MOTOR, new ItemStack(Material.BUCKET), null, SlimefunItems.OIL_PUMP, null}) - .register(plugin); + new FluidPump(categories.electricity, SlimefunItems.FLUID_PUMP, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.MEDIUM_CAPACITOR, null, new ItemStack(Material.BUCKET), SlimefunItems.CARGO_MOTOR, new ItemStack(Material.BUCKET), null, SlimefunItems.OIL_PUMP, null}) + .register(plugin); - new TrashCan(categories.cargo, SlimefunItems.TRASH_CAN, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {null, SlimefunItems.PORTABLE_DUSTBIN, null, SlimefunItems.LEAD_INGOT, SlimefunItems.CARGO_MOTOR, SlimefunItems.LEAD_INGOT, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.ALUMINUM_INGOT}) - .register(plugin); + new TrashCan(categories.cargo, SlimefunItems.TRASH_CAN, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {null, SlimefunItems.PORTABLE_DUSTBIN, null, SlimefunItems.LEAD_INGOT, SlimefunItems.CARGO_MOTOR, SlimefunItems.LEAD_INGOT, SlimefunItems.ALUMINUM_INGOT, SlimefunItems.LEAD_INGOT, SlimefunItems.ALUMINUM_INGOT}) + .register(plugin); - new CarbonPress(categories.electricity, SlimefunItems.CARBON_PRESS, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CARBON, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CARBON, SlimefunItems.CARBON, SlimefunItems.HEATED_PRESSURE_CHAMBER, SlimefunItems.CARBON, SlimefunItems.HEATING_COIL, SlimefunItems.CARBONADO, SlimefunItems.HEATING_COIL}) { + new CarbonPress(categories.electricity, SlimefunItems.CARBON_PRESS, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CARBON, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CARBON, SlimefunItems.CARBON, SlimefunItems.HEATED_PRESSURE_CHAMBER, SlimefunItems.CARBON, SlimefunItems.HEATING_COIL, SlimefunItems.CARBONADO, SlimefunItems.HEATING_COIL}) { - @Override - public int getEnergyConsumption() { - return 10; - } + @Override + public int getEnergyConsumption() { + return 10; + } - @Override - public int getCapacity() { - return 256; - } + @Override + public int getCapacity() { + return 256; + } - @Override - public int getSpeed() { - return 1; - } + @Override + public int getSpeed() { + return 1; + } - }.register(plugin); + }.register(plugin); - new CarbonPress(categories.electricity, SlimefunItems.CARBON_PRESS_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CARBONADO, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CARBONADO, SlimefunItems.CARBON, SlimefunItems.CARBON_PRESS, SlimefunItems.CARBON, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.HEATING_COIL}) { + new CarbonPress(categories.electricity, SlimefunItems.CARBON_PRESS_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CARBONADO, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CARBONADO, SlimefunItems.CARBON, SlimefunItems.CARBON_PRESS, SlimefunItems.CARBON, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.HEATING_COIL}) { - @Override - public int getEnergyConsumption() { - return 25; - } + @Override + public int getEnergyConsumption() { + return 25; + } - @Override - public int getCapacity() { - return 512; - } + @Override + public int getCapacity() { + return 512; + } - @Override - public int getSpeed() { - return 3; - } + @Override + public int getSpeed() { + return 3; + } - }.register(plugin); + }.register(plugin); - new CarbonPress(categories.electricity, SlimefunItems.CARBON_PRESS_3, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.CARBONADO, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CARBONADO, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.CARBON_PRESS_2, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.HEATING_COIL}) { + new CarbonPress(categories.electricity, SlimefunItems.CARBON_PRESS_3, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.CARBONADO, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.CARBONADO, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.CARBON_PRESS_2, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRO_MAGNET, SlimefunItems.HEATING_COIL}) { - @Override - public int getEnergyConsumption() { - return 90; - } + @Override + public int getEnergyConsumption() { + return 90; + } - @Override - public int getCapacity() { - return 512; - } + @Override + public int getCapacity() { + return 512; + } - @Override - public int getSpeed() { - return 15; - } + @Override + public int getSpeed() { + return 15; + } - }.register(plugin); + }.register(plugin); - new ElectricSmeltery(categories.electricity, SlimefunItems.ELECTRIC_SMELTERY, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {new ItemStack(Material.NETHER_BRICKS), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.NETHER_BRICKS), SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_INGOT_FACTORY, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.GILDED_IRON}) { + new ElectricSmeltery(categories.electricity, SlimefunItems.ELECTRIC_SMELTERY, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {new ItemStack(Material.NETHER_BRICKS), SlimefunItems.ELECTRIC_MOTOR, new ItemStack(Material.NETHER_BRICKS), SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_INGOT_FACTORY, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.GILDED_IRON}) { - @Override - public int getEnergyConsumption() { - return 10; - } + @Override + public int getEnergyConsumption() { + return 10; + } - @Override - public int getCapacity() { - return 512; - } + @Override + public int getCapacity() { + return 512; + } - @Override - public int getSpeed() { - return 1; - } + @Override + public int getSpeed() { + return 1; + } - }.register(plugin); + }.register(plugin); - new ElectricSmeltery(categories.electricity, SlimefunItems.ELECTRIC_SMELTERY_2, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_SMELTERY, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.GILDED_IRON}) { - - @Override - public int getEnergyConsumption() { - return 20; - } + new ElectricSmeltery(categories.electricity, SlimefunItems.ELECTRIC_SMELTERY_2, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.POWER_CRYSTAL, SlimefunItems.DAMASCUS_STEEL_INGOT, SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIC_SMELTERY, SlimefunItems.HEATING_COIL, SlimefunItems.GILDED_IRON, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.GILDED_IRON}) { + + @Override + public int getEnergyConsumption() { + return 20; + } - @Override - public int getCapacity() { - return 1024; - } + @Override + public int getCapacity() { + return 1024; + } - @Override - public int getSpeed() { - return 3; - } + @Override + public int getSpeed() { + return 3; + } - }.register(plugin); + }.register(plugin); new IronGolemAssembler(categories.electricity, SlimefunItems.IRON_GOLEM_ASSEMBLER, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[] {SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.ADVANCED_CIRCUIT_BOARD, SlimefunItems.BLISTERING_INGOT_3, new ItemStack(Material.IRON_BLOCK), SlimefunItems.ANDROID_MEMORY_CORE, new ItemStack(Material.IRON_BLOCK), SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.CARBONADO_EDGED_CAPACITOR}) .register(plugin); - new WitherAssembler(categories.electricity, SlimefunItems.WITHER_ASSEMBLER, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.BLISTERING_INGOT_3, new ItemStack(Material.NETHER_STAR), SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.CARBONADO_EDGED_CAPACITOR}) - .register(plugin); - - if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { - new TapeMeasure(categories.usefulItems, SlimefunItems.TAPE_MEASURE, RecipeType.ENHANCED_CRAFTING_TABLE, - new ItemStack[] {SlimefunItems.SILICON, new ItemStack(Material.YELLOW_DYE), SlimefunItems.SILICON, new ItemStack(Material.YELLOW_DYE), new ItemStack(Material.STRING), new ItemStack(Material.YELLOW_DYE), SlimefunItems.GILDED_IRON, new ItemStack(Material.YELLOW_DYE), SlimefunItems.SILICON}) - .register(plugin); - } - } + new WitherAssembler(categories.electricity, SlimefunItems.WITHER_ASSEMBLER, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.BLISTERING_INGOT_3, new ItemStack(Material.NETHER_STAR), SlimefunItems.BLISTERING_INGOT_3, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.ANDROID_MEMORY_CORE, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.CARBONADO_EDGED_CAPACITOR}) + .register(plugin); + + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { + new TapeMeasure(categories.usefulItems, SlimefunItems.TAPE_MEASURE, RecipeType.ENHANCED_CRAFTING_TABLE, + new ItemStack[] {SlimefunItems.SILICON, new ItemStack(Material.YELLOW_DYE), SlimefunItems.SILICON, new ItemStack(Material.YELLOW_DYE), new ItemStack(Material.STRING), new ItemStack(Material.YELLOW_DYE), SlimefunItems.GILDED_IRON, new ItemStack(Material.YELLOW_DYE), SlimefunItems.SILICON}) + .register(plugin); + } + } - private static void registerArmorSet(Category category, ItemStack baseComponent, ItemStack[] items, String idSyntax, boolean vanilla, PotionEffect[][] effects, SlimefunAddon addon) { + private static void registerArmorSet(Category category, ItemStack baseComponent, ItemStack[] items, String idSyntax, boolean vanilla, PotionEffect[][] effects, SlimefunAddon addon) { String[] components = new String[] { "_HELMET", "_CHESTPLATE", "_LEGGINGS", "_BOOTS" }; List recipes = new ArrayList<>(); From 923b59c6e7042ab333be0e32e9e9835e61a3e33c Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Tue, 11 Aug 2020 16:28:52 +0200 Subject: [PATCH 55/65] [CI skip] Reduced technical debt --- .../implementation/SlimefunItems.java | 29 ++++++++++--------- .../implementation/items/geo/GEOMiner.java | 3 +- .../implementation/setup/ResearchSetup.java | 2 +- .../setup/SlimefunItemSetup.java | 2 +- .../Slimefun/Lists/SlimefunItems.java | 8 ++--- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java index 4953a736f..b347a66d5 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java @@ -286,10 +286,10 @@ public final class SlimefunItems { public static final SlimefunItemStack GILDED_IRON_LEGGINGS = new SlimefunItemStack("GILDED_IRON_LEGGINGS", Material.GOLDEN_LEGGINGS, "&6Gilded Iron Leggings"); public static final SlimefunItemStack GILDED_IRON_BOOTS = new SlimefunItemStack("GILDED_IRON_BOOTS", Material.GOLDEN_BOOTS, "&6Gilded Iron Boots"); - public static final SlimefunItemStack GOLD_HELMET = new SlimefunItemStack("GOLD_12K_HELMET", Material.GOLDEN_HELMET, "&6Gold Helmet", "&912-Carat"); - public static final SlimefunItemStack GOLD_CHESTPLATE = new SlimefunItemStack("GOLD_12K_CHESTPLATE", Material.GOLDEN_CHESTPLATE, "&6Gold Chestplate", "&912-Carat"); - public static final SlimefunItemStack GOLD_LEGGINGS = new SlimefunItemStack("GOLD_12K_LEGGINGS", Material.GOLDEN_LEGGINGS, "&6Gold Leggings", "&912-Carat"); - public static final SlimefunItemStack GOLD_BOOTS = new SlimefunItemStack("GOLD_12K_BOOTS", Material.GOLDEN_BOOTS, "&6Gold Boots", "&912-Carat"); + public static final SlimefunItemStack GOLDEN_HELMET_12K = new SlimefunItemStack("GOLD_12K_HELMET", Material.GOLDEN_HELMET, "&6Golden Helmet &7(12-Carat)"); + public static final SlimefunItemStack GOLDEN_CHESTPLATE_12K = new SlimefunItemStack("GOLD_12K_CHESTPLATE", Material.GOLDEN_CHESTPLATE, "&6Golden Chestplate &7(12-Carat)"); + public static final SlimefunItemStack GOLDEN_LEGGINGS_12K = new SlimefunItemStack("GOLD_12K_LEGGINGS", Material.GOLDEN_LEGGINGS, "&6Golden Leggings &7(12-Carat)"); + public static final SlimefunItemStack GOLDEN_BOOTS_12K = new SlimefunItemStack("GOLD_12K_BOOTS", Material.GOLDEN_BOOTS, "&6Golden Boots &7(12-Carat)"); public static final SlimefunItemStack SLIME_HELMET_STEEL = new SlimefunItemStack("SLIME_STEEL_HELMET", Material.IRON_HELMET, "&a&lSlime Helmet", "&7&oReinforced", "", "&a&oBouncy Feeling"); public static final SlimefunItemStack SLIME_CHESTPLATE_STEEL = new SlimefunItemStack("SLIME_STEEL_CHESTPLATE", Material.IRON_CHESTPLATE, "&a&lSlime Chestplate", "&7&oReinforced", "", "&a&oBouncy Feeling"); @@ -335,10 +335,10 @@ public final class SlimefunItems { GILDED_IRON_LEGGINGS.addUnsafeEnchantments(gilded); GILDED_IRON_BOOTS.addUnsafeEnchantments(gilded); - GOLD_HELMET.addUnsafeEnchantment(Enchantment.DURABILITY, 10); - GOLD_CHESTPLATE.addUnsafeEnchantment(Enchantment.DURABILITY, 10); - GOLD_LEGGINGS.addUnsafeEnchantment(Enchantment.DURABILITY, 10); - GOLD_BOOTS.addUnsafeEnchantment(Enchantment.DURABILITY, 10); + GOLDEN_HELMET_12K.addUnsafeEnchantment(Enchantment.DURABILITY, 10); + GOLDEN_CHESTPLATE_12K.addUnsafeEnchantment(Enchantment.DURABILITY, 10); + GOLDEN_LEGGINGS_12K.addUnsafeEnchantment(Enchantment.DURABILITY, 10); + GOLDEN_BOOTS_12K.addUnsafeEnchantment(Enchantment.DURABILITY, 10); Map slime = new HashMap<>(); slime.put(Enchantment.DURABILITY, 4); @@ -406,12 +406,13 @@ public final class SlimefunItems { public static final SlimefunItemStack ANCIENT_ALTAR = new SlimefunItemStack("ANCIENT_ALTAR", Material.ENCHANTING_TABLE, "&dAncient Altar", "", "&5Multi-Block Altar for", "&5magical Crafting Processes"); public static final SlimefunItemStack COPPER_WIRE = new SlimefunItemStack("COPPER_WIRE", Material.STRING, "&6Copper Wire", "", "&6Crucial component in electric modules"); - public static final SlimefunItemStack RAINBOW_WOOL = new SlimefunItemStack("RAINBOW_WOOL", Material.WHITE_WOOL, "&5Rainbow Wool", "", "&dCycles through all Colors of the Rainbow!"); - public static final SlimefunItemStack RAINBOW_GLASS = new SlimefunItemStack("RAINBOW_GLASS", Material.WHITE_STAINED_GLASS, "&5Rainbow Glass", "", "&dCycles through all Colors of the Rainbow!"); - public static final SlimefunItemStack RAINBOW_CLAY = new SlimefunItemStack("RAINBOW_CLAY", Material.WHITE_TERRACOTTA, "&5Rainbow Clay", "", "&dCycles through all Colors of the Rainbow!"); - public static final SlimefunItemStack RAINBOW_GLASS_PANE = new SlimefunItemStack("RAINBOW_GLASS_PANE", Material.WHITE_STAINED_GLASS_PANE, "&5Rainbow Glass Pane", "", "&dCycles through all Colors of the Rainbow!"); - public static final SlimefunItemStack RAINBOW_CONCRETE = new SlimefunItemStack("RAINBOW_CONCRETE", Material.WHITE_CONCRETE, "&5Rainbow Concrete", "", "&dCycles through all Colors of the Rainbow!"); - public static final SlimefunItemStack RAINBOW_GLAZED_TERRACOTTA = new SlimefunItemStack("RAINBOW_GLAZED_TERRACOTTA", Material.WHITE_GLAZED_TERRACOTTA, "&5Rainbow Glazed Terracotta", "", "&dCycles through all Colors of the Rainbow!"); + private static final String RAINBOW = "&dCycles through all Colors of the Rainbow!"; + public static final SlimefunItemStack RAINBOW_WOOL = new SlimefunItemStack("RAINBOW_WOOL", Material.WHITE_WOOL, "&5Rainbow Wool", "", RAINBOW); + public static final SlimefunItemStack RAINBOW_GLASS = new SlimefunItemStack("RAINBOW_GLASS", Material.WHITE_STAINED_GLASS, "&5Rainbow Glass", "", RAINBOW); + public static final SlimefunItemStack RAINBOW_CLAY = new SlimefunItemStack("RAINBOW_CLAY", Material.WHITE_TERRACOTTA, "&5Rainbow Clay", "", RAINBOW); + public static final SlimefunItemStack RAINBOW_GLASS_PANE = new SlimefunItemStack("RAINBOW_GLASS_PANE", Material.WHITE_STAINED_GLASS_PANE, "&5Rainbow Glass Pane", "", RAINBOW); + public static final SlimefunItemStack RAINBOW_CONCRETE = new SlimefunItemStack("RAINBOW_CONCRETE", Material.WHITE_CONCRETE, "&5Rainbow Concrete", "", RAINBOW); + public static final SlimefunItemStack RAINBOW_GLAZED_TERRACOTTA = new SlimefunItemStack("RAINBOW_GLAZED_TERRACOTTA", Material.WHITE_GLAZED_TERRACOTTA, "&5Rainbow Glazed Terracotta", "", RAINBOW); /* Seasonal */ private static final String CHRISTMAS = ChatUtils.christmas("[Christmas Edition]"); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/geo/GEOMiner.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/geo/GEOMiner.java index 160d170a4..da8d3c4bf 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/geo/GEOMiner.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/geo/GEOMiner.java @@ -25,14 +25,13 @@ import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.AContainer; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineRecipe; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock; import me.mrCookieSlime.Slimefun.api.BlockStorage; import me.mrCookieSlime.Slimefun.api.SlimefunItemStack; import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; -public abstract class GEOMiner extends AContainer implements InventoryBlock, RecipeDisplayItem { +public abstract class GEOMiner extends AContainer implements RecipeDisplayItem { private static final int[] BORDER = { 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 26, 27, 35, 36, 44, 45, 53 }; private static final int[] OUTPUT_BORDER = { 19, 20, 21, 22, 23, 24, 25, 28, 34, 37, 43, 46, 47, 48, 49, 50, 51, 52 }; diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/ResearchSetup.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/ResearchSetup.java index fa61210c5..f98ec86f9 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/ResearchSetup.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/ResearchSetup.java @@ -110,7 +110,7 @@ public final class ResearchSetup { register("redstone_alloy", 84, "Redstone Alloy", 16, SlimefunItems.REDSTONE_ALLOY); register("carbonado_tools", 85, "Top Tier Machines", 24, SlimefunItems.CARBONADO_MULTI_TOOL, SlimefunItems.CARBONADO_JETPACK, SlimefunItems.CARBONADO_JETBOOTS); register("first_aid", 86, "First Aid", 2, SlimefunItems.CLOTH, SlimefunItems.RAG, SlimefunItems.BANDAGE, SlimefunItems.SPLINT, SlimefunItems.TIN_CAN, SlimefunItems.VITAMINS, SlimefunItems.MEDICINE); - register("gold_armor", 87, "Shiny Armor", 13, SlimefunItems.GOLD_HELMET, SlimefunItems.GOLD_CHESTPLATE, SlimefunItems.GOLD_LEGGINGS, SlimefunItems.GOLD_BOOTS); + register("gold_armor", 87, "Shiny Armor", 13, SlimefunItems.GOLDEN_HELMET_12K, SlimefunItems.GOLDEN_CHESTPLATE_12K, SlimefunItems.GOLDEN_LEGGINGS_12K, SlimefunItems.GOLDEN_BOOTS_12K); register("night_vision_googles", 89, "Night Vision Goggles", 10, SlimefunItems.NIGHT_VISION_GOGGLES); register("pickaxe_of_containment", 90, "Pickaxe of Containment", 14, SlimefunItems.PICKAXE_OF_CONTAINMENT, SlimefunItems.BROKEN_SPAWNER); register("hercules_pickaxe", 91, "Hercules Pickaxe", 28, SlimefunItems.HERCULES_PICKAXE); 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 cab9e1e9a..0e5414101 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 @@ -962,7 +962,7 @@ public final class SlimefunItemSetup { .register(plugin); registerArmorSet(categories.armor, SlimefunItems.GOLD_12K, new ItemStack[] { - SlimefunItems.GOLD_HELMET, SlimefunItems.GOLD_CHESTPLATE, SlimefunItems.GOLD_LEGGINGS, SlimefunItems.GOLD_BOOTS + SlimefunItems.GOLDEN_HELMET_12K, SlimefunItems.GOLDEN_CHESTPLATE_12K, SlimefunItems.GOLDEN_LEGGINGS_12K, SlimefunItems.GOLDEN_BOOTS_12K }, "GOLD_12K", false, new PotionEffect[0][0], plugin); new SlimefunItem(categories.misc, SlimefunItems.CLOTH, RecipeType.ENHANCED_CRAFTING_TABLE, diff --git a/src/main/java/me/mrCookieSlime/Slimefun/Lists/SlimefunItems.java b/src/main/java/me/mrCookieSlime/Slimefun/Lists/SlimefunItems.java index 4b8d21ea3..826452ce1 100644 --- a/src/main/java/me/mrCookieSlime/Slimefun/Lists/SlimefunItems.java +++ b/src/main/java/me/mrCookieSlime/Slimefun/Lists/SlimefunItems.java @@ -155,10 +155,10 @@ public final class SlimefunItems { public static final SlimefunItemStack GILDED_IRON_CHESTPLATE = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GILDED_IRON_CHESTPLATE; public static final SlimefunItemStack GILDED_IRON_LEGGINGS = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GILDED_IRON_LEGGINGS; public static final SlimefunItemStack GILDED_IRON_BOOTS = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GILDED_IRON_BOOTS; - public static final SlimefunItemStack GOLD_HELMET = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GOLD_HELMET; - public static final SlimefunItemStack GOLD_CHESTPLATE = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GOLD_CHESTPLATE; - public static final SlimefunItemStack GOLD_LEGGINGS = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GOLD_LEGGINGS; - public static final SlimefunItemStack GOLD_BOOTS = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GOLD_BOOTS; + public static final SlimefunItemStack GOLD_HELMET = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GOLDEN_HELMET_12K; + public static final SlimefunItemStack GOLD_CHESTPLATE = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GOLDEN_CHESTPLATE_12K; + public static final SlimefunItemStack GOLD_LEGGINGS = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GOLDEN_LEGGINGS_12K; + public static final SlimefunItemStack GOLD_BOOTS = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.GOLDEN_BOOTS_12K; public static final SlimefunItemStack SLIME_HELMET_STEEL = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.SLIME_HELMET_STEEL; public static final SlimefunItemStack SLIME_CHESTPLATE_STEEL = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.SLIME_CHESTPLATE_STEEL; public static final SlimefunItemStack SLIME_LEGGINGS_STEEL = io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems.SLIME_LEGGINGS_STEEL; From c0d18c5c89f501da17babc1ff088f83cc5902799 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 13 Aug 2020 21:13:19 +0200 Subject: [PATCH 56/65] Fixes #2217 --- CHANGELOG.md | 1 + .../core/guide/options/ContributorsMenu.java | 6 +++ .../guide/options/PlayerLanguageOption.java | 17 +++++- .../guide/options/SlimefunGuideSettings.java | 5 +- .../core/handlers/EntityInteractHandler.java | 12 ++--- .../implementation/SlimefunPlugin.java | 4 +- .../items/electric/gadgets/MultiTool.java | 53 +++++++++++++------ .../items/magical/MagicalZombiePills.java | 10 ++-- ...er.java => EntityInteractionListener.java} | 10 ++-- .../setup/SlimefunItemSetup.java | 3 +- .../slimefun4/utils/HeadTexture.java | 4 +- src/main/resources/languages/messages_en.yml | 14 ++++- 12 files changed, 100 insertions(+), 39 deletions(-) rename src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/{PlayerInteractEntityListener.java => EntityInteractionListener.java} (78%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 870503d15..ec080f206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ * Fixed #2203 * Fixed #2205 * Fixed #2209 +* Fixed #2217 ## Release Candidate 15 (01 Aug 2020) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/ContributorsMenu.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/ContributorsMenu.java index 3b89ff019..df5d74cf0 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/ContributorsMenu.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/ContributorsMenu.java @@ -21,6 +21,12 @@ import io.github.thebusybiscuit.slimefun4.utils.PatternUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; +/** + * This menu shows a list of every {@link Contributor} to this project. + * + * @author TheBusyBiscuit + * + */ final class ContributorsMenu { private ContributorsMenu() {} diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/PlayerLanguageOption.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/PlayerLanguageOption.java index 6d55090a2..25bb7ce80 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/PlayerLanguageOption.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/PlayerLanguageOption.java @@ -1,5 +1,7 @@ package io.github.thebusybiscuit.slimefun4.core.guide.options; +import java.util.ArrayList; +import java.util.List; import java.util.Optional; import org.bukkit.ChatColor; @@ -8,6 +10,7 @@ import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import io.github.thebusybiscuit.cscorelib2.chat.ChatColors; import io.github.thebusybiscuit.cscorelib2.data.PersistentDataAPI; import io.github.thebusybiscuit.cscorelib2.item.CustomItem; import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; @@ -16,6 +19,7 @@ import io.github.thebusybiscuit.slimefun4.core.services.localization.Language; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.utils.ChatUtils; import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; +import io.github.thebusybiscuit.slimefun4.utils.HeadTexture; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; @@ -37,7 +41,16 @@ class PlayerLanguageOption implements SlimefunGuideOption { Language language = SlimefunPlugin.getLocalization().getLanguage(p); String languageName = language.isDefault() ? (SlimefunPlugin.getLocalization().getMessage(p, "languages.default") + ChatColor.DARK_GRAY + " (" + language.getName(p) + ")") : SlimefunPlugin.getLocalization().getMessage(p, "languages." + language.getId()); - return Optional.of(new CustomItem(language.getItem(), "&7" + SlimefunPlugin.getLocalization().getMessage(p, "guide.languages.selected-language") + " &a" + languageName, "", "&7You now have the option to change", "&7the language in which Slimefun", "&7will send you messages.", "&7Note that this only translates", "&7some messages, not items.", "&7&oThis feature is still being worked on", "", "&7\u21E8 &eClick to change your language")); + List lore = new ArrayList<>(); + lore.add(""); + lore.add(ChatColors.color("&e&o") + SlimefunPlugin.getLocalization().getMessage(p, "guide.work-in-progress")); + lore.add(""); + lore.addAll(SlimefunPlugin.getLocalization().getMessages(p, "guide.languages.description")); + lore.add(""); + lore.add("&7\u21E8 &e" + SlimefunPlugin.getLocalization().getMessage(p, "guide.languages.change")); + + ItemStack item = new CustomItem(language.getItem(), "&7" + SlimefunPlugin.getLocalization().getMessage(p, "guide.languages.selected-language") + " &a" + languageName, lore.toArray(new String[0])); + return Optional.of(item); } else { return Optional.empty(); @@ -78,7 +91,7 @@ class PlayerLanguageOption implements SlimefunGuideOption { }); } else if (i == 7) { - menu.addItem(7, new CustomItem(SlimefunUtils.getCustomHead("3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"), SlimefunPlugin.getLocalization().getMessage(p, "guide.languages.translations.name"), "", "&7\u21E8 &e" + SlimefunPlugin.getLocalization().getMessage(p, "guide.languages.translations.lore")), (pl, slot, item, action) -> { + menu.addItem(7, new CustomItem(SlimefunUtils.getCustomHead(HeadTexture.ADD_NEW_LANGUAGE.getTexture()), SlimefunPlugin.getLocalization().getMessage(p, "guide.languages.translations.name"), "", "&7\u21E8 &e" + SlimefunPlugin.getLocalization().getMessage(p, "guide.languages.translations.lore")), (pl, slot, item, action) -> { ChatUtils.sendURL(pl, "https://github.com/TheBusyBiscuit/Slimefun4/wiki/Translating-Slimefun"); pl.closeInventory(); return false; diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/SlimefunGuideSettings.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/SlimefunGuideSettings.java index b65c52b8d..07c3b6153 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/SlimefunGuideSettings.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/SlimefunGuideSettings.java @@ -21,6 +21,7 @@ import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; import io.github.thebusybiscuit.slimefun4.utils.NumberUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; +import net.md_5.bungee.api.ChatColor; /** * This static utility class offers various methods that provide access to the @@ -78,7 +79,7 @@ public final class SlimefunGuideSettings { return false; }); - menu.addItem(4, new CustomItem(Material.WRITABLE_BOOK, "&aSlimefun Version", "&7&o" + SlimefunPlugin.getLocalization().getMessage(p, "guide.tooltips.versions-notice"), "", "&fMinecraft Version: &a" + Bukkit.getBukkitVersion(), "&fSlimefun Version: &a" + SlimefunPlugin.getVersion(), "&fCS-CoreLib Version: &a" + SlimefunPlugin.getCSCoreLibVersion()), ChestMenuUtils.getEmptyClickHandler()); + menu.addItem(4, new CustomItem(Material.WRITABLE_BOOK, "&aSlimefun Version", "&7&o" + SlimefunPlugin.getLocalization().getMessage(p, "guide.tooltips.versions-notice"), "", "&fMinecraft: &a" + Bukkit.getBukkitVersion(), "&fSlimefun: &a" + SlimefunPlugin.getVersion(), "&fCS-CoreLib: &a" + SlimefunPlugin.getCSCoreLibVersion()), ChestMenuUtils.getEmptyClickHandler()); menu.addItem(6, new CustomItem(Material.COMPARATOR, "&e" + SlimefunPlugin.getLocalization().getMessage(p, "guide.title.source"), "", "&7Last Activity: &a" + NumberUtils.getElapsedTime(SlimefunPlugin.getGitHubService().getLastUpdate()) + " ago", "&7Forks: &e" + SlimefunPlugin.getGitHubService().getForks(), "&7Stars: &e" + SlimefunPlugin.getGitHubService().getStars(), "", "&7&oSlimefun 4 is a community project,", "&7&othe source code is available on GitHub", "&7&oand if you want to keep this Plugin alive,", "&7&othen please consider contributing to it", "", "&7\u21E8 &eClick to go to GitHub")); menu.addMenuClickHandler(6, (pl, slot, item, action) -> { @@ -110,7 +111,7 @@ public final class SlimefunGuideSettings { menu.addItem(49, ChestMenuUtils.getBackground(), ChestMenuUtils.getEmptyClickHandler()); } - menu.addItem(51, new CustomItem(Material.TOTEM_OF_UNDYING, "&cSoon", "", "&7Something will be added here later..."), (pl, slot, item, action) -> { + menu.addItem(51, new CustomItem(Material.TOTEM_OF_UNDYING, ChatColor.RED + SlimefunPlugin.getLocalization().getMessage(p, "guide.work-in-progress")), (pl, slot, item, action) -> { // Add something here return false; }); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/handlers/EntityInteractHandler.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/handlers/EntityInteractHandler.java index 919275888..1d6507902 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/handlers/EntityInteractHandler.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/handlers/EntityInteractHandler.java @@ -3,10 +3,12 @@ package io.github.thebusybiscuit.slimefun4.core.handlers; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerInteractAtEntityEvent; +import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem; +import io.github.thebusybiscuit.slimefun4.implementation.listeners.EntityInteractionListener; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import me.mrCookieSlime.Slimefun.Objects.handlers.ItemHandler; @@ -15,9 +17,9 @@ import me.mrCookieSlime.Slimefun.Objects.handlers.ItemHandler; * * @author Linox * + * @see EntityInteractionListener * @see ItemHandler * @see SimpleSlimefunItem - * @see PlayerInteractAtEntityEvent * */ @FunctionalInterface @@ -27,16 +29,14 @@ public interface EntityInteractHandler extends ItemHandler { * This function is triggered when a {@link Player} right clicks with the assigned {@link SlimefunItem} * in his hand. * - * @param p - * The {@link Player} that right clicked - * @param entity - * The {@link Entity} that was right clicked on + * @param e + * The {@link PlayerInteractAtEntityEvent} which was called * @param item * The {@link ItemStack} that was held and used while triggering * @param offHand * true if the {@link EquipmentSlot} is off hand */ - void onInteract(Player p, Entity entity, ItemStack item, boolean offHand); + void onInteract(PlayerInteractEntityEvent e, ItemStack item, boolean offHand); @Override default Class getIdentifier() { diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java index 75561d0a3..3787d40b9 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java @@ -70,7 +70,7 @@ import io.github.thebusybiscuit.slimefun4.implementation.listeners.ItemPickupLis import io.github.thebusybiscuit.slimefun4.implementation.listeners.MobDropListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.MultiBlockListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.PiglinListener; -import io.github.thebusybiscuit.slimefun4.implementation.listeners.PlayerInteractEntityListener; +import io.github.thebusybiscuit.slimefun4.implementation.listeners.EntityInteractionListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.PlayerProfileListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.SeismicAxeListener; import io.github.thebusybiscuit.slimefun4.implementation.listeners.SlimefunBootsListener; @@ -441,7 +441,7 @@ public final class SlimefunPlugin extends JavaPlugin implements SlimefunAddon { new FireworksListener(this); new WitherListener(this); new IronGolemListener(this); - new PlayerInteractEntityListener(this); + new EntityInteractionListener(this); new MobDropListener(this); new VillagerTradingListener(this); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/gadgets/MultiTool.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/gadgets/MultiTool.java index 1f950ff6d..b9cd1696b 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/gadgets/MultiTool.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/gadgets/MultiTool.java @@ -11,6 +11,7 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import io.github.thebusybiscuit.slimefun4.core.attributes.Rechargeable; +import io.github.thebusybiscuit.slimefun4.core.handlers.EntityInteractHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.ItemUseHandler; import io.github.thebusybiscuit.slimefun4.core.handlers.ToolUseHandler; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; @@ -42,6 +43,21 @@ public class MultiTool extends SlimefunItem implements Rechargeable { return capacity; } + private int nextIndex(int i) { + int index = i; + + do { + index++; + + if (index >= modes.size()) { + index = 0; + } + } + while (index != i && !modes.get(index).isEnabled()); + + return index; + } + protected ItemUseHandler getItemUseHandler() { return e -> { Player p = e.getPlayer(); @@ -64,29 +80,33 @@ public class MultiTool extends SlimefunItem implements Rechargeable { SlimefunItem selectedItem = modes.get(index).getItem(); String itemName = selectedItem != null ? selectedItem.getItemName() : "Unknown"; - SlimefunPlugin.getLocalization().sendMessage(p, "messages.mode-change", true, msg -> msg.replace("%device%", "Multi Tool").replace("%mode%", ChatColor.stripColor(itemName))); + SlimefunPlugin.getLocalization().sendMessage(p, "messages.multi-tool.mode-change", true, msg -> msg.replace("%device%", "Multi Tool").replace("%mode%", ChatColor.stripColor(itemName))); selectedMode.put(p.getUniqueId(), index); } }; } - private int nextIndex(int i) { - int index = i; - - do { - index++; - - if (index >= modes.size()) { - index = 0; - } - } - while (index != i && !modes.get(index).isEnabled()); - - return index; + private ToolUseHandler getToolUseHandler() { + return (e, tool, fortune, drops) -> { + SlimefunPlugin.getLocalization().sendMessage(e.getPlayer(), "messages.multi-tool.not-shears"); + e.setCancelled(true); + }; } - private ToolUseHandler getToolUseHandler() { - return (e, tool, fortune, drops) -> e.setCancelled(true); + private EntityInteractHandler getEntityInteractionHandler() { + return (e, item, offhand) -> { + // Fixes #2217 - Prevent them from being used to shear entities + switch (e.getRightClicked().getType()) { + case MUSHROOM_COW: + case SHEEP: + case SNOWMAN: + SlimefunPlugin.getLocalization().sendMessage(e.getPlayer(), "messages.multi-tool.not-shears"); + e.setCancelled(true); + break; + default: + break; + } + }; } @Override @@ -95,6 +115,7 @@ public class MultiTool extends SlimefunItem implements Rechargeable { addItemHandler(getItemUseHandler()); addItemHandler(getToolUseHandler()); + addItemHandler(getEntityInteractionHandler()); } } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/MagicalZombiePills.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/MagicalZombiePills.java index cef452f2f..33f193ef0 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/MagicalZombiePills.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/MagicalZombiePills.java @@ -1,14 +1,15 @@ package io.github.thebusybiscuit.slimefun4.implementation.items.magical; -import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils; - import org.bukkit.GameMode; import org.bukkit.Sound; +import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; import org.bukkit.entity.Villager; import org.bukkit.entity.ZombieVillager; import org.bukkit.inventory.ItemStack; +import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils; import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; import io.github.thebusybiscuit.slimefun4.core.handlers.EntityInteractHandler; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; @@ -38,8 +39,11 @@ public class MagicalZombiePills extends SimpleSlimefunItem { + return (e, item, offhand) -> { + Entity entity = e.getRightClicked(); + if (entity.getType() == EntityType.ZOMBIE_VILLAGER) { + Player p = e.getPlayer(); if (p.getGameMode() != GameMode.CREATIVE) { ItemUtils.consumeItem(item, false); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PlayerInteractEntityListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/EntityInteractionListener.java similarity index 78% rename from src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PlayerInteractEntityListener.java rename to src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/EntityInteractionListener.java index 2bdc3baec..0372b850d 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/PlayerInteractEntityListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/EntityInteractionListener.java @@ -4,7 +4,7 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerInteractAtEntityEvent; +import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; @@ -21,14 +21,14 @@ import me.mrCookieSlime.Slimefun.api.Slimefun; * @see EntityInteractHandler * */ -public class PlayerInteractEntityListener implements Listener { +public class EntityInteractionListener implements Listener { - public PlayerInteractEntityListener(SlimefunPlugin plugin) { + public EntityInteractionListener(SlimefunPlugin plugin) { plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler - public void onInteractEntity(PlayerInteractAtEntityEvent e) { + public void onInteractEntity(PlayerInteractEntityEvent e) { if (!e.getRightClicked().isValid()) { return; } @@ -45,7 +45,7 @@ public class PlayerInteractEntityListener implements Listener { SlimefunItem sfItem = SlimefunItem.getByItem(itemStack); if (sfItem != null && Slimefun.hasUnlocked(e.getPlayer(), sfItem, true)) { - sfItem.callItemHandler(EntityInteractHandler.class, handler -> handler.onInteract(e.getPlayer(), e.getRightClicked(), itemStack, e.getHand() == EquipmentSlot.OFF_HAND)); + sfItem.callItemHandler(EntityInteractHandler.class, handler -> handler.onInteract(e, 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 0e5414101..60781232d 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 @@ -181,6 +181,7 @@ import io.github.thebusybiscuit.slimefun4.implementation.items.weapons.IcyBow; import io.github.thebusybiscuit.slimefun4.implementation.items.weapons.SeismicAxe; import io.github.thebusybiscuit.slimefun4.implementation.items.weapons.SwordOfBeheading; import io.github.thebusybiscuit.slimefun4.implementation.items.weapons.VampireBlade; +import io.github.thebusybiscuit.slimefun4.utils.HeadTexture; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.Slimefun.Lists.RecipeType; import me.mrCookieSlime.Slimefun.Objects.Category; @@ -384,7 +385,7 @@ public final class SlimefunItemSetup { .register(plugin); new BasicCircuitBoard(categories.technicalComponents, SlimefunItems.BASIC_CIRCUIT_BOARD, RecipeType.MOB_DROP, - new ItemStack[] {null, null, null, null, new CustomItem(SlimefunUtils.getCustomHead("89091d79ea0f59ef7ef94d7bba6e5f17f2f7d4572c44f90f76c4819a714"), "&aIron Golem"), null, null, null, null}) + new ItemStack[] {null, null, null, null, new CustomItem(SlimefunUtils.getCustomHead(HeadTexture.IRON_GOLEM.getTexture()), "&aIron Golem"), null, null, null, null}) .register(plugin); new UnplaceableBlock(categories.technicalComponents, SlimefunItems.ADVANCED_CIRCUIT_BOARD, RecipeType.ENHANCED_CRAFTING_TABLE, diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java index 87e9f49e1..028d7e092 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/utils/HeadTexture.java @@ -99,7 +99,9 @@ public enum HeadTexture { MINECRAFT_CHUNK("8449b9318e33158e64a46ab0de121c3d40000e3332c1574932b3c849d8fa0dc2"), CHEST_TERMINAL("7a44ff3a5f49c69cab676bad8d98a063fa78cfa61916fdef3e267557fec18283"), CARGO_ARROW_LEFT("f2599bd986659b8ce2c4988525c94e19ddd39fad08a38284a197f1b70675acc"), - CARGO_ARROW_RIGHT("c2f910c47da042e4aa28af6cc81cf48ac6caf37dab35f88db993accb9dfe516"); + CARGO_ARROW_RIGHT("c2f910c47da042e4aa28af6cc81cf48ac6caf37dab35f88db993accb9dfe516"), + ADD_NEW_LANGUAGE("3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"), + IRON_GOLEM("89091d79ea0f59ef7ef94d7bba6e5f17f2f7d4572c44f90f76c4819a714"); private final String texture; diff --git a/src/main/resources/languages/messages_en.yml b/src/main/resources/languages/messages_en.yml index c50aedf71..e1555655c 100644 --- a/src/main/resources/languages/messages_en.yml +++ b/src/main/resources/languages/messages_en.yml @@ -24,6 +24,7 @@ commands: guide: locked: 'LOCKED' + work-in-progress: 'This feature is not fully finished yet!' locked-category: - 'To unlock this category you will' @@ -64,6 +65,13 @@ guide: selected-language: 'Currently selected:' select: 'Click to select this language' select-default: 'Click to select the default language' + change: 'Click to select a new language' + + description: + - '&7You now have the option to change' + - '&7the language in which Slimefun' + - '&7will be presented to you. Items' + - '&7cannot be translated for now.' translations: name: '&aIs something missing?' @@ -83,6 +91,7 @@ guide: commit: 'Commit' commits: 'Commits' profile-link: 'Click to visit their profile on GitHub' + roles: developer: '&6Developer' wiki: '&3Wiki Editor' @@ -105,13 +114,16 @@ messages: not-valid-research: '&4%research% &cis not a valid Research!' give-research: '&bYou have given %player% the Research &7"%research%&7"' hungry: '&cYou are too hungry to do that!' - mode-change: '&b%device% mode changed to: &9%mode%' disabled-in-world: '&4&lThis Item has been disabled in this world' disabled-item: '&4&lThis Item has been disabled! How did you even get that?' no-tome-yourself: '&cYou cannot use the &4Tome of Knowledge &con yourself...' multimeter: '&bStored Energy: &3%stored% &b/ &3%capacity%' piglin-barter: '&4You cannot barter with piglins using Slimefun items' + multi-tool: + mode-change: '&b%device% mode changed to: &9%mode%' + not-shears: '&cA Multi Tool cannot be used as shears!' + talisman: anvil: '&a&oYour Talisman saved your tool from breaking' miner: '&a&oYour Talisman just doubled your drops' From acfc3c6880bf2d5e48283040cd84f2b325729f6a Mon Sep 17 00:00:00 2001 From: LinoxGH Date: Thu, 13 Aug 2020 19:53:13 +0000 Subject: [PATCH 57/65] Translate messages_tr.yml via GitLocalize --- src/main/resources/languages/messages_tr.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/resources/languages/messages_tr.yml b/src/main/resources/languages/messages_tr.yml index a600ff98b..954d94865 100644 --- a/src/main/resources/languages/messages_tr.yml +++ b/src/main/resources/languages/messages_tr.yml @@ -41,6 +41,12 @@ guide: select: Bu dili seçmek için tıklayın select-default: Varsayılan dili seçmek için tıklayın selected-language: 'Şuan seçili:' + change: Yeni bir dil seçmek için tıklayın + description: + - "&7Artık Slimefun içerisinde size" + - "&7sunulacak olan dilinizi" + - "&7değiştirebilirsiniz. Henüz eşyalar" + - "&7çevrilememektedir." title: main: Slimefun Rehberi settings: Ayarlar & Bilgi @@ -80,6 +86,7 @@ guide: - Bu kategoriyi açmak için - aşağıdaki kategorilerde bulunan - bütün eşyaları açın + work-in-progress: Bu özellik henüz tamamlanmadı! messages: not-researched: "&4Bunu anlayacak kadar bilgin yok" not-enough-xp: "&4Bunun kilidini açmak için yeterli XP niz yok" @@ -96,7 +103,6 @@ messages: not-valid-research: "&4%research% &cgeçerli bir araştırma değil!" give-research: '&b%player% adlı oyuncu için bir araştırmayı açtın: &7"%research%&7"' hungry: "&cBunu yapmak için çok açsın!" - mode-change: "&b%device% modu değişti: &9%mode%" disabled-in-world: "&4&lBu eşya bu dünyada devre dışı bırakıldı." disabled-item: "&4&lBu eşya devre dışı bırakıldı! Bunu nasıl aldın?" no-tome-yourself: "&4Tome of Knowledge &cı kendin için kullanamazsın..." @@ -159,6 +165,10 @@ messages: wrong-world: "&cSeçtiğiniz nokta başka bir dünyada gözüküyor!" distance: "&7Ölçüm yapıldı. &eUzaklık: %distance%" anchor-set: "&aBaşarılı bir şekilde bir nokta seçildi:&e %anchor%" + multi-tool: + mode-change: "&b%device% modül değiştirildi: &9%mode%" + not-shears: "&cBir Multi Tool makas olarak kullanılamaz!" + mode-change: "&b%device% modu değişti: &9%mode%" machines: pattern-not-found: "&eÜzgünüm, bu tarifi tanıyamadım. Lütfen Eşyaları Dağıtıcıya doğru şekilde yerleştirin." From 18bbef426b011f9f1d2a09b354d2bc3fb91ff0ee Mon Sep 17 00:00:00 2001 From: LinoxGH Date: Thu, 13 Aug 2020 19:53:14 +0000 Subject: [PATCH 58/65] Translate recipes_tr.yml via GitLocalize From eb5b2678e082825cb5314882b6f0465644144307 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Fri, 14 Aug 2020 01:46:05 +0200 Subject: [PATCH 59/65] Fixes #2077 --- CHANGELOG.md | 2 + .../guide/options/SlimefunGuideSettings.java | 2 +- .../items/magical/talismans/Talisman.java | 6 ++- .../listeners/TalismanListener.java | 52 ++++++++++++------- .../setup/SlimefunItemSetup.java | 2 +- 5 files changed, 43 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec080f206..5bf2b5b5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,8 @@ * Fixed #2205 * Fixed #2209 * Fixed #2217 +* Fixed Miner Talisman sending messages when drops were not even doubled +* Fixed #2077 ## Release Candidate 15 (01 Aug 2020) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/SlimefunGuideSettings.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/SlimefunGuideSettings.java index 07c3b6153..6f7840e5b 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/SlimefunGuideSettings.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/SlimefunGuideSettings.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Optional; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.Player; @@ -21,7 +22,6 @@ import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; import io.github.thebusybiscuit.slimefun4.utils.NumberUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; -import net.md_5.bungee.api.ChatColor; /** * This static utility class offers various methods that provide access to the diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/talismans/Talisman.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/talismans/Talisman.java index 378efa246..8ec502809 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/talismans/Talisman.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/magical/talismans/Talisman.java @@ -11,6 +11,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.block.BlockDropItemEvent; import org.bukkit.event.enchantment.EnchantItemEvent; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.EntityEvent; @@ -127,7 +128,7 @@ public class Talisman extends SlimefunItem { } private static boolean hasMessage(Talisman talisman) { - return !("").equalsIgnoreCase(talisman.getMessageSuffix()); + return talisman.getMessageSuffix() != null; } public static boolean checkFor(Event e, SlimefunItemStack stack) { @@ -224,6 +225,9 @@ public class Talisman extends SlimefunItem { else if (e instanceof BlockBreakEvent) { return ((BlockBreakEvent) e).getPlayer(); } + else if (e instanceof BlockDropItemEvent) { + return ((BlockDropItemEvent) e).getPlayer(); + } else if (e instanceof PlayerEvent) { return ((PlayerEvent) e).getPlayer(); } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/TalismanListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/TalismanListener.java index df00ffc64..8a41ff747 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/TalismanListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/TalismanListener.java @@ -13,13 +13,14 @@ import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.AbstractArrow; import org.bukkit.entity.ArmorStand; import org.bukkit.entity.ChestedHorse; +import org.bukkit.entity.Item; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.block.BlockDropItemEvent; import org.bukkit.event.enchantment.EnchantItemEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageEvent; @@ -35,7 +36,6 @@ import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.util.Vector; import io.github.thebusybiscuit.cscorelib2.item.CustomItem; -import io.github.thebusybiscuit.cscorelib2.materials.MaterialCollections; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.items.magical.talismans.MagicianTalisman; @@ -229,32 +229,48 @@ public class TalismanListener implements Listener { } } - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - public void onBlockBreak(BlockBreakEvent e) { + @EventHandler(ignoreCancelled = true) + public void onBlockDropItems(BlockDropItemEvent e) { // We only want to double ores - if (MaterialCollections.getAllOres().contains(e.getBlock().getType())) { + Material type = e.getBlockState().getType(); + if (type.name().endsWith("_ORE")) { ItemStack item = e.getPlayer().getInventory().getItemInMainHand(); if (item.getType() != Material.AIR && item.getAmount() > 0 && !item.containsEnchantment(Enchantment.SILK_TOUCH)) { - Collection drops = e.getBlock().getDrops(item); - int dropAmount = 1; - - if (item.containsEnchantment(Enchantment.LOOT_BONUS_BLOCKS)) { - Random random = ThreadLocalRandom.current(); - dropAmount = random.nextInt(item.getEnchantmentLevel(Enchantment.LOOT_BONUS_BLOCKS) + 2) - 1; - dropAmount = Math.max(dropAmount, 1); - dropAmount = (e.getBlock().getType() == Material.LAPIS_ORE ? 4 + random.nextInt(5) : 1) * (dropAmount + 1); - } + Collection drops = e.getItems(); if (Talisman.checkFor(e, SlimefunItems.TALISMAN_MINER)) { - for (ItemStack drop : drops) { - if (drop != null && !drop.getType().isBlock()) { - int amount = Math.max(1, (dropAmount * 2) - drop.getAmount()); - e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation(), new CustomItem(drop, amount)); + int dropAmount = getAmountWithFortune(type, item.getEnchantmentLevel(Enchantment.LOOT_BONUS_BLOCKS)); + boolean doubledDrops = false; + + for (Item drop : drops) { + ItemStack droppedItem = drop.getItemStack(); + + if (!droppedItem.getType().isBlock()) { + int amount = Math.max(1, (dropAmount * 2) - droppedItem.getAmount()); + e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation(), new CustomItem(droppedItem, amount)); + doubledDrops = true; } } + + if (doubledDrops) { + SlimefunPlugin.getLocalization().sendMessage(e.getPlayer(), "messages.talisman.miner", true); + } } } } } + + private int getAmountWithFortune(Material type, int fortuneLevel) { + if (fortuneLevel > 0) { + Random random = ThreadLocalRandom.current(); + int amount = random.nextInt(fortuneLevel + 2) - 1; + amount = Math.max(amount, 1); + amount = (type == Material.LAPIS_ORE ? 4 + random.nextInt(5) : 1) * (amount + 1); + return amount; + } + else { + return 1; + } + } } 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 60781232d..ccbaf67d6 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 @@ -818,7 +818,7 @@ public final class SlimefunItemSetup { new Talisman(SlimefunItems.TALISMAN_MINER, new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.SYNTHETIC_SAPPHIRE, SlimefunItems.COMMON_TALISMAN, SlimefunItems.SIFTED_ORE, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3}, - false, false, "miner", 20) + false, false, null, 20) .register(plugin); new Talisman(SlimefunItems.TALISMAN_HUNTER, From bae84215117dac7dd6cb56704db037507f292192 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 13 Aug 2020 23:51:00 +0000 Subject: [PATCH 60/65] Translate messages_de.yml via GitLocalize --- src/main/resources/languages/messages_de.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/resources/languages/messages_de.yml b/src/main/resources/languages/messages_de.yml index 1f737aeeb..8dbec9751 100644 --- a/src/main/resources/languages/messages_de.yml +++ b/src/main/resources/languages/messages_de.yml @@ -41,6 +41,12 @@ guide: select: Klicke hier um diese Sprache auszuwählen select-default: Klicke hier um die Standardsprache auszuwählen selected-language: 'Aktuell ausgewählt:' + change: Klicke um die Sprache zu ändern + description: + - "&7Hier kannst du deine Spracheinstellungen" + - "&7verwalten. Derzeit umfasst dies" + - "&7jedoch nur bestimmte Nachrichten," + - "&7Items können noch nicht übersetzt werden." title: main: Slimefun-Handbuch settings: Einstellungen & Infos @@ -80,6 +86,7 @@ guide: - Um diese Kategorie freizuschalten, - müssen zuerst sämtliche Items der - folgenden Kategorien freigeschaltet werden + work-in-progress: Dieses Feature befindet sich noch in der Testphase! messages: not-researched: "&4Du hast diesen Gegenstand noch nicht freigeschaltet!" not-enough-xp: "&4Du hast nicht genügend Erfahrungspunkte, um dies freizuschalten" @@ -96,7 +103,6 @@ messages: not-valid-research: "&4%research% &cist kein gültiger Erfahrungsgrad!" give-research: '&bDu hast %player% den Erfahrungsgrad &7"%research%&7" vergeben' hungry: "&cDu bist zu hungrig, um dies zu tun!" - mode-change: "&bDer Modus von deinem %device% wurde geändert zu: &9%mode%" disabled-in-world: "&4&lDieses Item wurde in dieser Welt deaktiviert!" disabled-item: "&4&lDieses Item wurde von einem Server-Administrator deaktiviert!" no-tome-yourself: "&cDu kannst dieses Item nicht an dir selbst anwenden..." @@ -164,6 +170,10 @@ messages: wrong-world: "&cDein Ankerpunkt scheint sich in einer anderen Dimension zu befinden!" distance: "&7Messung erfolgreich. &eDistanz: %distance%" anchor-set: "&aErfolgreich den Ankerpunkt gesetzt:&e %anchor%" + multi-tool: + mode-change: "&bDer Modus von deinem Multi-Tool wurde geändert zu: &9%mode%" + not-shears: "&cEinMulti Tool kann nicht als Schere verwendet werden!" + mode-change: "&bDer Modus von deinem %device% wurde geändert zu: &9%mode%" machines: pattern-not-found: "&eEs tut mir leid, aber ich konnte kein passendes Rezept finden." unknown-material: "&eEs tut mir leid, aber ich erkenne das Item in meinem Werfer @@ -307,7 +317,7 @@ languages: zh-CN: Chinesisch (China) el: Griechisch he: Hebräisch - pt: Portugiesisch (Portugal) + pt-BR: Portugiesisch (Brasilien) ar: Arabisch af: Afrikaans da: Dänisch @@ -319,7 +329,7 @@ languages: fa: Persisch th: Thailändisch ro: Rumänisch - pt-BR: Portugiesisch (Brasilien) + pt: Portugiesisch (Portugal) bg: Bulgarisch ko: Koreanisch tr: Türkisch From 9a6b8d697db9ee7cbdc14a68ce3c8c13e2d96b60 Mon Sep 17 00:00:00 2001 From: Luu7 Date: Fri, 14 Aug 2020 21:53:14 +0000 Subject: [PATCH 61/65] Translate messages_es.yml via GitLocalize --- src/main/resources/languages/messages_es.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/resources/languages/messages_es.yml b/src/main/resources/languages/messages_es.yml index c8fe3f45c..c9ea285d7 100644 --- a/src/main/resources/languages/messages_es.yml +++ b/src/main/resources/languages/messages_es.yml @@ -39,6 +39,12 @@ guide: select: Clic para seleccionar este idioma. select-default: Clic para seleccionar el idioma predeterminado. selected-language: 'Actualmente seleccionado:' + change: Click para seleccionar un nuevo lenguaje + description: + - "&7Ahora tienes la opción de cambiar" + - "&7el idioma en el que Slimefun" + - "&7se le presentará. Items" + - "&7no puede ser traducido por ahora." title: main: Guía de Slimefun. settings: Configuración e Información. @@ -78,6 +84,7 @@ guide: - Para desbloquear esta categoría deberás - desbloquear todos los objetos de las - siguientes categorías + work-in-progress: Esta característica no esta completamente terminada todavia!! messages: not-researched: "&4No tienes conocimiento suficiente para entender esto." not-enough-xp: "&4No tienes suficiente XP para desbloquear esto." @@ -95,7 +102,6 @@ messages: not-valid-research: "&c¡&4%research% &cno es un conocimiento válido!" give-research: '&bLe has dado a %player% la investigación &7"%research%&7"' hungry: "&c¡Tienes demasiada hambre para hacer eso!" - mode-change: 'El modo de &b%device% ha cambiado a: &9%mode%' disabled-in-world: "&4&lEste item ha sido desactivado en el mundo." disabled-item: "&4&l¡Este item ha sido desactivado! ¿Cómo es que lo tienes?" no-tome-yourself: "&cNo puedes usar el &4Tome of Knowledge &cen ti mismo..." @@ -160,6 +166,10 @@ messages: wrong-world: "&cParece ser que tu ancla se encuentra en un mundo diferente!" distance: "&7Medida tomada. &eDistancia: %distance%" anchor-set: "&aAncla establecida con éxito:&e %anchor%" + multi-tool: + mode-change: "&b%device% modo cambiado a: &9%mode%" + not-shears: "&cUna Multi Tool no puede ser usada como tijeras!" + mode-change: 'El modo de &b%device% ha cambiado a: &9%mode%' machines: pattern-not-found: "&eLo siento, no puedo reconocer esta receta. Por favor coloca el objeto en el patrón correcto dentro del dispensador." From d9d1d0961f4569614b62035325cb168ac4468d2b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 16 Aug 2020 00:58:12 +0000 Subject: [PATCH 62/65] Update dependency org.mockito:mockito-core to v3.5.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19d1b0273..e69829ba3 100644 --- a/pom.xml +++ b/pom.xml @@ -320,7 +320,7 @@ org.mockito mockito-core - 3.4.6 + 3.5.0 test From 037e8d83df39bbda504400875697fce094f4bcbc Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 16 Aug 2020 15:49:47 +0200 Subject: [PATCH 63/65] Small performance improvement, also reduced technical debt a bit --- .../commands/subcommands/GuideCommand.java | 3 +- .../slimefun4/core/guide/SlimefunGuide.java | 32 +---- .../core/guide/options/GuideLayoutOption.java | 2 +- .../guide/BookSlimefunGuide.java | 126 +++++++++++------- .../guide/CheatSheetSlimefunGuide.java | 32 ++++- .../guide/ChestSlimefunGuide.java | 88 +++++++----- .../listeners/SlimefunGuideListener.java | 2 +- 7 files changed, 166 insertions(+), 119 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/GuideCommand.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/GuideCommand.java index 457151115..19b6b40a2 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/GuideCommand.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/GuideCommand.java @@ -19,7 +19,8 @@ class GuideCommand extends SubCommand { public void onExecute(CommandSender sender, String[] args) { if (sender instanceof Player) { if (sender.hasPermission("slimefun.command.guide")) { - ((Player) sender).getInventory().addItem(SlimefunGuide.getItem(SlimefunPlugin.getCfg().getBoolean("guide.default-view-book") ? SlimefunGuideLayout.BOOK : SlimefunGuideLayout.CHEST)); + SlimefunGuideLayout design = SlimefunGuide.getDefaultLayout(); + ((Player) sender).getInventory().addItem(SlimefunGuide.getItem(design).clone()); } else { SlimefunPlugin.getLocalization().sendMessage(sender, "messages.no-permission", true); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java index 979b9df45..6760baae1 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/SlimefunGuide.java @@ -1,16 +1,10 @@ package io.github.thebusybiscuit.slimefun4.core.guide; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; import java.util.Optional; -import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; -import io.github.thebusybiscuit.cscorelib2.chat.ChatColors; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.guide.BookSlimefunGuide; @@ -36,31 +30,7 @@ public final class SlimefunGuide { private SlimefunGuide() {} public static ItemStack getItem(SlimefunGuideLayout design) { - ItemStack item = new ItemStack(Material.ENCHANTED_BOOK); - ItemMeta meta = item.getItemMeta(); - List lore = new LinkedList<>(); - lore.addAll(Arrays.asList("", ChatColors.color("&eRight Click &8\u21E8 &7Browse Items"), ChatColors.color("&eShift + Right Click &8\u21E8 &7Open Settings / Credits"))); - - switch (design) { - case BOOK: - meta.setDisplayName(ChatColors.color("&aSlimefun Guide &7(Book GUI)")); - break; - case CHEAT_SHEET: - meta.setDisplayName(ChatColors.color("&cSlimefun Guide &4(Cheat Sheet)")); - lore.add(0, ChatColors.color("&4&lOnly openable by Admins")); - lore.add(0, ""); - break; - case CHEST: - meta.setDisplayName(ChatColors.color("&aSlimefun Guide &7(Chest GUI)")); - break; - default: - return null; - } - - meta.setLore(lore); - SlimefunPlugin.getItemTextureService().setTexture(meta, "SLIMEFUN_GUIDE"); - item.setItemMeta(meta); - return item; + return SlimefunPlugin.getRegistry().getGuideLayout(design).getItem(); } public static void openCheatMenu(Player p) { diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/GuideLayoutOption.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/GuideLayoutOption.java index e6fe73e3a..92379ac9b 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/GuideLayoutOption.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/guide/options/GuideLayoutOption.java @@ -102,7 +102,7 @@ class GuideLayoutOption implements SlimefunGuideOption { @Override public Optional getSelectedOption(Player p, ItemStack guide) { for (SlimefunGuideLayout layout : SlimefunGuideLayout.values()) { - if (SlimefunUtils.isItemSimilar(guide, SlimefunGuide.getItem(layout), true)) { + if (SlimefunUtils.isItemSimilar(guide, SlimefunGuide.getItem(layout), true, false)) { return Optional.of(layout); } } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/BookSlimefunGuide.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/BookSlimefunGuide.java index afaa464d4..90cfc8234 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/BookSlimefunGuide.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/BookSlimefunGuide.java @@ -10,6 +10,7 @@ import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; import io.github.thebusybiscuit.cscorelib2.chat.ChatColors; import io.github.thebusybiscuit.cscorelib2.chat.ChatInput; @@ -18,7 +19,6 @@ import io.github.thebusybiscuit.cscorelib2.chat.json.ClickEvent; import io.github.thebusybiscuit.cscorelib2.chat.json.CustomBookInterface; import io.github.thebusybiscuit.cscorelib2.chat.json.HoverEvent; import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils; -import io.github.thebusybiscuit.cscorelib2.item.CustomItem; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.core.categories.FlexCategory; import io.github.thebusybiscuit.slimefun4.core.categories.LockedCategory; @@ -36,6 +36,24 @@ import me.mrCookieSlime.Slimefun.api.Slimefun; public class BookSlimefunGuide implements SlimefunGuideImplementation { private final NamespacedKey guideSearch = new NamespacedKey(SlimefunPlugin.instance(), "search"); + private final ItemStack item; + + public BookSlimefunGuide() { + item = new ItemStack(Material.ENCHANTED_BOOK); + ItemMeta meta = item.getItemMeta(); + + meta.setDisplayName(ChatColors.color("&aSlimefun Guide &7(Book GUI)")); + + List lore = new LinkedList<>(); + + lore.add(""); + lore.add(ChatColors.color("&eRight Click &8\u21E8 &7Browse Items")); + lore.add(ChatColors.color("&eShift + Right Click &8\u21E8 &7Open Settings / Credits")); + + meta.setLore(lore); + SlimefunPlugin.getItemTextureService().setTexture(meta, "SLIMEFUN_GUIDE"); + item.setItemMeta(meta); + } @Override public SlimefunGuideLayout getLayout() { @@ -49,7 +67,7 @@ public class BookSlimefunGuide implements SlimefunGuideImplementation { @Override public ItemStack getItem() { - return new CustomItem(new ItemStack(Material.ENCHANTED_BOOK), "&aSlimefun Guide &7(Book GUI)", "", "&eRight Click &8\u21E8 &7Browse Items", "&eShift + Right Click &8\u21E8 &7Open Settings / Credits"); + return item; } private void openBook(Player p, PlayerProfile profile, List lines, boolean backButton) { @@ -112,37 +130,41 @@ public class BookSlimefunGuide implements SlimefunGuideImplementation { lines.add(new ChatComponent(ChatColor.DARK_GRAY + "\u21E8" + ChatColor.DARK_BLUE + " Tier " + tier + "\n")); } - if (category instanceof LockedCategory && !((LockedCategory) category).hasUnlocked(p, profile)) { - List lore = new LinkedList<>(); - lore.add(ChatColor.DARK_RED + SlimefunPlugin.getLocalization().getMessage(p, "guide.locked") + " " + ChatColor.GRAY + "- " + ChatColor.RESET + category.getItem(p).getItemMeta().getDisplayName()); - lore.add(""); - - for (String line : SlimefunPlugin.getLocalization().getMessages(p, "guide.locked-category")) { - lore.add(ChatColor.RESET + line); - } - - lore.add(""); - - for (Category parent : ((LockedCategory) category).getParents()) { - lore.add(parent.getItem(p).getItemMeta().getDisplayName()); - } - - ChatComponent chatComponent = new ChatComponent(ChatUtils.crop(ChatColor.RED, ItemUtils.getItemName(category.getItem(p))) + "\n"); - chatComponent.setHoverEvent(new HoverEvent(lore)); - lines.add(chatComponent); - } - else { - ChatComponent chatComponent = new ChatComponent(ChatUtils.crop(ChatColor.DARK_GREEN, ItemUtils.getItemName(category.getItem(p))) + "\n"); - chatComponent.setHoverEvent(new HoverEvent(ItemUtils.getItemName(category.getItem(p)), "", ChatColor.GRAY + "\u21E8 " + ChatColor.GREEN + SlimefunPlugin.getLocalization().getMessage(p, "guide.tooltips.open-category"))); - chatComponent.setClickEvent(new ClickEvent(category.getKey(), pl -> openCategory(profile, category, 1))); - lines.add(chatComponent); - } + addCategory(p, profile, category, lines); } } openBook(p, profile, lines, false); } + private void addCategory(Player p, PlayerProfile profile, Category category, List lines) { + if (category instanceof LockedCategory && !((LockedCategory) category).hasUnlocked(p, profile)) { + List lore = new LinkedList<>(); + lore.add(ChatColor.DARK_RED + SlimefunPlugin.getLocalization().getMessage(p, "guide.locked") + " " + ChatColor.GRAY + "- " + ChatColor.RESET + category.getItem(p).getItemMeta().getDisplayName()); + lore.add(""); + + for (String line : SlimefunPlugin.getLocalization().getMessages(p, "guide.locked-category")) { + lore.add(ChatColor.RESET + line); + } + + lore.add(""); + + for (Category parent : ((LockedCategory) category).getParents()) { + lore.add(parent.getItem(p).getItemMeta().getDisplayName()); + } + + ChatComponent chatComponent = new ChatComponent(ChatUtils.crop(ChatColor.RED, ItemUtils.getItemName(category.getItem(p))) + "\n"); + chatComponent.setHoverEvent(new HoverEvent(lore)); + lines.add(chatComponent); + } + else { + ChatComponent chatComponent = new ChatComponent(ChatUtils.crop(ChatColor.DARK_GREEN, ItemUtils.getItemName(category.getItem(p))) + "\n"); + chatComponent.setHoverEvent(new HoverEvent(ItemUtils.getItemName(category.getItem(p)), "", ChatColor.GRAY + "\u21E8 " + ChatColor.GREEN + SlimefunPlugin.getLocalization().getMessage(p, "guide.tooltips.open-category"))); + chatComponent.setClickEvent(new ClickEvent(category.getKey(), pl -> openCategory(profile, category, 1))); + lines.add(chatComponent); + } + } + @Override public void openCategory(PlayerProfile profile, Category category, int page) { Player p = profile.getPlayer(); @@ -159,20 +181,20 @@ public class BookSlimefunGuide implements SlimefunGuideImplementation { List items = new LinkedList<>(); - for (SlimefunItem item : category.getItems()) { - if (Slimefun.hasPermission(p, item, false)) { - if (Slimefun.isEnabled(p, item, false)) { - appendSlimefunItem(category, page, p, profile, item, items); + for (SlimefunItem slimefunItem : category.getItems()) { + if (Slimefun.hasPermission(p, slimefunItem, false)) { + if (Slimefun.isEnabled(p, slimefunItem, false)) { + addSlimefunItem(category, page, p, profile, slimefunItem, items); } } else { - ChatComponent component = new ChatComponent(ChatUtils.crop(ChatColor.DARK_RED, ItemUtils.getItemName(item.getItem())) + "\n"); + ChatComponent component = new ChatComponent(ChatUtils.crop(ChatColor.DARK_RED, ItemUtils.getItemName(slimefunItem.getItem())) + "\n"); List lore = new ArrayList<>(); - lore.add(ChatColor.DARK_RED + ChatColor.stripColor(ItemUtils.getItemName(item.getItem()))); + lore.add(ChatColor.DARK_RED + ChatColor.stripColor(ItemUtils.getItemName(slimefunItem.getItem()))); lore.add(""); - for (String line : SlimefunPlugin.getPermissionsService().getLore(item)) { + for (String line : SlimefunPlugin.getPermissionsService().getLore(slimefunItem)) { lore.add(ChatColors.color(line)); } @@ -188,7 +210,7 @@ public class BookSlimefunGuide implements SlimefunGuideImplementation { } } - private void appendSlimefunItem(Category category, int page, Player p, PlayerProfile profile, SlimefunItem item, List items) { + private void addSlimefunItem(Category category, int page, Player p, PlayerProfile profile, SlimefunItem item, List items) { NamespacedKey key = new NamespacedKey(SlimefunPlugin.instance(), item.getID().toLowerCase(Locale.ROOT)); if (!Slimefun.hasUnlocked(p, item, false) && item.getResearch() != null) { @@ -196,21 +218,7 @@ public class BookSlimefunGuide implements SlimefunGuideImplementation { ChatComponent component = new ChatComponent(ChatUtils.crop(ChatColor.RED, item.getItemName()) + "\n"); component.setHoverEvent(new HoverEvent(ChatColor.RESET + item.getItemName(), ChatColor.DARK_RED.toString() + ChatColor.BOLD + SlimefunPlugin.getLocalization().getMessage(p, "guide.locked"), "", ChatColor.GREEN + "> Click to unlock", "", ChatColor.GRAY + "Cost: " + ChatColor.AQUA.toString() + research.getCost() + " Level(s)")); - component.setClickEvent(new ClickEvent(key, player -> Slimefun.runSync(() -> { - if (!SlimefunPlugin.getRegistry().getCurrentlyResearchingPlayers().contains(p.getUniqueId())) { - if (research.canUnlock(p)) { - if (profile.hasUnlocked(research)) { - openCategory(profile, category, page); - } - else { - unlockItem(p, item, pl -> openCategory(profile, category, page)); - } - } - else { - SlimefunPlugin.getLocalization().sendMessage(p, "messages.not-enough-xp", true); - } - } - }))); + component.setClickEvent(new ClickEvent(key, player -> research(player, profile, item, research, category, page))); items.add(component); } @@ -230,6 +238,24 @@ public class BookSlimefunGuide implements SlimefunGuideImplementation { } } + private void research(Player p, PlayerProfile profile, SlimefunItem item, Research research, Category category, int page) { + Slimefun.runSync(() -> { + if (!SlimefunPlugin.getRegistry().getCurrentlyResearchingPlayers().contains(p.getUniqueId())) { + if (research.canUnlock(p)) { + if (profile.hasUnlocked(research)) { + openCategory(profile, category, page); + } + else { + unlockItem(p, item, pl -> openCategory(profile, category, page)); + } + } + else { + SlimefunPlugin.getLocalization().sendMessage(p, "messages.not-enough-xp", true); + } + } + }); + } + @Override public void openSearch(PlayerProfile profile, String input, boolean addToHistory) { // We need to write a book implementation for this at some point diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/CheatSheetSlimefunGuide.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/CheatSheetSlimefunGuide.java index d8d17c262..b115cc54b 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/CheatSheetSlimefunGuide.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/CheatSheetSlimefunGuide.java @@ -1,16 +1,41 @@ package io.github.thebusybiscuit.slimefun4.implementation.guide; -import org.bukkit.entity.Player; +import java.util.LinkedList; +import java.util.List; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +import io.github.thebusybiscuit.cscorelib2.chat.ChatColors; import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideLayout; +import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; public class CheatSheetSlimefunGuide extends ChestSlimefunGuide { + private final ItemStack item; + public CheatSheetSlimefunGuide() { super(false); + + item = new ItemStack(Material.ENCHANTED_BOOK); + ItemMeta meta = item.getItemMeta(); + + meta.setDisplayName(ChatColors.color("&cSlimefun Guide &4(Cheat Sheet)")); + + List lore = new LinkedList<>(); + + lore.add(ChatColors.color("&4&lOnly openable by Admins")); + lore.add(ChatColors.color("&eRight Click &8\u21E8 &7Browse Items")); + lore.add(ChatColors.color("&eShift + Right Click &8\u21E8 &7Open Settings / Credits")); + + meta.setLore(lore); + SlimefunPlugin.getItemTextureService().setTexture(meta, "SLIMEFUN_GUIDE"); + item.setItemMeta(meta); } @Override @@ -23,6 +48,11 @@ public class CheatSheetSlimefunGuide extends ChestSlimefunGuide { return SlimefunGuideLayout.CHEAT_SHEET; } + @Override + public ItemStack getItem() { + return item; + } + @Override protected void createHeader(Player p, PlayerProfile profile, ChestMenu menu) { super.createHeader(p, profile, menu); diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/ChestSlimefunGuide.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/ChestSlimefunGuide.java index 52b3670ed..48f97598d 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/ChestSlimefunGuide.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/guide/ChestSlimefunGuide.java @@ -18,7 +18,9 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.Recipe; import org.bukkit.inventory.RecipeChoice; import org.bukkit.inventory.RecipeChoice.MaterialChoice; +import org.bukkit.inventory.meta.ItemMeta; +import io.github.thebusybiscuit.cscorelib2.chat.ChatColors; import io.github.thebusybiscuit.cscorelib2.chat.ChatInput; import io.github.thebusybiscuit.cscorelib2.inventory.ItemUtils; import io.github.thebusybiscuit.cscorelib2.item.CustomItem; @@ -50,6 +52,7 @@ public class ChestSlimefunGuide implements SlimefunGuideImplementation { private static final int CATEGORY_SIZE = 36; + private final ItemStack item; private final int[] recipeSlots = { 3, 4, 5, 12, 13, 14, 21, 22, 23 }; private final Sound sound; private final boolean showVanillaRecipes; @@ -63,6 +66,21 @@ public class ChestSlimefunGuide implements SlimefunGuideImplementation { else { sound = Sound.ENTITY_BAT_TAKEOFF; } + + item = new ItemStack(Material.ENCHANTED_BOOK); + ItemMeta meta = item.getItemMeta(); + + meta.setDisplayName(ChatColors.color("&aSlimefun Guide &7(Chest GUI)")); + + List lore = new LinkedList<>(); + + lore.add(""); + lore.add(ChatColors.color("&eRight Click &8\u21E8 &7Browse Items")); + lore.add(ChatColors.color("&eShift + Right Click &8\u21E8 &7Open Settings / Credits")); + + meta.setLore(lore); + SlimefunPlugin.getItemTextureService().setTexture(meta, "SLIMEFUN_GUIDE"); + item.setItemMeta(meta); } @Override @@ -72,7 +90,7 @@ public class ChestSlimefunGuide implements SlimefunGuideImplementation { @Override public ItemStack getItem() { - return new CustomItem(new ItemStack(Material.ENCHANTED_BOOK), "&aSlimefun Guide &7(Chest GUI)", "", "&eRight Click &8\u21E8 &7Browse Items", "&eShift + Right Click &8\u21E8 &7Open Settings / Credits"); + return item; } @Override @@ -313,17 +331,17 @@ public class ChestSlimefunGuide implements SlimefunGuideImplementation { int index = 9; // Find items and add them - for (SlimefunItem item : SlimefunPlugin.getRegistry().getEnabledSlimefunItems()) { - String itemName = ChatColor.stripColor(item.getItemName()).toLowerCase(Locale.ROOT); + for (SlimefunItem slimefunItem : SlimefunPlugin.getRegistry().getEnabledSlimefunItems()) { + String itemName = ChatColor.stripColor(slimefunItem.getItemName()).toLowerCase(Locale.ROOT); if (index == 44) { break; } if (!itemName.isEmpty() && (itemName.equals(searchTerm) || itemName.contains(searchTerm))) { - ItemStack itemstack = new CustomItem(item.getItem(), meta -> { + ItemStack itemstack = new CustomItem(slimefunItem.getItem(), meta -> { List lore = null; - Category category = item.getCategory(); + Category category = slimefunItem.getCategory(); if (category != null) { ItemStack categoryItem = category.getItem(p); @@ -341,10 +359,10 @@ public class ChestSlimefunGuide implements SlimefunGuideImplementation { menu.addMenuClickHandler(index, (pl, slot, itm, action) -> { try { if (!isSurvivalMode()) { - pl.getInventory().addItem(item.getItem().clone()); + pl.getInventory().addItem(slimefunItem.getItem().clone()); } else { - displayItem(profile, item, true); + displayItem(profile, slimefunItem, true); } } catch (Exception | LinkageError x) { @@ -400,30 +418,9 @@ public class ChestSlimefunGuide implements SlimefunGuideImplementation { RecipeChoiceTask task = new RecipeChoiceTask(); if (optional.isPresent()) { - MinecraftRecipe mcRecipe = optional.get(); + showRecipeChoices(recipe, recipeItems, task); - RecipeChoice[] choices = SlimefunPlugin.getMinecraftRecipeService().getRecipeShape(recipe); - - if (choices.length == 1 && choices[0] instanceof MaterialChoice) { - recipeItems[4] = new ItemStack(((MaterialChoice) choices[0]).getChoices().get(0)); - - if (((MaterialChoice) choices[0]).getChoices().size() > 1) { - task.add(recipeSlots[4], (MaterialChoice) choices[0]); - } - } - else { - for (int i = 0; i < choices.length; i++) { - if (choices[i] instanceof MaterialChoice) { - recipeItems[i] = new ItemStack(((MaterialChoice) choices[i]).getChoices().get(0)); - - if (((MaterialChoice) choices[i]).getChoices().size() > 1) { - task.add(recipeSlots[i], (MaterialChoice) choices[i]); - } - } - } - } - - recipeType = new RecipeType(mcRecipe); + recipeType = new RecipeType(optional.get()); result = recipe.getResult(); } else { @@ -465,6 +462,29 @@ public class ChestSlimefunGuide implements SlimefunGuideImplementation { } } + private void showRecipeChoices(T recipe, ItemStack[] recipeItems, RecipeChoiceTask task) { + RecipeChoice[] choices = SlimefunPlugin.getMinecraftRecipeService().getRecipeShape(recipe); + + if (choices.length == 1 && choices[0] instanceof MaterialChoice) { + recipeItems[4] = new ItemStack(((MaterialChoice) choices[0]).getChoices().get(0)); + + if (((MaterialChoice) choices[0]).getChoices().size() > 1) { + task.add(recipeSlots[4], (MaterialChoice) choices[0]); + } + } + else { + for (int i = 0; i < choices.length; i++) { + if (choices[i] instanceof MaterialChoice) { + recipeItems[i] = new ItemStack(((MaterialChoice) choices[i]).getChoices().get(0)); + + if (((MaterialChoice) choices[i]).getChoices().size() > 1) { + task.add(recipeSlots[i], (MaterialChoice) choices[i]); + } + } + } + } + } + @Override public void displayItem(PlayerProfile profile, SlimefunItem item, boolean addToHistory) { Player p = profile.getPlayer(); @@ -670,15 +690,15 @@ public class ChestSlimefunGuide implements SlimefunGuideImplementation { private void addDisplayRecipe(ChestMenu menu, PlayerProfile profile, List recipes, int slot, int i, int page) { if ((i + (page * 18)) < recipes.size()) { - ItemStack item = recipes.get(i + (page * 18)); + ItemStack displayItem = recipes.get(i + (page * 18)); // We want to clone this item to avoid corrupting the original // but we wanna make sure no stupid addon creator sneaked some nulls in here - if (item != null) { - item = item.clone(); + if (displayItem != null) { + displayItem = displayItem.clone(); } - menu.replaceExistingItem(slot, item); + menu.replaceExistingItem(slot, displayItem); if (page == 0) { menu.addMenuClickHandler(slot, (pl, s, itemstack, action) -> { diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunGuideListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunGuideListener.java index 78cf71659..490fc44a9 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunGuideListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/SlimefunGuideListener.java @@ -34,7 +34,7 @@ public class SlimefunGuideListener implements Listener { } SlimefunGuideLayout type = SlimefunGuide.getDefaultLayout(); - p.getInventory().addItem(SlimefunGuide.getItem(type)); + p.getInventory().addItem(SlimefunGuide.getItem(type).clone()); } } From 4911b8a5b6bf7154c3b3c7f60333d8759d419bb6 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 16 Aug 2020 15:53:40 +0200 Subject: [PATCH 64/65] [CI skip] Added another url to be excluded --- .github/workflows/url-checker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/url-checker.yml b/.github/workflows/url-checker.yml index 0b82a5aa5..db92ab64e 100644 --- a/.github/workflows/url-checker.yml +++ b/.github/workflows/url-checker.yml @@ -23,4 +23,4 @@ jobs: print_all: False retry_count: 2 ## These URLs will always be correct, even if their services may be offline right now - white_listed_patterns: http://textures.minecraft.net/texture/,https://pastebin.com/ + white_listed_patterns: http://textures.minecraft.net/texture/,https://pastebin.com/,https://www.spigotmc.org/threads/spigot-bungeecord-1-16-1.447405/#post-3852349 From 2a8abcbdbfbe262341caae94c7e6880ab94ad45b Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 16 Aug 2020 15:57:09 +0200 Subject: [PATCH 65/65] Fixed unit tests, also improved test coverage --- .../thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java index 3787d40b9..a49eaeef2 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunPlugin.java @@ -166,6 +166,7 @@ public final class SlimefunPlugin extends JavaPlugin implements SlimefunAddon { local = new LocalizationService(this, "", null); gpsNetwork = new GPSNetwork(); command.register(); + registry.load(config); } else if (getServer().getPluginManager().isPluginEnabled("CS-CoreLib")) { long timestamp = System.nanoTime();