Skip to content

Commit

Permalink
Added logging for dispensers removing blocks from the world
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelli committed Jun 17, 2024
1 parent aa2ee72 commit 057a635
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ else if (type != Material.FIRE && (!Config.getConfig(world).BUCKETS || (!Config.
return;
}

if (!type.equals(Material.AIR)) {
if (!type.equals(Material.AIR) || !newBlock.getType().equals(Material.AIR)) {
if (type == Material.FIRE) { // lit a lightable block
type = newBlock.getType();
if (BlockGroup.LIGHTABLES.contains(type)) {
Expand All @@ -111,7 +111,12 @@ else if (dispenseRelative) {
}
}

queueBlockPlace(user, newBlock.getState(), newBlock.getType(), blockState, type, 1, 1, null);
if (!type.equals(Material.AIR)) {
queueBlockPlace(user, newBlock.getState(), newBlock.getType(), blockState, type, 1, 1, null);
}
else {
Queue.queueBlockBreak(user, newBlock.getState(), newBlock.getType(), newBlock.getBlockData().getAsString(), 0);
}
}
}
}
Expand Down

0 comments on commit 057a635

Please sign in to comment.