3232import reliquary .util .WorldHelper ;
3333
3434import javax .annotation .Nullable ;
35+
3536import java .util .function .Consumer ;
3637import java .util .stream .Stream ;
3738
3839public class ApothecaryCauldronBlock extends Block implements EntityBlock , ICreativeTabItemGenerator {
3940
4041 public static final IntegerProperty LEVEL = IntegerProperty .create ("level" , 0 , 3 );
4142 private static final VoxelShape INSIDE = box (2.0D , 4.0D , 2.0D , 14.0D , 16.0D , 14.0D );
42- private static final VoxelShape SHAPE = Stream .of (
43- Block .box (1 , 1 , 1 , 15 , 2 , 15 ),
44- Block .box (2 , 0 , 2 , 4 , 1 , 4 ),
45- Block .box (12 , 0 , 2 , 14 , 1 , 4 ),
46- Block .box (12 , 0 , 12 , 14 , 1 , 14 ),
47- Block .box (2 , 0 , 12 , 4 , 1 , 14 ),
48- Block .box (0 , 2 , 0 , 16 , 13 , 2 ),
49- Block .box (0 , 2 , 14 , 16 , 13 , 16 ),
50- Block .box (14 , 2 , 2 , 16 , 13 , 14 ),
51- Block .box (0 , 2 , 2 , 2 , 13 , 14 ),
52- Block .box (1 , 13 , 2 , 2 , 14 , 14 ),
53- Block .box (1 , 13 , 1 , 15 , 14 , 2 ),
54- Block .box (1 , 13 , 14 , 15 , 14 , 15 ),
55- Block .box (14 , 13 , 2 , 15 , 14 , 14 ),
56- Block .box (0 , 14 , 2 , 2 , 16 , 14 ),
57- Block .box (0 , 14 , 0 , 16 , 16 , 2 ),
58- Block .box (14 , 14 , 2 , 16 , 16 , 14 ),
59- Block .box (0 , 14 , 14 , 16 , 16 , 16 )
60- ).reduce ((v1 , v2 ) -> Shapes .join (v1 , v2 , BooleanOp .OR )).get ();
43+ private static final VoxelShape SHAPE = Stream .of (box (1 , 1 , 1 , 15 , 2 , 15 ), box (2 , 0 , 2 , 4 , 1 , 4 ), box (12 , 0 , 2 , 14 , 1 , 4 ), box (12 , 0 , 12 , 14 , 1 , 14 ),
44+ box (2 , 0 , 12 , 4 , 1 , 14 ), box (0 , 2 , 0 , 16 , 13 , 2 ), box (0 , 2 , 14 , 16 , 13 , 16 ), box (14 , 2 , 2 , 16 , 13 , 14 ), box (0 , 2 , 2 , 2 , 13 , 14 ),
45+ box (1 , 13 , 2 , 2 , 14 , 14 ), box (1 , 13 , 1 , 15 , 14 , 2 ), box (1 , 13 , 14 , 15 , 14 , 15 ), box (14 , 13 , 2 , 15 , 14 , 14 ), box (0 , 14 , 2 , 2 , 16 , 14 ),
46+ box (0 , 14 , 0 , 16 , 16 , 2 ), box (14 , 14 , 2 , 16 , 16 , 14 ), box (0 , 14 , 14 , 16 , 16 , 16 )).reduce ((v1 , v2 ) -> Shapes .join (v1 , v2 , BooleanOp .OR )).get ();
6147
6248 public ApothecaryCauldronBlock (Properties properties ) {
6349 super (properties .mapColor (MapColor .METAL ).strength (1.5F , 5.0F ).noOcclusion ());
@@ -98,7 +84,8 @@ protected void entityInside(BlockState state, Level level, BlockPos pos, Entity
9884 }
9985
10086 @ Override
101- protected InteractionResult useItemOn (ItemStack heldItem , BlockState state , Level level , BlockPos pos , Player player , InteractionHand hand , BlockHitResult hitResult ) {
87+ protected InteractionResult useItemOn (ItemStack heldItem , BlockState state , Level level , BlockPos pos , Player player , InteractionHand hand ,
88+ BlockHitResult hitResult ) {
10289 if (level .isClientSide ) {
10390 return !heldItem .isEmpty () ? InteractionResult .SUCCESS : InteractionResult .CONSUME ;
10491 } else {
@@ -123,18 +110,16 @@ public void handlePrecipitation(BlockState state, Level level, BlockPos pos, Bio
123110 }
124111
125112 /**
126- * If this returns true, then comparators facing away from this block will
127- * use the value from getComparatorInputOverride instead of the actual
128- * redstone signal strength.
113+ * If this returns true, then comparators facing away from this block will use the value from getComparatorInputOverride instead of the actual redstone
114+ * signal strength.
129115 */
130116 @ Override
131117 public boolean hasAnalogOutputSignal (BlockState state ) {
132118 return true ;
133119 }
134120
135121 /**
136- * If hasComparatorInputOverride returns true, the return value from this is
137- * used instead of the redstone signal strength when this block inputs to a
122+ * If hasComparatorInputOverride returns true, the return value from this is used instead of the redstone signal strength when this block inputs to a
138123 * comparator.
139124 */
140125 @ Override
0 commit comments