mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-29 16:47:56 +00:00
Fix turtle digging.
This commit is contained in:
@@ -181,12 +181,6 @@ public class TurtleTool extends AbstractTurtleUpgrade {
|
|||||||
turtlePlayer.loadInventory(this.item.copy());
|
turtlePlayer.loadInventory(this.item.copy());
|
||||||
|
|
||||||
if (ComputerCraft.turtlesObeyBlockProtection) {
|
if (ComputerCraft.turtlesObeyBlockProtection) {
|
||||||
// Check spawn protection
|
|
||||||
if (PlayerBlockBreakEvents.BEFORE.invoker()
|
|
||||||
.beforeBlockBreak(world, turtlePlayer, blockPosition, state, null)) {
|
|
||||||
return TurtleCommandResult.failure("Cannot break protected block");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!TurtlePermissions.isBlockEditable(world, blockPosition, turtlePlayer)) {
|
if (!TurtlePermissions.isBlockEditable(world, blockPosition, turtlePlayer)) {
|
||||||
return TurtleCommandResult.failure("Cannot break protected block");
|
return TurtleCommandResult.failure("Cannot break protected block");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user