Skip to content

Commit

Permalink
Only print debug message about failing to mine block if mining is act…
Browse files Browse the repository at this point in the history
…ually denied
  • Loading branch information
pupnewfster committed Sep 2, 2024
1 parent acfba9f commit 33b3a1c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ private boolean canMine(BlockState state, BlockPos pos) {
MekFakePlayer dummy = MekFakePlayer.setupFakePlayer((ServerLevel) level, this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ());
dummy.setEmulatingUUID(getOwnerUUID());//pretend to be the owner
boolean canMine = !NeoForge.EVENT_BUS.post(new BlockEvent.BreakEvent(level, pos, state, dummy)).isCanceled();
if (MekanismAPI.debug) {
if (MekanismAPI.debug && !canMine) {
Mekanism.logger.debug("Denied mining block: {} @ {} {}", state, level.dimension().location(), pos);
}
dummy.cleanupFakePlayer((ServerLevel) level);
Expand Down

0 comments on commit 33b3a1c

Please sign in to comment.