Paper/patches/server/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch

19 lines
938 B
Diff
Raw Normal View History

2022-06-07 21:55:39 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Apr 2016 17:48:50 -0400
Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index f7270a563835cf43239cdb43bb20cda23053de67..47511f73b9924e48b4427ba9a245fb62d824626d 100644
2022-06-07 21:55:39 +02:00
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1364,6 +1364,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
2022-06-07 21:55:39 +02:00
@Override
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
+ if (captureBlockStates) { return; } // Paper - Cancel all physics during placement
this.neighborUpdater.updateNeighborsAtExceptFromFacing(pos, sourceBlock, (Direction) null);
}