From 3d8e642de63676199d854d14f527557709ca1c4b Mon Sep 17 00:00:00 2001 From: Talrey Date: Sun, 17 Dec 2023 21:47:59 -0800 Subject: [PATCH] glass pane naming and tagging fixes --- .../talrey/createdeco/BlockRegistry.java | 21 +++++++------------ .../github/talrey/createdeco/api/Windows.java | 3 ++- .../tags/items/internal/colorless_glass.json | 6 ++++++ .../items/internal/colorless_glass_panes.json | 6 ++++++ 4 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 common/src/main/resources/data/createdeco/tags/items/internal/colorless_glass.json create mode 100644 common/src/main/resources/data/createdeco/tags/items/internal/colorless_glass_panes.json diff --git a/common/src/main/java/com/github/talrey/createdeco/BlockRegistry.java b/common/src/main/java/com/github/talrey/createdeco/BlockRegistry.java index 3b403d0a..1467b787 100644 --- a/common/src/main/java/com/github/talrey/createdeco/BlockRegistry.java +++ b/common/src/main/java/com/github/talrey/createdeco/BlockRegistry.java @@ -80,7 +80,6 @@ public class BlockRegistry { public static HashMap> COIN_BLOCKS = new HashMap<>(); public static HashMap> SHIPPING_CONTAINERS = new HashMap<>(); - //public static BlockEntityEntry SHIPPING_CONTAINER_ENTITIES; public static HashMap> CONTAINER_ENTITIES = new HashMap<>(); public static DyeColor fromName (String color) { @@ -211,12 +210,6 @@ private static void registerCatwalks (String metal, Function gette .register()); } - /* - private static void registerWindows (String metal, Function getter) { - WINDOWS.put(metal, Windows.metalWindowBlock(metal, CDTags.of(metal, "blocks").tag)); - } - */ - private static void registerSheetMetal (String metal, Function getter) { SHEET_METAL_PILLARS.put(metal, SheetMetal.build(CreateDecoMod.REGISTRATE, metal) .recipe( (ctx, prov)-> { @@ -233,13 +226,13 @@ private static void registerSheetMetal (String metal, Function get BRASS_WINDOW = Windows.metalWindowBlock("Brass"), ZINC_WINDOW = Windows.metalWindowBlock("Zinc"); - public static final BlockEntry - ANDESITE_WINDOW_PANE = Windows.metalWindowPane("Andesite", ANDESITE_WINDOW), - COPPER_WINDOW_PANE = Windows.metalWindowPane("Copper", COPPER_WINDOW), - IRON_WINDOW_PANE = Windows.metalWindowPane("Iron", IRON_WINDOW), - INDUSTRIAL_IRON_WINDOW_PANE = Windows.metalWindowPane("Industrial Iron", INDUSTRIAL_IRON_WINDOW), - BRASS_WINDOW_PANE = Windows.metalWindowPane("Brass", BRASS_WINDOW), - ZINC_WINDOW_PANE = Windows.metalWindowPane("Zinc", ZINC_WINDOW); +// public static final BlockEntry +// ANDESITE_WINDOW_PANE = Windows.metalWindowPane("Andesite", ANDESITE_WINDOW), +// COPPER_WINDOW_PANE = Windows.metalWindowPane("Copper", COPPER_WINDOW), +// IRON_WINDOW_PANE = Windows.metalWindowPane("Iron", IRON_WINDOW), +// INDUSTRIAL_IRON_WINDOW_PANE = Windows.metalWindowPane("Industrial Iron", INDUSTRIAL_IRON_WINDOW), +// BRASS_WINDOW_PANE = Windows.metalWindowPane("Brass", BRASS_WINDOW), +// ZINC_WINDOW_PANE = Windows.metalWindowPane("Zinc", ZINC_WINDOW); private static void registerDoors (String metal, Function getter) { if (metal.equals("Iron") || metal.equals("Gold") || metal.equals("Netherite")) { diff --git a/common/src/main/java/com/github/talrey/createdeco/api/Windows.java b/common/src/main/java/com/github/talrey/createdeco/api/Windows.java index 194e361b..8b9c01db 100644 --- a/common/src/main/java/com/github/talrey/createdeco/api/Windows.java +++ b/common/src/main/java/com/github/talrey/createdeco/api/Windows.java @@ -35,6 +35,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.MapColor; +import java.util.Locale; import java.util.function.Supplier; import static com.simibubi.create.foundation.data.CreateRegistrate.connectedTextures; @@ -73,7 +74,7 @@ public static BlockEntry windowBlock(String name, Supplier ct, Supplier> renderType, boolean translucent, NonNullFunction endTexture, NonNullFunction sideTexture, Supplier color) { - return CreateDecoMod.REGISTRATE.block(name.toLowerCase().replace(" ", "_"), p -> new WindowBlock(p, translucent)) + return CreateDecoMod.REGISTRATE.block(name.toLowerCase(Locale.ROOT).replace(" ", "_"), p -> new WindowBlock(p, translucent)) //.onRegister(connectedTextures(() -> new HorizontalCTBehaviour(ct.get()))) .onRegister(CreateRegistrate.connectedTextures(() -> new HorizontalCTBehaviour(SpriteShifts.METAL_WINDOWS.get(name.replace("_window", "")) diff --git a/common/src/main/resources/data/createdeco/tags/items/internal/colorless_glass.json b/common/src/main/resources/data/createdeco/tags/items/internal/colorless_glass.json new file mode 100644 index 00000000..41c35c32 --- /dev/null +++ b/common/src/main/resources/data/createdeco/tags/items/internal/colorless_glass.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "minecraft:glass" + ] +} \ No newline at end of file diff --git a/common/src/main/resources/data/createdeco/tags/items/internal/colorless_glass_panes.json b/common/src/main/resources/data/createdeco/tags/items/internal/colorless_glass_panes.json new file mode 100644 index 00000000..a0638aac --- /dev/null +++ b/common/src/main/resources/data/createdeco/tags/items/internal/colorless_glass_panes.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "minecraft:glass_pane" + ] +} \ No newline at end of file