Skip to content

Commit

Permalink
Add a fluid check to Block Breakers - resolves #286
Browse files Browse the repository at this point in the history
  • Loading branch information
Direwolf20-MC committed Dec 5, 2024
1 parent 0bfbba2 commit 8e03fb8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.LiquidBlock;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
Expand Down Expand Up @@ -131,6 +132,8 @@ public boolean isBlockValid(FakePlayer fakePlayer, BlockPos blockPos) {
BlockState blockState = level.getBlockState(blockPos);
if (blockState.isAir())
return false;
if ((blockState.getBlock() instanceof LiquidBlock)) //No Liquids
return false;
if (blockPos.equals(getBlockPos()))
return false;
if (blockBreakingTracker.containsKey(blockPos))
Expand Down

0 comments on commit 8e03fb8

Please sign in to comment.