Additional Enchanted Miner

Additional Enchanted Miner

22M Downloads

[1.17.1-forge] Support of removing waterlogged blocks without Pump Module

Kotori316 opened this issue ยท 0 comments

commented

Related to #150 , but this issue is for 1.17.1 version.

The code to be fixed:

} else if (!targetWorld.getFluidState(targetPos).isEmpty()) {

Check the block is waterlogged or is fluid block such as water and lava. If it is just waterlogged, return true.

targetWorld.setBlock(targetPos, getReplacementState(), Block.UPDATE_ALL);

This code replace the target block to replacement block. If the block is waterlogged, the block should be replaced with Water instead of Air. So the replacement block is Air, I should call vanilla method to remove block, as it replaces to Water if waterlogged.

static void checkEdgeFluid(BlockPos targetPos, ServerLevel targetWorld, TileQuarry quarry) {

Change the method name to "removeEdgeFluid".

private static void removeFluidAtEdge(ServerLevel world, BlockPos pos, TileQuarry quarry) {

Change the method name to "removeFluidAtPos".