geforkt von Mirrors/Paper
595734a57e
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: 01e22e09 Misc maven build updates 746f5324 #556: Allow sending messages from specific UUIDs 92b99cde #501: Add PersistentDataHolder to Chunk CraftBukkit Changes: 4ef13f94 Misc maven build updates 04639f5a #759: Allow sending messages from specific UUIDs 77c894a2 #672: Add PersistentDataHolder to Chunk Spigot Changes: 57bbdd8e Rebuild patches Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
38 Zeilen
1.8 KiB
Diff
38 Zeilen
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Wed, 5 Oct 2016 16:27:36 -0500
|
|
Subject: [PATCH] Option to remove corrupt tile entities
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index ac76bdd7e1d91b0d242539c4495948cdfbb622e0..6cb717a63f52d757b0b323408d2fc0c3d7db77da 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -293,4 +293,9 @@ public class PaperWorldConfig {
|
|
preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false);
|
|
log("Prevent TNT from moving in water: " + preventTntFromMovingInWater);
|
|
}
|
|
+
|
|
+ public boolean removeCorruptTEs = false;
|
|
+ private void removeCorruptTEs() {
|
|
+ removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
|
index f02d4726747a0992e851730c21c9423f706aa27a..45d7a06ea51ccc2264a7c3d1518d0b37d089c531 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -640,6 +640,12 @@ public class Chunk implements IChunkAccess {
|
|
"Chunk coordinates: " + (this.loc.x * 16) + "," + (this.loc.z * 16));
|
|
e.printStackTrace();
|
|
ServerInternalException.reportInternalException(e);
|
|
+
|
|
+ if (this.world.paperConfig.removeCorruptTEs) {
|
|
+ this.removeTileEntity(tileentity.getPosition());
|
|
+ this.markDirty();
|
|
+ org.bukkit.Bukkit.getLogger().info("Removing corrupt tile entity");
|
|
+ }
|
|
// Paper end
|
|
// CraftBukkit end
|
|
}
|