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