13
0
geforkt von Mirrors/Paper
Paper/patches/server/0079-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch

19 Zeilen
1.0 KiB
Diff

2021-06-11 14:02:28 +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/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
2021-06-12 05:07:57 +02:00
index 81a8e314b5073a5888a3c04d53ff279c8142a7d4..fa567322ca3f09d81479826b0119ddc922c41d11 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
2021-06-12 05:07:57 +02:00
@@ -538,6 +538,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
2021-06-11 14:02:28 +02: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);