From 6686f1f4179e2d85317d5cacf8a9f6085260bfec Mon Sep 17 00:00:00 2001 From: Flanks255 <32142731+Flanks255@users.noreply.github.com> Date: Tue, 4 Jun 2024 22:25:30 -0500 Subject: [PATCH] Simplifying alot of block voxelshapes. --- .../mod/blocks/BlockAtomicReconstructor.java | 4 ++-- .../mod/blocks/BlockBioReactor.java | 4 ++-- .../actuallyadditions/mod/blocks/BlockBreaker.java | 4 ++-- .../mod/blocks/BlockCoalGenerator.java | 7 ++++++- .../actuallyadditions/mod/blocks/BlockCrusher.java | 4 ++-- .../actuallyadditions/mod/blocks/BlockDropper.java | 4 ++-- .../mod/blocks/BlockEnergizer.java | 4 ++-- .../actuallyadditions/mod/blocks/BlockFarmer.java | 4 ++-- .../actuallyadditions/mod/blocks/BlockFeeder.java | 4 ++-- .../mod/blocks/BlockFluidCollector.java | 4 ++-- .../mod/blocks/BlockItemInterface.java | 4 ++-- .../mod/blocks/BlockLampController.java | 4 ++-- .../mod/blocks/BlockLavaFactoryController.java | 4 ++-- .../mod/blocks/BlockLeafGenerator.java | 4 ++-- .../mod/blocks/BlockLongRangeBreaker.java | 4 ++-- .../mod/blocks/BlockOilGenerator.java | 7 ++++++- .../mod/blocks/BlockPlayerInterface.java | 4 ++-- .../mod/blocks/BlockPoweredFurnace.java | 4 ++-- .../mod/blocks/BlockRangedCollector.java | 4 ++-- .../mod/blocks/BlockVerticalDigger.java | 4 ++-- .../mod/blocks/BlockXPSolidifier.java | 4 ++-- .../actuallyadditions/mod/blocks/VoxelShapes.java | 13 +++++++++++-- .../actuallyadditions/mod/items/AllInOneTool.java | 2 +- 23 files changed, 62 insertions(+), 43 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 5a03327fe..cd142e3c6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -94,7 +94,7 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im return InteractionResult.CONSUME; } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case UP: @@ -110,7 +110,7 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im default: return VoxelShapes.AtomicReconstructorShapes.SHAPE_N; } - } + }*/ @Nullable @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBioReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBioReactor.java index 6ba36d5c8..8d838ea25 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBioReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBioReactor.java @@ -53,7 +53,7 @@ public class BlockBioReactor extends DirectionalBlock.Container { return this.openGui(world, player, pos, TileEntityBioReactor.class); } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(HORIZONTAL_FACING)) { case EAST: @@ -65,5 +65,5 @@ public class BlockBioReactor extends DirectionalBlock.Container { default: return VoxelShapes.BioReactorShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java index 787ffc443..c6bfc88de 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java @@ -63,7 +63,7 @@ public class BlockBreaker extends FullyDirectionalBlock.Container { return this.openGui(world, player, pos, TileEntityBreaker.class); } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case UP: @@ -79,5 +79,5 @@ public class BlockBreaker extends FullyDirectionalBlock.Container { default: return VoxelShapes.BlockBreakerShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java index 512115fd0..871c5cce7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java @@ -65,7 +65,7 @@ public class BlockCoalGenerator extends DirectionalBlock.Container { return this.openGui(world, player, pos, TileEntityCoalGenerator.class); } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: @@ -77,5 +77,10 @@ public class BlockCoalGenerator extends DirectionalBlock.Container { default: return VoxelShapes.CoalGeneratorShapes.NORTH; } + }*/ + + @Override + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.SIMPLE_GENERATOR_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java index 77ac44258..7dfe044b1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java @@ -103,7 +103,7 @@ public class BlockCrusher extends BlockContainerBase { : 0; } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(HORIZONTAL_FACING)) { case EAST: @@ -115,5 +115,5 @@ public class BlockCrusher extends BlockContainerBase { default: return VoxelShapes.GrinderShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java index c17afd3d2..e322de6e9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java @@ -55,7 +55,7 @@ public class BlockDropper extends FullyDirectionalBlock.Container { return this.openGui(world, player, pos, TileEntityDropper.class); } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case UP: @@ -71,5 +71,5 @@ public class BlockDropper extends FullyDirectionalBlock.Container { default: return VoxelShapes.BlockBreakerShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java index 58cabdc0d..9451e0e31 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java @@ -62,11 +62,11 @@ public class BlockEnergizer extends BlockContainerBase { } } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { if (this.isEnergizer) { return VoxelShapes.ENERGIZER_SHAPE; } return VoxelShapes.ENERVATOR_SHAPE; - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java index c7ea799a5..530fe67ce 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java @@ -51,7 +51,7 @@ public class BlockFarmer extends DirectionalBlock.Container { return this.openGui(worldIn, player, pos, TileEntityFarmer.class); } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: @@ -63,5 +63,5 @@ public class BlockFarmer extends DirectionalBlock.Container { default: return VoxelShapes.FarmerShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java index 9d98e8e4f..a531ece53 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java @@ -51,8 +51,8 @@ public class BlockFeeder extends BlockContainerBase { return this.openGui(worldIn, player, pos, TileEntityFeeder.class); } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { return VoxelShapes.FEEDER_SHAPE; - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java index b063bbb2c..bd4472dcf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java @@ -72,7 +72,7 @@ public class BlockFluidCollector extends FullyDirectionalBlock.Container { return this.openGui(world, player, pos, TileEntityFluidCollector.class); } - @Nonnull +/* @Nonnull @Override public VoxelShape getShape(BlockState state, @Nonnull BlockGetter worldIn, @Nonnull BlockPos pos, @Nonnull CollisionContext context) { switch (state.getValue(FACING)) { @@ -89,5 +89,5 @@ public class BlockFluidCollector extends FullyDirectionalBlock.Container { default: return VoxelShapes.FluidCollectorShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterface.java index 91a35ae82..94a3f88e8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterface.java @@ -41,8 +41,8 @@ public class BlockItemInterface extends BlockContainerBase { return level.isClientSide? TileEntityItemInterface::clientTick : TileEntityItemInterface::serverTick; } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { return VoxelShapes.ITEM_VIEWER_SHAPE; - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampController.java index dce43a34d..6faf9d53e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampController.java @@ -75,7 +75,7 @@ public class BlockLampController extends FullyDirectionalBlock { } } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: @@ -87,5 +87,5 @@ public class BlockLampController extends FullyDirectionalBlock { default: return VoxelShapes.LampPowererShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java index 1c5b74112..1a63f0bf3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java @@ -72,7 +72,7 @@ public class BlockLavaFactoryController extends DirectionalBlock.Container imple } } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: @@ -84,5 +84,5 @@ public class BlockLavaFactoryController extends DirectionalBlock.Container imple default: return VoxelShapes.LavaFactoryShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java index ca125f76f..90a3ed1e4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java @@ -44,7 +44,7 @@ public class BlockLeafGenerator extends DirectionalBlock.Container { return level.isClientSide? TileEntityLeafGenerator::clientTick : TileEntityLeafGenerator::serverTick; } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: @@ -56,5 +56,5 @@ public class BlockLeafGenerator extends DirectionalBlock.Container { default: return VoxelShapes.LeafGeneratorShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLongRangeBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLongRangeBreaker.java index 479b9a620..be24526b2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLongRangeBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLongRangeBreaker.java @@ -55,7 +55,7 @@ public class BlockLongRangeBreaker extends FullyDirectionalBlock.Container { return this.openGui(world, player, pos, TileEntityLongRangeBreaker.class); } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case UP: @@ -71,5 +71,5 @@ public class BlockLongRangeBreaker extends FullyDirectionalBlock.Container { default: return VoxelShapes.BlockBreakerShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java index 045f8a150..0ea174702 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java @@ -76,7 +76,7 @@ public class BlockOilGenerator extends DirectionalBlock.Container { return InteractionResult.SUCCESS; } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: @@ -88,5 +88,10 @@ public class BlockOilGenerator extends DirectionalBlock.Container { default: return VoxelShapes.OilGeneratorShapes.SHAPE_N; } + }*/ + + @Override + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.SIMPLE_GENERATOR_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java index 872487dca..94e2bd063 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java @@ -87,8 +87,8 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp } } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { return VoxelShapes.PLAYER_INTERFACE_SHAPE; - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java index fdd355eef..a3c7f34a7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java @@ -96,7 +96,7 @@ public class BlockPoweredFurnace extends DirectionalBlock.Container { tooltip.add(Component.translatable("tooltip.actuallyadditions.previouslyDoubleFurnace").withStyle(ChatFormatting.ITALIC)); } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(HORIZONTAL_FACING)) { case EAST: @@ -108,5 +108,5 @@ public class BlockPoweredFurnace extends DirectionalBlock.Container { default: return VoxelShapes.FurnaceDoubleShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java index 1838106f8..2db1ef2ce 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java @@ -55,8 +55,8 @@ public class BlockRangedCollector extends BlockContainerBase { return this.openGui(world, player, pos, TileEntityRangedCollector.class); } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { return VoxelShapes.COLLECTOR_SHAPE; - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java index 5ecaa42de..7f01130bc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java @@ -76,7 +76,7 @@ public class BlockVerticalDigger extends DirectionalBlock.Container implements I } } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case NORTH: @@ -90,5 +90,5 @@ public class BlockVerticalDigger extends DirectionalBlock.Container implements I default: return VoxelShapes.MinerShapes.SHAPE_N; } - } + }*/ } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java index 1083434c8..f908413e4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java @@ -50,8 +50,8 @@ public class BlockXPSolidifier extends DirectionalBlock.Container { return this.openGui(worldIn, player, pos, TileEntityXPSolidifier.class); } - @Override +/* @Override public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { return VoxelShapes.SOLIDIFIER_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 07e53bd01..2c9ec91d4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/VoxelShapes.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/VoxelShapes.java @@ -257,11 +257,12 @@ public class VoxelShapes { ).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); static final VoxelShape ITEM_VIEWER_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); static final VoxelShape HOPPING_ITEM_VIEWER_SHAPE = Stream.of(Block.box(0, 10, 0, 16, 11, 16), Block.box(1, 11, 1, 2, 15, 15), Block.box(14, 11, 1, 15, 15, 15), Block.box(2, 11, 1, 14, 15, 2), Block.box(2, 11, 14, 14, 15, 15), Block.box(4, 4, 4, 12, 10, 12), Block.box(6, 0, 6, 10, 4, 10), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 11, 0, 1, 15, 1), Block.box(0, 11, 15, 1, 15, 16), Block.box(15, 11, 15, 16, 15, 16), Block.box(15, 11, 0, 16, 15, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); - static final VoxelShape BOOSTER_SHAPE = Stream.of( +/* static final VoxelShape BOOSTER_SHAPE = Stream.of( Block.box(6, 3, 6, 10, 16, 10), Block.box(5, 14, 5, 11, 15, 11), Block.box(5, 0, 5, 11, 3, 11) - ).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + ).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get();*/ + static final VoxelShape BOOSTER_SHAPE = Block.box(5, 0 , 5, 11, 16, 11); //Simplified static final VoxelShape PLAYER_INTERFACE_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); static final VoxelShape COLLECTOR_SHAPE = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), 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(1, 1, 4, 2, 4, 12), Block.box(14, 1, 4, 15, 4, 12), Block.box(4, 1, 1, 12, 4, 2), Block.box(4, 1, 14, 12, 4, 15), Block.box(4, 14, 12, 12, 15, 14), Block.box(1, 12, 4, 2, 15, 12), Block.box(14, 12, 4, 15, 15, 12), Block.box(4, 12, 1, 12, 15, 2), Block.box(4, 12, 14, 12, 15, 15), Block.box(4, 14, 2, 12, 15, 4), Block.box(1, 1, 12, 2, 15, 14), Block.box(14, 1, 2, 15, 15, 4), Block.box(1, 1, 1, 4, 15, 2), Block.box(12, 1, 14, 15, 15, 15), Block.box(12, 14, 2, 14, 15, 14), Block.box(1, 1, 2, 2, 15, 4), Block.box(14, 1, 12, 15, 15, 14), Block.box(12, 1, 1, 15, 15, 2), Block.box(1, 1, 14, 4, 15, 15), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 2, 2, 14, 14, 14), Block.box(1, 0, 1, 15, 1, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); static final VoxelShape SUPPRESSOR_SHAPE = Stream.of( @@ -298,6 +299,14 @@ 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( + 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 class CoffeeMachineShapes { static final VoxelShape NORTH = Stream.of( Block.box(13, 2, 4, 14, 3, 5), diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java index 3a71237a4..dfc17b433 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java @@ -61,7 +61,7 @@ public class AllInOneTool extends DiggerItem { return Items.IRON_SHOVEL.useOn(context); } InteractionResult tmp = Items.IRON_AXE.useOn(context); - if (tmp != InteractionResult.SUCCESS) + if (tmp == InteractionResult.SUCCESS) return tmp; return Items.IRON_HOE.useOn(context); }