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

19 lines
1 KiB
Diff
Raw Normal View History

2021-06-11 12:02:28 +00: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/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
2021-07-07 06:52:40 +00:00
index 5c395ffa57372dee3fc29e9bd4b5545211aec29c..22c4c94a4b81c8ca53d717005b6260f0bafbbea4 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
2021-07-07 06:52:40 +00:00
@@ -542,6 +542,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
2021-06-11 12:02:28 +00:00
public void setBlocksDirty(BlockPos pos, BlockState old, BlockState updated) {}
public void updateNeighborsAt(BlockPos pos, Block block) {
+ if (captureBlockStates) { return; } // Paper - Cancel all physics during placement
this.neighborChanged(pos.west(), block, pos);
this.neighborChanged(pos.east(), block, pos);
this.neighborChanged(pos.below(), block, pos);