Revert "Fix cancelling PlayerInteractEvent at (0, 0, 0) (#12215)"

This reverts commit a2b0ff0644.
This commit is contained in:
Bjarne Koll
2025-03-09 18:38:42 +01:00
parent 7afae7f465
commit e5d988df85
3 changed files with 13 additions and 22 deletions

View File

@@ -167,15 +167,6 @@
if (!blockState.isAir() && f >= 1.0F) {
this.destroyAndAck(pos, sequence, "insta mine");
} else {
@@ -188,7 +_,7 @@
this.lastSentState = i;
}
} else if (action == ServerboundPlayerActionPacket.Action.STOP_DESTROY_BLOCK) {
- if (pos.equals(this.destroyPos)) {
+ if (this.isDestroyingBlock && pos.equals(this.destroyPos)) { // Paper - require isDestroyingBlock to be true (special condition for when destroy pos is 0,0,0 and the event is cancelled)
int i1 = this.gameTicks - this.destroyProgressStart;
BlockState blockStatex = this.level.getBlockState(pos);
if (!blockStatex.isAir()) {
@@ -212,14 +_,22 @@
this.debugLogging(pos, true, sequence, "stopped destroying");
} else if (action == ServerboundPlayerActionPacket.Action.ABORT_DESTROY_BLOCK) {