mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
parent
d8cd7800f5
commit
5746b05df4
1 changed files with 30 additions and 0 deletions
30
Spigot-Server-Patches/fix-blockstate-capture-undoing.patch
Normal file
30
Spigot-Server-Patches/fix-blockstate-capture-undoing.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
From 0000000000000000000000000000000000000000 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 3c966b4ab..baad98517 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ 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);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
--
|
Loading…
Reference in a new issue