2019-07-17 00:09:32 +02:00
|
|
|
From ea60900a8d77be0c965014324fc93dc5657d4be1 Mon Sep 17 00:00:00 2001
|
2016-10-05 23:28:17 +02: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
|
2019-07-17 00:09:32 +02:00
|
|
|
index 241149c9f..849872f66 100644
|
2016-10-05 23:28:17 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2019-07-03 22:44:07 +02:00
|
|
|
@@ -291,4 +291,9 @@ public class PaperWorldConfig {
|
2019-04-27 08:26:04 +02:00
|
|
|
preventTntFromMovingInWater = getBoolean("prevent-tnt-from-moving-in-water", false);
|
|
|
|
log("Prevent TNT from moving in water: " + preventTntFromMovingInWater);
|
2016-10-05 23:28:17 +02: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
|
2019-07-17 00:09:32 +02:00
|
|
|
index 3d366ddeb..cacef3ac9 100644
|
2016-10-05 23:28:17 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
2019-05-27 08:14:14 +02:00
|
|
|
@@ -533,6 +533,12 @@ public class Chunk implements IChunkAccess {
|
2019-04-27 08:26:04 +02:00
|
|
|
"Chunk coordinates: " + (this.loc.x * 16) + "," + (this.loc.z * 16));
|
2016-10-05 23:28:17 +02:00
|
|
|
e.printStackTrace();
|
|
|
|
ServerInternalException.reportInternalException(e);
|
|
|
|
+
|
|
|
|
+ if (this.world.paperConfig.removeCorruptTEs) {
|
|
|
|
+ this.removeTileEntity(tileentity.getPosition());
|
2018-06-15 06:11:39 +02:00
|
|
|
+ this.markDirty();
|
2016-10-05 23:28:17 +02:00
|
|
|
+ org.bukkit.Bukkit.getLogger().info("Removing corrupt tile entity");
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
// CraftBukkit end
|
|
|
|
}
|
|
|
|
--
|
2019-06-25 21:18:50 +02:00
|
|
|
2.22.0
|
2016-10-05 23:28:17 +02:00
|
|
|
|