From 2bea730276c55d1e3e425bd672db2e2d4a4b61f3 Mon Sep 17 00:00:00 2001 From: Flanks255 <32142731+Flanks255@users.noreply.github.com> Date: Wed, 5 Jun 2024 08:51:46 -0500 Subject: [PATCH] More Voxel simplifications. Version Bump. --- gradle.properties | 2 +- .../mod/blocks/BlockDisplayStand.java | 6 +++++- .../actuallyadditions/mod/blocks/VoxelShapes.java | 15 ++++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 68047df79..f787f2534 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false # Actually Additions -mod_version=1.2.12 +mod_version=1.2.13 # Forge game_version=1.20.4 diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java index c5377e7ce..4b0e3ed22 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java @@ -104,11 +104,15 @@ public class BlockDisplayStand extends BlockContainerBase { return InteractionResult.CONSUME; } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { if (this.isEmpowerer) { return VoxelShapes.EMPOWERER_SHAPE; } return VoxelShapes.DISPLAY_STAND_SHAPE; + }*/ + @Override + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.SIMPLE_STAND_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/VoxelShapes.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/VoxelShapes.java index 2c9ec91d4..8949ba023 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/VoxelShapes.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/VoxelShapes.java @@ -140,6 +140,10 @@ public class VoxelShapes { Block.box(11, 7, 3, 12, 9, 4), Block.box(4, 7, 3, 5, 9, 4) ).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SIMPLE_STAND_SHAPE = Stream.of( + Block.box(0, 0, 0, 16, 8, 16), + Block.box(5, 8, 5, 11, 9, 11) + ).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); static final VoxelShape ENERGIZER_SHAPE = Stream.of( Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 15, 0, 1, 16, 16), @@ -299,12 +303,21 @@ public class VoxelShapes { static final VoxelShape WEST = Stream.of(Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(2, 0, 2, 14, 1, 14), Block.box(6, 14, 5, 7, 15, 11), Block.box(8, 14, 5, 9, 15, 11), Block.box(10, 14, 5, 14, 15, 11), Block.box(2, 14, 5, 5, 15, 11), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(14, 0, 1, 15, 15, 15), Block.box(0, 11, 3, 1, 12, 13), Block.box(1, 3, 10, 2, 8, 11), Block.box(1, 3, 5, 2, 8, 6), Block.box(1, 8, 3, 2, 15, 13), Block.box(1, 0, 3, 2, 3, 13), Block.box(1, 0, 13, 2, 15, 15), Block.box(1, 0, 1, 2, 15, 3), Block.box(5, 13, 5, 10, 14, 11), Block.box(2, 3, 2, 3, 8, 14), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } - static final VoxelShape SIMPLE_GENERATOR_SHAPE = Stream.of( +/* static final VoxelShape SIMPLE_GENERATOR_SHAPE = Stream.of( Block.box(0, 1, 0, 16, 16, 16), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(15, 0, 15, 16, 1, 16) + ).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get();*/ + + static final VoxelShape SIMPLE_GENERATOR_SHAPE = Stream.of( + Block.box(1, 0, 1, 15, 15, 15), // Inner Cube + Block.box(0, 15, 0, 16, 16, 16), // Top Plate + Block.box(0, 0, 0, 1, 15, 1), + Block.box(0, 0, 15, 1, 15, 16), + Block.box(15, 0, 0, 16, 15, 1), + Block.box(15, 0, 15, 16, 15, 16) ).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); static class CoffeeMachineShapes {