Skip to content

Commit

Permalink
glass pane naming and tagging fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
talrey committed Dec 18, 2023
1 parent d0aac90 commit 3d8e642
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public class BlockRegistry {
public static HashMap<String, BlockEntry<CoinStackBlock>> COIN_BLOCKS = new HashMap<>();

public static HashMap<DyeColor, BlockEntry<ShippingContainerBlock>> SHIPPING_CONTAINERS = new HashMap<>();
//public static BlockEntityEntry<ShippingContainerBlock.Entity> SHIPPING_CONTAINER_ENTITIES;
public static HashMap<DyeColor, BlockEntityEntry<ShippingContainerBlock.Entity>> CONTAINER_ENTITIES = new HashMap<>();

public static DyeColor fromName (String color) {
Expand Down Expand Up @@ -211,12 +210,6 @@ private static void registerCatwalks (String metal, Function<String, Item> gette
.register());
}

/*
private static void registerWindows (String metal, Function<String, Item> getter) {
WINDOWS.put(metal, Windows.metalWindowBlock(metal, CDTags.of(metal, "blocks").tag));
}
*/

private static void registerSheetMetal (String metal, Function<String, Item> getter) {
SHEET_METAL_PILLARS.put(metal, SheetMetal.build(CreateDecoMod.REGISTRATE, metal)
.recipe( (ctx, prov)-> {
Expand All @@ -233,13 +226,13 @@ private static void registerSheetMetal (String metal, Function<String, Item> get
BRASS_WINDOW = Windows.metalWindowBlock("Brass"),
ZINC_WINDOW = Windows.metalWindowBlock("Zinc");

public static final BlockEntry<ConnectedGlassPaneBlock>
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<ConnectedGlassPaneBlock>
// 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<String, Item> getter) {
if (metal.equals("Iron") || metal.equals("Gold") || metal.equals("Netherite")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -73,7 +74,7 @@ public static BlockEntry<WindowBlock> windowBlock(String name,
Supplier<CTSpriteShiftEntry> ct, Supplier<Supplier<RenderType>> renderType, boolean translucent,
NonNullFunction<String, ResourceLocation> endTexture, NonNullFunction<String, ResourceLocation> sideTexture,
Supplier<MapColor> 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", ""))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"minecraft:glass"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"minecraft:glass_pane"
]
}

0 comments on commit 3d8e642

Please sign in to comment.