2020-05-06 07:44:47 +00:00
|
|
|
From cd4ec6fc6a45b34dc15ad63f669bd12e8bc91be5 Mon Sep 17 00:00:00 2001
|
2016-10-05 21:28:17 +00:00
|
|
|
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
|
2020-05-01 22:03:47 +00:00
|
|
|
index 8cf3076f4e..721eceeffc 100644
|
2016-10-05 21:28:17 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2020-01-18 17:28:32 +00:00
|
|
|
@@ -298,4 +298,9 @@ public class PaperWorldConfig {
|
2019-04-27 06:26:04 +00:00
|
|
|
preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false);
|
|
|
|
log("Prevent TNT from moving in water: " + preventTntFromMovingInWater);
|
2016-10-05 21:28:17 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ 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
|
2020-05-06 07:44:47 +00:00
|
|
|
index 6694d0e36c..87d68a3e21 100644
|
2016-10-05 21:28:17 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
2020-05-06 07:44:47 +00:00
|
|
|
@@ -630,6 +630,12 @@ public class Chunk implements IChunkAccess {
|
2019-04-27 06:26:04 +00:00
|
|
|
"Chunk coordinates: " + (this.loc.x * 16) + "," + (this.loc.z * 16));
|
2016-10-05 21:28:17 +00:00
|
|
|
e.printStackTrace();
|
|
|
|
ServerInternalException.reportInternalException(e);
|
|
|
|
+
|
|
|
|
+ if (this.world.paperConfig.removeCorruptTEs) {
|
|
|
|
+ this.removeTileEntity(tileentity.getPosition());
|
2018-06-15 04:11:39 +00:00
|
|
|
+ this.markDirty();
|
2016-10-05 21:28:17 +00:00
|
|
|
+ org.bukkit.Bukkit.getLogger().info("Removing corrupt tile entity");
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
// CraftBukkit end
|
|
|
|
}
|
|
|
|
--
|
2020-05-06 07:44:47 +00:00
|
|
|
2.26.0
|
2016-10-05 21:28:17 +00:00
|
|
|
|