|
33 | 33 | import reliquary.util.WorldHelper; |
34 | 34 |
|
35 | 35 | import javax.annotation.Nullable; |
| 36 | + |
36 | 37 | import java.util.function.Consumer; |
37 | 38 | import java.util.stream.Stream; |
38 | 39 |
|
39 | 40 | public class ApothecaryCauldronBlock extends Block implements EntityBlock, ICreativeTabItemGenerator { |
40 | 41 |
|
41 | 42 | public static final IntegerProperty LEVEL = IntegerProperty.create("level", 0, 3); |
42 | 43 | private static final VoxelShape INSIDE = box(2.0D, 4.0D, 2.0D, 14.0D, 16.0D, 14.0D); |
43 | | - private static final VoxelShape SHAPE = Stream.of( |
44 | | - Block.box(1, 1, 1, 15, 2, 15), |
45 | | - Block.box(2, 0, 2, 4, 1, 4), |
46 | | - Block.box(12, 0, 2, 14, 1, 4), |
47 | | - Block.box(12, 0, 12, 14, 1, 14), |
48 | | - Block.box(2, 0, 12, 4, 1, 14), |
49 | | - Block.box(0, 2, 0, 16, 13, 2), |
50 | | - Block.box(0, 2, 14, 16, 13, 16), |
51 | | - Block.box(14, 2, 2, 16, 13, 14), |
52 | | - Block.box(0, 2, 2, 2, 13, 14), |
53 | | - Block.box(1, 13, 2, 2, 14, 14), |
54 | | - Block.box(1, 13, 1, 15, 14, 2), |
55 | | - Block.box(1, 13, 14, 15, 14, 15), |
56 | | - Block.box(14, 13, 2, 15, 14, 14), |
57 | | - Block.box(0, 14, 2, 2, 16, 14), |
58 | | - Block.box(0, 14, 0, 16, 16, 2), |
59 | | - Block.box(14, 14, 2, 16, 16, 14), |
60 | | - Block.box(0, 14, 14, 16, 16, 16) |
61 | | - ).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); |
| 44 | + private static final VoxelShape SHAPE = Stream.of(Block.box(1, 1, 1, 15, 2, 15), Block.box(2, 0, 2, 4, 1, 4), Block.box(12, 0, 2, 14, 1, 4), |
| 45 | + Block.box(12, 0, 12, 14, 1, 14), Block.box(2, 0, 12, 4, 1, 14), Block.box(0, 2, 0, 16, 13, 2), Block.box(0, 2, 14, 16, 13, 16), |
| 46 | + Block.box(14, 2, 2, 16, 13, 14), Block.box(0, 2, 2, 2, 13, 14), Block.box(1, 13, 2, 2, 14, 14), Block.box(1, 13, 1, 15, 14, 2), |
| 47 | + Block.box(1, 13, 14, 15, 14, 15), Block.box(14, 13, 2, 15, 14, 14), Block.box(0, 14, 2, 2, 16, 14), Block.box(0, 14, 0, 16, 16, 2), |
| 48 | + Block.box(14, 14, 2, 16, 16, 14), Block.box(0, 14, 14, 16, 16, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); |
62 | 49 |
|
63 | 50 | public ApothecaryCauldronBlock(Properties properties) { |
64 | 51 | super(properties.mapColor(MapColor.METAL).strength(1.5F, 5.0F).noOcclusion()); |
@@ -99,7 +86,8 @@ protected void entityInside(BlockState state, Level level, BlockPos pos, Entity |
99 | 86 | } |
100 | 87 |
|
101 | 88 | @Override |
102 | | - protected InteractionResult useItemOn(ItemStack heldItem, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { |
| 89 | + protected InteractionResult useItemOn(ItemStack heldItem, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, |
| 90 | + BlockHitResult hitResult) { |
103 | 91 | if (level.isClientSide()) { |
104 | 92 | return !heldItem.isEmpty() ? InteractionResult.SUCCESS : InteractionResult.CONSUME; |
105 | 93 | } else { |
|
0 commit comments