Skip to content

Commit

Permalink
Fix cryptic log warnings on launch/reload
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltmilk committed May 13, 2024
1 parent 5883bc1 commit 62a2411
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,6 @@
"gtceu:long_distance_item_pipeline",
"gtceu:long_distance_fluid_pipeline",
"gtceu:filter_casing",
"gtceu:sterilizing_filter_casing",
"gtceu:red_granite_cobblestone",
"gtceu:mossy_red_granite_cobblestone",
"gtceu:smooth_red_granite",
"gtceu:red_granite_bricks",
"gtceu:cracked_red_granite_bricks",
"gtceu:chiseled_red_granite_bricks",
"gtceu:black_granite_cobblestone",
"gtceu:mossy_black_granite_cobblestone",
"gtceu:smooth_black_granite",
"gtceu:black_granite_bricks",
"gtceu:cracked_black_granite_bricks",
"gtceu:mossy_black_granite_bricks",
"gtceu:chiseled_black_granite_bricks",
"gtceu:basalt_cobblestone",
"gtceu:mossy_basalt_cobblestone",
"gtceu:smooth_basalt",
"gtceu:basalt_bricks",
"gtceu:cracked_basalt_bricks",
"gtceu:chiseled_basalt_bricks",
"gtceu:marble_cobblestone",
"gtceu:mossy_marble_cobblestone",
"gtceu:mossy_marble_bricks",
"gtceu:smooth_marble",
"gtceu:marble_bricks",
"gtceu:cracked_marble_bricks",
"gtceu:chiseled_marble_bricks",
"gtceu:dark_concrete_cobblestone",
"gtceu:mossy_dark_concrete_cobblestone",
"gtceu:mossy_dark_concrete_bricks",
"gtceu:smooth_dark_concrete",
"gtceu:dark_concrete_bricks",
"gtceu:cracked_dark_concrete_bricks",
"gtceu:chiseled_dark_concrete_bricks",
"gtceu:light_concrete_cobblestone",
"gtceu:mossy_light_concrete_cobblestone",
"gtceu:mossy_light_concrete_bricks",
"gtceu:smooth_light_concrete",
"gtceu:light_concrete_bricks",
"gtceu:cracked_light_concrete_bricks",
"gtceu:chiseled_light_concrete_bricks"
"gtceu:sterilizing_filter_casing"
]
}
12 changes: 8 additions & 4 deletions src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -698,12 +698,12 @@ public static BlockEntry<Block> createCasingBlock(String name, ResourceLocation

private static BlockEntry<Block> createSidedCasingBlock(String name, String texture) {
return createCasingBlock(
name, (properties, iRenderer) -> new RendererBlock(properties,
name, properties -> new RendererBlock(properties,
Platform.isClient() ? new TextureOverrideRenderer(new ResourceLocation("block/cube_bottom_top"),
Map.of("bottom", GTCEu.id(texture + "/bottom"),
"top", GTCEu.id(texture + "/top"),
"side", GTCEu.id(texture + "/side"))) : null),
GTCEu.id(texture), () -> Blocks.IRON_BLOCK, () -> RenderType::cutoutMipped
() -> Blocks.IRON_BLOCK, () -> RenderType::cutoutMipped
);
}

Expand All @@ -712,9 +712,13 @@ private static BlockEntry<Block> createGlassCasingBlock(String name, ResourceLoc
}

public static BlockEntry<Block> createCasingBlock(String name, BiFunction<BlockBehaviour.Properties, IRenderer, ? extends RendererBlock> blockSupplier, ResourceLocation texture, NonNullSupplier<? extends Block> properties, Supplier<Supplier<RenderType>> type) {
return REGISTRATE.block(name, p -> (Block) blockSupplier.apply(p,
return createCasingBlock(name, p -> blockSupplier.apply(p,
Platform.isClient() ? new TextureOverrideRenderer(new ResourceLocation("block/cube_all"),
Map.of("all", texture)) : null))
Map.of("all", texture)) : null), properties, type);
}

public static BlockEntry<Block> createCasingBlock(String name, NonNullFunction<BlockBehaviour.Properties, Block> blockSupplier, NonNullSupplier<? extends Block> properties, Supplier<Supplier<RenderType>> type) {
return REGISTRATE.block(name, blockSupplier)
.initialProperties(properties)
.properties(p -> p.isValidSpawn((state, level, pos, ent) -> false))
.addLayer(type)
Expand Down

This file was deleted.

0 comments on commit 62a2411

Please sign in to comment.