Paper/Spigot-Server-Patches/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch

19 Zeilen
1.0 KiB
Diff

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/World.java b/src/main/java/net/minecraft/world/level/World.java
index 70db5312ac556ea53247efdbc7759910ba0c9a95..7611481db980a230d42b3cec1d81fae2622ca634 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -518,6 +518,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
2019-07-20 06:01:24 +02:00
public void b(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {}
public void applyPhysics(BlockPosition blockposition, Block block) {
+ if (captureBlockStates) { return; } // Paper - Cancel all physics during placement
this.a(blockposition.west(), block, blockposition);
this.a(blockposition.east(), block, blockposition);
this.a(blockposition.down(), block, blockposition);