mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-29 00:32:18 +00:00
Fix turtle digging.
This commit is contained in:
parent
d28afcc6a9
commit
cc72e1c2bd
@ -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");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user