From 214dc533a51f758e00805dda5b1ceb0464bc4f11 Mon Sep 17 00:00:00 2001 From: Apeiros-46B <61390942+Apeiros-46B@users.noreply.github.com> Date: Tue, 6 Jul 2021 02:49:22 -0700 Subject: [PATCH 1/9] Add Amethyst Block -> 4 Amethyst Shard recipe to grindstone --- .../implementation/items/multiblocks/GrindStone.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/GrindStone.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/GrindStone.java index 11563d6cb..4be2a24d7 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/GrindStone.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/multiblocks/GrindStone.java @@ -6,6 +6,7 @@ import java.util.stream.Collectors; import javax.annotation.Nonnull; import javax.annotation.ParametersAreNonnullByDefault; +import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion; import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.block.Block; @@ -80,6 +81,11 @@ public class GrindStone extends MultiBlockMachine { recipes.add(new ItemStack(Material.QUARTZ_BLOCK)); recipes.add(new ItemStack(Material.QUARTZ, 4)); + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_17)) { + recipes.add(new ItemStack(Material.AMETHYST_BLOCK)); + recipes.add(new ItemStack(Material.AMETHYST_SHARD, 4)); + } + recipes.add(SlimefunItems.MAGIC_LUMP_2); recipes.add(new SlimefunItemStack(SlimefunItems.MAGIC_LUMP_1, 4)); From 5fe8dff05e5944ad671c913b47ae99cda85ffd2d Mon Sep 17 00:00:00 2001 From: Lil_BC <76880877+LilBC@users.noreply.github.com> Date: Thu, 8 Jul 2021 11:54:04 -0400 Subject: [PATCH 2/9] Added My Minecraft Name --- .../slimefun4/core/services/github/ContributionsConnector.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/github/ContributionsConnector.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/github/ContributionsConnector.java index 7e5b166e1..df7a9915c 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/github/ContributionsConnector.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/github/ContributionsConnector.java @@ -75,6 +75,7 @@ class ContributionsConnector extends GitHubConnector { aliases.put("ramdon-person", "ramdon_person"); aliases.put("NCBPFluffyBear", "FluffyBear_"); aliases.put("martinbrom", "OneTime97"); + aliases.put("LilBC", "Lil_BC"); } /** @@ -134,4 +135,4 @@ class ContributionsConnector extends GitHubConnector { } } } -} \ No newline at end of file +} From 03e10830d151b12a0b39c1c79774a52c2322adc2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 8 Jul 2021 18:59:52 +0000 Subject: [PATCH 3/9] Update dependency com.github.seeseemelk:MockBukkit-v1.16 to v1.5.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 629a97cb5..2f8fdca92 100644 --- a/pom.xml +++ b/pom.xml @@ -355,7 +355,7 @@ com.github.seeseemelk MockBukkit-v1.16 - 1.3.2 + 1.5.0 test From 5279ddc67b31869ad6cccb6ef04b5a5bb4028eb5 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Fri, 9 Jul 2021 12:13:25 +0200 Subject: [PATCH 4/9] [CI skip] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8a2ef53d..4e01fb495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ * Tridents can now be crafted * The Industrial Miner can now mine up to the minimum world limit (previously only until y=0) * (API) Added SlimefunItemSpawnEvent and ItemSpawnReason +* Added "Amethyst Block -> 4 Amethyst Shards" recipe to the Grind Stone #### Changes From 7285277707d25d27edcb2b98737a3543536cf7bf Mon Sep 17 00:00:00 2001 From: Martin Brom Date: Fri, 9 Jul 2021 23:59:27 +0200 Subject: [PATCH 5/9] Add the option to prevent IndustrialMiner from mining deepslate ores --- .../items/multiblocks/miner/IndustrialMiner.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 dec2ebd5f..37ba21a27 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 @@ -52,6 +52,7 @@ public class IndustrialMiner extends MultiBlockMachine { protected final List fuelTypes = new ArrayList<>(); private final ItemSetting canMineAncientDebris = new ItemSetting<>(this, "can-mine-ancient-debris", false); + private final ItemSetting canMineDeepslateOres = new ItemSetting<>(this, "can-mine-deepslate-ores", false); private final boolean silkTouch; private final int range; @@ -64,6 +65,7 @@ public class IndustrialMiner extends MultiBlockMachine { registerDefaultFuelTypes(); addItemSetting(canMineAncientDebris); + addItemSetting(canMineDeepslateOres); } /** @@ -217,14 +219,15 @@ public class IndustrialMiner extends MultiBlockMachine { * @return Whether this {@link IndustrialMiner} is capable of mining this {@link Material} */ public boolean canMine(@Nonnull Material type) { - if (SlimefunTag.INDUSTRIAL_MINER_ORES.isTagged(type)) { - return true; - } else if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16)) { - return type == Material.ANCIENT_DEBRIS && canMineAncientDebris.getValue(); - + if (type == Material.ANCIENT_DEBRIS) { + return canMineAncientDebris.getValue() && SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16); } - return false; + if (SlimefunTag.DEEPSLATE_ORES.isTagged(type)) { + return canMineDeepslateOres.getValue() && SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_17); + } + + return SlimefunTag.INDUSTRIAL_MINER_ORES.isTagged(type); } } From 8e13b41a346f24c1b634808bcd115cfbe2901996 Mon Sep 17 00:00:00 2001 From: Martin Brom Date: Sat, 10 Jul 2021 00:18:03 +0200 Subject: [PATCH 6/9] Reorder conditions to prevent a possible version error --- .../items/multiblocks/miner/IndustrialMiner.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 37ba21a27..41b3f81fb 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 @@ -219,12 +219,12 @@ public class IndustrialMiner extends MultiBlockMachine { * @return Whether this {@link IndustrialMiner} is capable of mining this {@link Material} */ public boolean canMine(@Nonnull Material type) { - if (type == Material.ANCIENT_DEBRIS) { - return canMineAncientDebris.getValue() && SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16); + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16) && type == Material.ANCIENT_DEBRIS) { + return canMineAncientDebris.getValue(); } - if (SlimefunTag.DEEPSLATE_ORES.isTagged(type)) { - return canMineDeepslateOres.getValue() && SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_17); + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_17) && SlimefunTag.DEEPSLATE_ORES.isTagged(type)) { + return canMineDeepslateOres.getValue(); } return SlimefunTag.INDUSTRIAL_MINER_ORES.isTagged(type); From 795a4c02db0fac1cebec0570e51ad89dc7fb80f2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 10 Jul 2021 05:05:25 +0000 Subject: [PATCH 7/9] Update dependency me.clip:placeholderapi to v2.10.10 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2f8fdca92..12799d20f 100644 --- a/pom.xml +++ b/pom.xml @@ -442,7 +442,7 @@ me.clip placeholderapi - 2.10.9 + 2.10.10 provided From 11ba156bb3a223d04c5042df927259e0d9beb523 Mon Sep 17 00:00:00 2001 From: Martin Brom Date: Sat, 10 Jul 2021 09:07:53 +0200 Subject: [PATCH 8/9] Change the default value for canMineDeepslateOres to true --- .../items/multiblocks/miner/IndustrialMiner.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 41b3f81fb..189fb4cf1 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 @@ -52,7 +52,7 @@ public class IndustrialMiner extends MultiBlockMachine { protected final List fuelTypes = new ArrayList<>(); private final ItemSetting canMineAncientDebris = new ItemSetting<>(this, "can-mine-ancient-debris", false); - private final ItemSetting canMineDeepslateOres = new ItemSetting<>(this, "can-mine-deepslate-ores", false); + private final ItemSetting canMineDeepslateOres = new ItemSetting<>(this, "can-mine-deepslate-ores", true); private final boolean silkTouch; private final int range; @@ -161,12 +161,12 @@ public class IndustrialMiner extends MultiBlockMachine { } @Override - public String getLabelLocalPath() { + public @Nonnull String getLabelLocalPath() { return "guide.tooltips.recipes.generator"; } @Override - public List getDisplayRecipes() { + public @Nonnull List getDisplayRecipes() { List list = new ArrayList<>(); for (MachineFuel fuel : fuelTypes) { @@ -219,11 +219,12 @@ public class IndustrialMiner extends MultiBlockMachine { * @return Whether this {@link IndustrialMiner} is capable of mining this {@link Material} */ public boolean canMine(@Nonnull Material type) { - if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16) && type == Material.ANCIENT_DEBRIS) { + MinecraftVersion version = SlimefunPlugin.getMinecraftVersion(); + if (version.isAtLeast(MinecraftVersion.MINECRAFT_1_16) && type == Material.ANCIENT_DEBRIS) { return canMineAncientDebris.getValue(); } - if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_17) && SlimefunTag.DEEPSLATE_ORES.isTagged(type)) { + if (version.isAtLeast(MinecraftVersion.MINECRAFT_1_17) && SlimefunTag.DEEPSLATE_ORES.isTagged(type)) { return canMineDeepslateOres.getValue(); } From ad2e0f3dbcea9cb880bee7b4de7223e4f3ff382d Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sat, 10 Jul 2021 12:33:11 +0200 Subject: [PATCH 9/9] [CI skip] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e01fb495..dc78ea5a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ * The Industrial Miner can now mine up to the minimum world limit (previously only until y=0) * (API) Added SlimefunItemSpawnEvent and ItemSpawnReason * Added "Amethyst Block -> 4 Amethyst Shards" recipe to the Grind Stone +* Added an option to the IndustrialMiner to configure if they can mine deepslate ores #### Changes