3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/patches/server/0092-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch

19 Zeilen
938 B
Diff

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 ede5afa51818f3c36d40787ff3e6d0d45108cdf8..0d0a20d5ca09404d8be4d67fc4221c1fb0d24c1c 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
2024-04-24 03:25:14 +02:00
@@ -1391,6 +1391,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);
}