diff --git a/src/main/java/com/kikis/ptdyeplus/block/Barrel.java b/src/main/java/com/kikis/ptdyeplus/block/Barrel.java index b48d98c..29a67cd 100644 --- a/src/main/java/com/kikis/ptdyeplus/block/Barrel.java +++ b/src/main/java/com/kikis/ptdyeplus/block/Barrel.java @@ -66,16 +66,17 @@ public InteractionResult use(BlockState blockState, Level level, BlockPos blockP } @Override - public void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean p_60519_) { - if (!blockState.is(blockState2.getBlock())) { + public void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState newBlockState, boolean p_60519_) { + if (!blockState.is(newBlockState.getBlock())) { BlockEntity entity = level.getBlockEntity(blockPos); if (entity instanceof Container container) { Containers.dropContents(level, blockPos, container); level.updateNeighbourForOutputSignal(blockPos, this); } - super.onRemove(blockState, level, blockPos, blockState, p_60519_); + super.onRemove(blockState, level, blockPos, newBlockState, p_60519_); } + } @Nullable diff --git a/src/main/java/com/kikis/ptdyeplus/block/Crate.java b/src/main/java/com/kikis/ptdyeplus/block/Crate.java index 2dff73a..462ff22 100644 --- a/src/main/java/com/kikis/ptdyeplus/block/Crate.java +++ b/src/main/java/com/kikis/ptdyeplus/block/Crate.java @@ -67,15 +67,15 @@ public InteractionResult use(BlockState blockState, Level level, BlockPos blockP } @Override - public void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean p_60519_) { - if (!blockState.is(blockState2.getBlock())) { + public void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState newBlockState, boolean p_60519_) { + if (!blockState.is(newBlockState.getBlock())) { BlockEntity entity = level.getBlockEntity(blockPos); if (entity instanceof Container container) { Containers.dropContents(level, blockPos, container); level.updateNeighbourForOutputSignal(blockPos, this); } - super.onRemove(blockState, level, blockPos, blockState, p_60519_); + super.onRemove(blockState, level, blockPos, newBlockState, p_60519_); } }