minor changes to facing stuff casino and structure placement

This commit is contained in:
2026-03-02 18:10:08 +01:00
parent f1bcd82fb9
commit 0165f5a2ce
7 changed files with 108 additions and 3 deletions

View File

@@ -305,6 +305,38 @@ public class SzarClient implements ClientModInitializer {
Szar.CANNABIS_BLOCK,
RenderLayer.getCutout()
);
BlockRenderLayerMap.INSTANCE.putBlock(
ROULETTE_BLOCK,
RenderLayer.getCutout()
);
BlockRenderLayerMap.INSTANCE.putBlock(
SLOT_MACHINE_BLOCK,
RenderLayer.getCutout()
);
BlockRenderLayerMap.INSTANCE.putBlock(
C_BLOCK,
RenderLayer.getCutout()
);
BlockRenderLayerMap.INSTANCE.putBlock(
A_BLOCK,
RenderLayer.getCutout()
);
BlockRenderLayerMap.INSTANCE.putBlock(
S_BLOCK,
RenderLayer.getCutout()
);
BlockRenderLayerMap.INSTANCE.putBlock(
I_BLOCK,
RenderLayer.getCutout()
);
BlockRenderLayerMap.INSTANCE.putBlock(
N_BLOCK,
RenderLayer.getCutout()
);
BlockRenderLayerMap.INSTANCE.putBlock(
O_BLOCK,
RenderLayer.getCutout()
);
HudRenderCallback.EVENT.register((drawContext, tickDelta) -> {
MinecraftClient client = MinecraftClient.getInstance();

View File

@@ -74,4 +74,20 @@ public class BasicRotatableModelBlock extends Block {
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(FACING);
}
@Override
public BlockState rotate(BlockState state, BlockRotation rotation) {
if (state.contains(FACING)) {
return state.with(FACING, rotation.rotate(state.get(FACING)));
}
return state;
}
@Override
public BlockState mirror(BlockState state, BlockMirror mirror) {
if (state.contains(FACING)) {
return state.rotate(mirror.getRotation(state.get(FACING)));
}
return state;
}
}

View File

@@ -162,4 +162,20 @@ public class SlotMachineBlock extends Block implements BlockEntityProvider {
}
};
}
@Override
public BlockState rotate(BlockState state, BlockRotation rotation) {
if (state.contains(FACING)) {
return state.with(FACING, rotation.rotate(state.get(FACING)));
}
return state;
}
@Override
public BlockState mirror(BlockState state, BlockMirror mirror) {
if (state.contains(FACING)) {
return state.rotate(mirror.getRotation(state.get(FACING)));
}
return state;
}
}

View File

@@ -0,0 +1,41 @@
{
"replace": false,
"values": [
"minecraft:badlands",
"minecraft:bamboo_jungle",
"minecraft:beach",
"minecraft:birch_forest",
"minecraft:dark_forest",
"minecraft:deep_dark",
"minecraft:desert",
"minecraft:eroded_badlands",
"minecraft:flower_forest",
"minecraft:forest",
"minecraft:grove",
"minecraft:ice_spikes",
"minecraft:jagged_peaks",
"minecraft:jungle",
"minecraft:meadow",
"minecraft:mushroom_fields",
"minecraft:old_growth_birch_forest",
"minecraft:old_growth_pine_taiga",
"minecraft:old_growth_spruce_taiga",
"minecraft:plains",
"minecraft:savanna",
"minecraft:savanna_plateau",
"minecraft:snowy_beach",
"minecraft:snowy_plains",
"minecraft:snowy_slopes",
"minecraft:snowy_taiga",
"minecraft:sparse_jungle",
"minecraft:stony_peaks",
"minecraft:stony_shore",
"minecraft:sunflower_plains",
"minecraft:taiga",
"minecraft:windswept_forest",
"minecraft:windswept_gravelly_hills",
"minecraft:windswept_hills",
"minecraft:windswept_savanna",
"minecraft:wooded_badlands"
]
}

View File

@@ -1,6 +1,6 @@
{
"type": "szar:casino",
"biomes": "#minecraft:is_overworld",
"biomes": "#szar:normal_land",
"step": "surface_structures",
"terrain_adaptation": "beard_thin",
"spawn_overrides": {},

View File

@@ -1,6 +1,6 @@
{
"type": "szar:two_towers",
"biomes": "#minecraft:is_overworld",
"biomes": "#szar:normal_land",
"spawn_overrides": {},
"step": "surface_structures",
"terrain_adaptation": "beard_thin"