From a7311b9da005752a9e7647bb0cdb0c4115fca2ad Mon Sep 17 00:00:00 2001 From: jottyfan Date: Wed, 6 Jan 2021 20:53:01 +0100 Subject: [PATCH] terrestria leaves added to speedpowder axe blocks --- gradle.properties | 2 +- .../quickiefabric/tools/ToolRangeable.java | 15 +++++---------- .../quickiefabric/tools/externalmods/Byg.java | 17 +++++++++++------ .../tools/externalmods/Terrestria.java | 11 ++++++----- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1282ab0..9cbfcb0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.10.6+build.214 # Mod Properties - mod_version = 1.16.4.4 + mod_version = 1.16.4.5 maven_group = de.jottyfan.minecraft archives_base_name = quickiefabric diff --git a/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/ToolRangeable.java b/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/ToolRangeable.java index 3d94301..19158ca 100644 --- a/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/ToolRangeable.java +++ b/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/ToolRangeable.java @@ -10,7 +10,6 @@ import com.google.common.collect.Sets; import de.jottyfan.minecraft.quickiefabric.tools.externalmods.Byg; import de.jottyfan.minecraft.quickiefabric.tools.externalmods.IdentifierGroup; -import de.jottyfan.minecraft.quickiefabric.tools.externalmods.IdentifierGroups; import de.jottyfan.minecraft.quickiefabric.tools.externalmods.Terrestria; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -51,15 +50,11 @@ public interface ToolRangeable { Arrays.asList(Blocks.POTTED_RED_MUSHROOM, Blocks.RED_MUSHROOM_BLOCK, Blocks.RED_MUSHROOM, Blocks.MUSHROOM_STEM)); public static final Set AXE_EFFECTIVE_ON_EXTERNAL = mergeGroupSets( - Terrestria.createFromSet( - new IdentifierGroups("cypress", "hemlock", "japanese_maple", "rainbow_eucalyptus", "redwood", "rubber", - "sakura", "willow", "yucca_palm").getGroups("log", "quarter_log", "log_bare", "log_top", "wood")), - Byg.createFromSet(new IdentifierGroups("aspen", "baobab", "blue_enchanted", "cherry", "cika", "cypress", "ebony", - "fir", "green_enchanted", "holly", "jacaranda", "mahogany", "mangrove", "pine", "rainbow_eucalyptus", - "redwood", "skyris", "willow", "witch_hazel", "zelkova").getGroups("log", "wood")), - Byg.createFromSet( - new IdentifierGroups("blue_glowshroom", "purple_glowshroom", "red_glowshroom", "yellow_glowshroom") - .getGroups("block", "stem"))); + Terrestria.createFromSet(Terrestria.WOOD.getGroups("log", "quarter_log", "log_bare", "log_top", "wood", "")), + // only because terrestria leaves are not instanceof LeavesBlock + Terrestria.createFromSet(Terrestria.WOOD.getGroups("leaves")), + Byg.createFromSet(Byg.WOOD.getGroups("log", "wood")), + Byg.createFromSet(Byg.MUSHROOM.getGroups("block", "stem"))); public static final Set PICKAXE_EFFECTIVE_ON = Sets.newHashSet(new Block[] { Blocks.GLOWSTONE }); diff --git a/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/externalmods/Byg.java b/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/externalmods/Byg.java index a0f646e..2b4cc24 100644 --- a/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/externalmods/Byg.java +++ b/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/externalmods/Byg.java @@ -12,6 +12,12 @@ import net.minecraft.util.Identifier; */ public class Byg extends Identifier { + public static final IdentifierGroups WOOD = new IdentifierGroups("aspen", "baobab", "blue_enchanted", "cherry", + "cika", "cypress", "ebony", "fir", "green_enchanted", "holly", "jacaranda", "mahogany", "mangrove", "pine", + "rainbow_eucalyptus", "redwood", "skyris", "willow", "witch_hazel", "zelkova"); + public static final IdentifierGroups MUSHROOM = new IdentifierGroups("blue_glowshroom", "purple_glowshroom", + "red_glowshroom", "yellow_glowshroom"); + /** * create identifier preluded by byg (for biomes you'll go) * @@ -20,7 +26,7 @@ public class Byg extends Identifier { public Byg(String id) { super("byg", id); } - + /** * create a new set of Byg Identifiers * @@ -34,7 +40,7 @@ public class Byg extends Identifier { } return set; } - + /** * create from groups * @@ -49,16 +55,15 @@ public class Byg extends Identifier { } return set; } - + /** * create from set * * @param set the set * @return the set of idenfifier groups */ - public static final Set createFromSet(Set set){ - for (IdentifierGroup group : set) - { + public static final Set createFromSet(Set set) { + for (IdentifierGroup group : set) { group.setModId("byg"); } return set; diff --git a/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/externalmods/Terrestria.java b/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/externalmods/Terrestria.java index 6824805..e0eaa49 100644 --- a/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/externalmods/Terrestria.java +++ b/src/main/java/de/jottyfan/minecraft/quickiefabric/tools/externalmods/Terrestria.java @@ -12,6 +12,9 @@ import net.minecraft.util.Identifier; */ public class Terrestria extends Identifier { + public static final IdentifierGroups WOOD = new IdentifierGroups("cypress", "hemlock", "japanese_maple", + "rainbow_eucalyptus", "redwood", "rubber", "sakura", "willow", "yucca_palm"); + /** * create identifier preluded by terrestria * @@ -49,17 +52,15 @@ public class Terrestria extends Identifier { } return set; } - - + /** * create from set * * @param set the set * @return the set of idenfifier groups */ - public static final Set createFromSet(Set set){ - for (IdentifierGroup group : set) - { + public static final Set createFromSet(Set set) { + for (IdentifierGroup group : set) { group.setModId("terrestria"); } return set;