Paper/Spigot-Server-Patches/0441-fix-blockstate-capture-undoing.patch
Shane Freeder b16fd5c3a3
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
6148fca7 SPIGOT-5484: Add more spawn tick settings

CraftBukkit Changes:
fc249340 SPIGOT-5484: Add more spawn tick settings

Spigot Changes:
6de3d4be Rebuild patches
2020-03-10 11:01:21 +00:00

33 lines
1.7 KiB
Diff

From a9fe517d8e5a270edcdcde47831bd6afac35b995 Mon Sep 17 00:00:00 2001
From: Trigary <trigary0@gmail.com>
Date: Mon, 17 Feb 2020 22:53:33 +0100
Subject: [PATCH] fix blockstate capture undoing
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index bb34486a3..5117dafbc 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -353,7 +353,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
Block block = iblockdata.getBlock();
// CraftBukkit start - capture blockstates
+ boolean capturedBlockState = false; //Paper - fix blockstate capture undoing
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(blockposition)) {
+ capturedBlockState = true; //Paper - fix blockstate capture undoing
CraftBlockState blockstate = (CraftBlockState) world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()).getState(); // Paper - use CB getState to get a suitable snapshot
this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate);
}
@@ -364,7 +366,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
if (iblockdata1 == null) {
// CraftBukkit start - remove blockstate if failed
- if (this.captureBlockStates) {
+ if (/*this.captureBlockStates*/ capturedBlockState) { //Paper - fix blockstate capture undoing
this.capturedBlockStates.remove(blockposition);
}
// CraftBukkit end
--
2.25.0