From 948db25fa4964a5d94bc47a74faa6327233c7405 Mon Sep 17 00:00:00 2001 From: Intybyte Date: Wed, 4 Sep 2024 14:19:08 +0200 Subject: [PATCH 1/9] Refactor a bit to follow code style + add capacity and consumption methods --- .../machines/entities/ExpCollector.java | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java index 3a6cb6d857..06b108269c 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java @@ -44,35 +44,38 @@ public class ExpCollector extends SlimefunItem implements InventoryBlock, Energy private final int[] border = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }; - private static final int ENERGY_CONSUMPTION = 10; private static final String DATA_KEY = "stored-exp"; + private final double range; + private int energyConsumedPerTick = -1; + private int energyCapacity = -1; + @ParametersAreNonnullByDefault - public ExpCollector(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + public ExpCollector(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, double range) { super(itemGroup, item, recipeType, recipe); createPreset(this, this::constructMenu); + this.range = range; addItemHandler(onPlace(), onBreak()); } - @Nonnull - private BlockPlaceHandler onPlace() { + + private @Nonnull BlockPlaceHandler onPlace() { return new BlockPlaceHandler(false) { @Override - public void onPlayerPlace(BlockPlaceEvent e) { + public void onPlayerPlace(@Nonnull BlockPlaceEvent e) { BlockStorage.addBlockInfo(e.getBlock(), "owner", e.getPlayer().getUniqueId().toString()); } }; } - @Nonnull - private ItemHandler onBreak() { + private @Nonnull ItemHandler onBreak() { return new SimpleBlockBreakHandler() { @Override - public void onBlockBreak(Block b) { + public void onBlockBreak(@Nonnull Block b) { BlockMenu inv = BlockStorage.getInventory(b); if (inv != null) { @@ -97,11 +100,6 @@ public EnergyNetComponentType getEnergyComponentType() { return EnergyNetComponentType.CONSUMER; } - @Override - public int getCapacity() { - return 1024; - } - protected void constructMenu(BlockMenuPreset preset) { for (int slot : border) { preset.addItem(slot, new CustomItemStack(Material.PURPLE_STAINED_GLASS_PANE, " "), (p, s, item, action) -> false); @@ -132,13 +130,13 @@ protected void tick(Block block) { while (iterator.hasNext() && experiencePoints == 0) { ExperienceOrb orb = (ExperienceOrb) iterator.next(); - if (getCharge(location) < ENERGY_CONSUMPTION) { + if (getCharge(location) < getEnergyConsumption()) { return; } experiencePoints = getStoredExperience(location) + orb.getExperience(); - removeCharge(location, ENERGY_CONSUMPTION); + removeCharge(location, getEnergyConsumption()); orb.remove(); produceFlasks(location, experiencePoints); } @@ -179,4 +177,21 @@ private int getStoredExperience(Location location) { return 0; } } + + public int getEnergyConsumption() { + return energyConsumedPerTick; + } + + public void setEnergyConsumption(int energyConsumedPerTick) { + this.energyConsumedPerTick = energyConsumedPerTick; + } + + @Override + public int getCapacity() { + return energyCapacity; + } + + public void setCapacity(int energyCapacity) { + this.energyCapacity = energyCapacity; + } } From b9aaca56936eaa20cd08881c28c7b2a7a474d13f Mon Sep 17 00:00:00 2001 From: Intybyte Date: Wed, 4 Sep 2024 14:21:44 +0200 Subject: [PATCH 2/9] Complete adjustment --- .../items/electric/machines/entities/ExpCollector.java | 8 +++++--- .../slimefun4/implementation/setup/SlimefunItemSetup.java | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java index 06b108269c..2e4f7566d9 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java @@ -124,7 +124,7 @@ public boolean isSynchronized() { protected void tick(Block block) { Location location = block.getLocation(); - Iterator iterator = block.getWorld().getNearbyEntities(location, 4.0, 4.0, 4.0, n -> n instanceof ExperienceOrb && n.isValid()).iterator(); + Iterator iterator = block.getWorld().getNearbyEntities(location, range, range, range, n -> n instanceof ExperienceOrb && n.isValid()).iterator(); int experiencePoints = 0; while (iterator.hasNext() && experiencePoints == 0) { @@ -182,8 +182,9 @@ public int getEnergyConsumption() { return energyConsumedPerTick; } - public void setEnergyConsumption(int energyConsumedPerTick) { + public ExpCollector setEnergyConsumption(int energyConsumedPerTick) { this.energyConsumedPerTick = energyConsumedPerTick; + return this; } @Override @@ -191,7 +192,8 @@ public int getCapacity() { return energyCapacity; } - public void setCapacity(int energyCapacity) { + public ExpCollector setCapacity(int energyCapacity) { this.energyCapacity = energyCapacity; + return this; } } 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 9ade30e843..37cc773111 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 @@ -2381,7 +2381,9 @@ public int getEnergyConsumption() { .register(plugin); new ExpCollector(itemGroups.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}) + 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}, 4.0) + .setEnergyConsumption(10) + .setCapacity(1024) .register(plugin); new FoodComposter(itemGroups.electricity, SlimefunItems.FOOD_COMPOSTER, RecipeType.ENHANCED_CRAFTING_TABLE, From f41bc0282e8f70e4afc5073b32ce196de0213800 Mon Sep 17 00:00:00 2001 From: Intybyte Date: Wed, 4 Sep 2024 14:26:57 +0200 Subject: [PATCH 3/9] Preparing to add the other ones --- .../slimefun4/implementation/SlimefunItems.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 8695759316..c7bdd17b6e 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java @@ -821,7 +821,10 @@ private SlimefunItems() {} public static final SlimefunItemStack FOOD_COMPOSTER = new SlimefunItemStack("FOOD_COMPOSTER", Material.GREEN_TERRACOTTA, "&cFood Composter", "", "&fProduces &aOrganic Fertilizer", "", LoreBuilder.machine(MachineTier.ADVANCED, MachineType.MACHINE), LoreBuilder.speed(1), LoreBuilder.powerBuffer(256), LoreBuilder.powerPerSecond(16)); public static final SlimefunItemStack FOOD_COMPOSTER_2 = new SlimefunItemStack("FOOD_COMPOSTER_2", Material.GREEN_TERRACOTTA, "&cFood Composter &7(&eII&7)", "", "&fProduces &aOrganic Fertilizer", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.speed(10), LoreBuilder.powerBuffer(512), LoreBuilder.powerPerSecond(52)); - public static final SlimefunItemStack EXP_COLLECTOR = new SlimefunItemStack("XP_COLLECTOR", HeadTexture.EXP_COLLECTOR, "&aEXP Collector", "", "&fCollects nearby Exp and stores it", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.powerBuffer(1024), LoreBuilder.powerPerSecond(20)); + public static final SlimefunItemStack EXP_COLLECTOR = new SlimefunItemStack("XP_COLLECTOR", HeadTexture.EXP_COLLECTOR, "&aEXP Collector", "", "&fCollects nearby Exp and stores it", "&fRange is a 4x4x4 area", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.powerBuffer(1024), LoreBuilder.powerPerSecond(20)); + public static final SlimefunItemStack EXP_COLLECTOR_2 = new SlimefunItemStack("XP_COLLECTOR_2", HeadTexture.EXP_COLLECTOR, "&aEXP Collector &7(&eII&7)", "", "&fCollects nearby Exp and stores it", "&fRange is a 7x7x7 area", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.powerBuffer(2048), LoreBuilder.powerPerSecond(40)); + public static final SlimefunItemStack EXP_COLLECTOR_3 = new SlimefunItemStack("XP_COLLECTOR_3", HeadTexture.EXP_COLLECTOR, "&aEXP Collector &7(&eIII&7)", "", "&fCollects nearby Exp and stores it", "&fRange is a 15x15x15 area", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.powerBuffer(4096), LoreBuilder.powerPerSecond(60)); + public static final SlimefunItemStack REACTOR_COOLANT_CELL = new SlimefunItemStack("REACTOR_COLLANT_CELL", HeadTexture.COOLANT_CELL, "&bReactor Coolant Cell"); public static final SlimefunItemStack NUCLEAR_REACTOR = new SlimefunItemStack("NUCLEAR_REACTOR", HeadTexture.NUCLEAR_REACTOR, "&2Nuclear Reactor", "", "&fRequires Cooling!", "&8\u21E8 &bMust be surrounded by Water", "&8\u21E8 &bMust be supplied with Reactor Coolant Cells", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.GENERATOR), LoreBuilder.powerBuffer(16384), LoreBuilder.powerPerSecond(500)); From 3b45026dad7316dc0b1bafaabf04ca56fa3b6a1e Mon Sep 17 00:00:00 2001 From: Intybyte Date: Sat, 26 Oct 2024 09:45:14 +0200 Subject: [PATCH 4/9] Remove other items --- .../thebusybiscuit/slimefun4/implementation/SlimefunItems.java | 3 --- 1 file changed, 3 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 c7bdd17b6e..43ee183dba 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java @@ -822,9 +822,6 @@ private SlimefunItems() {} public static final SlimefunItemStack FOOD_COMPOSTER_2 = new SlimefunItemStack("FOOD_COMPOSTER_2", Material.GREEN_TERRACOTTA, "&cFood Composter &7(&eII&7)", "", "&fProduces &aOrganic Fertilizer", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.speed(10), LoreBuilder.powerBuffer(512), LoreBuilder.powerPerSecond(52)); public static final SlimefunItemStack EXP_COLLECTOR = new SlimefunItemStack("XP_COLLECTOR", HeadTexture.EXP_COLLECTOR, "&aEXP Collector", "", "&fCollects nearby Exp and stores it", "&fRange is a 4x4x4 area", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.powerBuffer(1024), LoreBuilder.powerPerSecond(20)); - public static final SlimefunItemStack EXP_COLLECTOR_2 = new SlimefunItemStack("XP_COLLECTOR_2", HeadTexture.EXP_COLLECTOR, "&aEXP Collector &7(&eII&7)", "", "&fCollects nearby Exp and stores it", "&fRange is a 7x7x7 area", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.powerBuffer(2048), LoreBuilder.powerPerSecond(40)); - public static final SlimefunItemStack EXP_COLLECTOR_3 = new SlimefunItemStack("XP_COLLECTOR_3", HeadTexture.EXP_COLLECTOR, "&aEXP Collector &7(&eIII&7)", "", "&fCollects nearby Exp and stores it", "&fRange is a 15x15x15 area", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.powerBuffer(4096), LoreBuilder.powerPerSecond(60)); - public static final SlimefunItemStack REACTOR_COOLANT_CELL = new SlimefunItemStack("REACTOR_COLLANT_CELL", HeadTexture.COOLANT_CELL, "&bReactor Coolant Cell"); public static final SlimefunItemStack NUCLEAR_REACTOR = new SlimefunItemStack("NUCLEAR_REACTOR", HeadTexture.NUCLEAR_REACTOR, "&2Nuclear Reactor", "", "&fRequires Cooling!", "&8\u21E8 &bMust be surrounded by Water", "&8\u21E8 &bMust be supplied with Reactor Coolant Cells", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.GENERATOR), LoreBuilder.powerBuffer(16384), LoreBuilder.powerPerSecond(500)); From 1c22c7ce6c0499fb9ffbe1184f7b8a6c9eeec8aa Mon Sep 17 00:00:00 2001 From: Intybyte Date: Sat, 26 Oct 2024 09:47:24 +0200 Subject: [PATCH 5/9] Revert --- .../thebusybiscuit/slimefun4/implementation/SlimefunItems.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 43ee183dba..8695759316 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/SlimefunItems.java @@ -821,7 +821,7 @@ private SlimefunItems() {} public static final SlimefunItemStack FOOD_COMPOSTER = new SlimefunItemStack("FOOD_COMPOSTER", Material.GREEN_TERRACOTTA, "&cFood Composter", "", "&fProduces &aOrganic Fertilizer", "", LoreBuilder.machine(MachineTier.ADVANCED, MachineType.MACHINE), LoreBuilder.speed(1), LoreBuilder.powerBuffer(256), LoreBuilder.powerPerSecond(16)); public static final SlimefunItemStack FOOD_COMPOSTER_2 = new SlimefunItemStack("FOOD_COMPOSTER_2", Material.GREEN_TERRACOTTA, "&cFood Composter &7(&eII&7)", "", "&fProduces &aOrganic Fertilizer", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.speed(10), LoreBuilder.powerBuffer(512), LoreBuilder.powerPerSecond(52)); - public static final SlimefunItemStack EXP_COLLECTOR = new SlimefunItemStack("XP_COLLECTOR", HeadTexture.EXP_COLLECTOR, "&aEXP Collector", "", "&fCollects nearby Exp and stores it", "&fRange is a 4x4x4 area", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.powerBuffer(1024), LoreBuilder.powerPerSecond(20)); + public static final SlimefunItemStack EXP_COLLECTOR = new SlimefunItemStack("XP_COLLECTOR", HeadTexture.EXP_COLLECTOR, "&aEXP Collector", "", "&fCollects nearby Exp and stores it", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.MACHINE), LoreBuilder.powerBuffer(1024), LoreBuilder.powerPerSecond(20)); public static final SlimefunItemStack REACTOR_COOLANT_CELL = new SlimefunItemStack("REACTOR_COLLANT_CELL", HeadTexture.COOLANT_CELL, "&bReactor Coolant Cell"); public static final SlimefunItemStack NUCLEAR_REACTOR = new SlimefunItemStack("NUCLEAR_REACTOR", HeadTexture.NUCLEAR_REACTOR, "&2Nuclear Reactor", "", "&fRequires Cooling!", "&8\u21E8 &bMust be surrounded by Water", "&8\u21E8 &bMust be supplied with Reactor Coolant Cells", "", LoreBuilder.machine(MachineTier.END_GAME, MachineType.GENERATOR), LoreBuilder.powerBuffer(16384), LoreBuilder.powerPerSecond(500)); From 327a258528b4ac39fda453a5eedfef9814464518 Mon Sep 17 00:00:00 2001 From: Intybyte Date: Sat, 26 Oct 2024 16:27:01 +0200 Subject: [PATCH 6/9] Address changes --- .../items/electric/machines/entities/ExpCollector.java | 7 +++++-- .../slimefun4/implementation/setup/SlimefunItemSetup.java | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java index 2e4f7566d9..77b0409cc4 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java @@ -50,13 +50,16 @@ public class ExpCollector extends SlimefunItem implements InventoryBlock, Energy private int energyConsumedPerTick = -1; private int energyCapacity = -1; + public ExpCollector(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { + this(itemGroup, item, recipeType, recipe, 4.0); + } + @ParametersAreNonnullByDefault public ExpCollector(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, double range) { super(itemGroup, item, recipeType, recipe); + this.range = range; createPreset(this, this::constructMenu); - - this.range = range; addItemHandler(onPlace(), onBreak()); } 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 37cc773111..9eb9b40ad0 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 @@ -2381,7 +2381,7 @@ public int getEnergyConsumption() { .register(plugin); new ExpCollector(itemGroups.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}, 4.0) + 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}) .setEnergyConsumption(10) .setCapacity(1024) .register(plugin); From 83015a344c7cbd485c9257eca073f9500d8a4a07 Mon Sep 17 00:00:00 2001 From: Intybyte Date: Sat, 26 Oct 2024 16:28:23 +0200 Subject: [PATCH 7/9] Forgot annotation here --- .../items/electric/machines/entities/ExpCollector.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java index 77b0409cc4..daf8c77020 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java @@ -50,6 +50,7 @@ public class ExpCollector extends SlimefunItem implements InventoryBlock, Energy private int energyConsumedPerTick = -1; private int energyCapacity = -1; + @ParametersAreNonnullByDefault public ExpCollector(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { this(itemGroup, item, recipeType, recipe, 4.0); } From 705551d57c9b73b406c2a4109904ec4ebf0aedeb Mon Sep 17 00:00:00 2001 From: Intybyte Date: Sat, 26 Oct 2024 17:50:30 +0200 Subject: [PATCH 8/9] Deprecate constructor --- .../items/electric/machines/entities/ExpCollector.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java index daf8c77020..199559a28a 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java @@ -50,6 +50,7 @@ public class ExpCollector extends SlimefunItem implements InventoryBlock, Energy private int energyConsumedPerTick = -1; private int energyCapacity = -1; + @Deprecated @ParametersAreNonnullByDefault public ExpCollector(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { this(itemGroup, item, recipeType, recipe, 4.0); From 123dae7984936c8baa88e2432b70d20e129948ae Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Sat, 26 Oct 2024 18:45:43 +0100 Subject: [PATCH 9/9] Update src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java --- .../items/electric/machines/entities/ExpCollector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java index 199559a28a..4697ec75fd 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java @@ -50,7 +50,7 @@ public class ExpCollector extends SlimefunItem implements InventoryBlock, Energy private int energyConsumedPerTick = -1; private int energyCapacity = -1; - @Deprecated + @Deprecated(since = "RC-38", forRemoval = true) @ParametersAreNonnullByDefault public ExpCollector(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { this(itemGroup, item, recipeType, recipe, 4.0);