geforkt von Mirrors/Paper
Add option to remove corrupt tile entities
Closes GH-437
Dieser Commit ist enthalten in:
Ursprung
40f1788ef3
Commit
d5ae910f82
43
Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch
Normale Datei
43
Spigot-Server-Patches/Option-to-remove-corrupt-tile-entities.patch
Normale Datei
@ -0,0 +1,43 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
private void maxAutoSaveChunksPerTick() {
|
||||
maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24);
|
||||
}
|
||||
+
|
||||
+ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ public class Chunk {
|
||||
"Chunk coordinates: " + (this.locX * 16) + "," + (this.locZ * 16));
|
||||
e.printStackTrace();
|
||||
ServerInternalException.reportInternalException(e);
|
||||
+
|
||||
+ if (this.world.paperConfig.removeCorruptTEs) {
|
||||
+ this.removeTileEntity(tileentity.getPosition());
|
||||
+ org.bukkit.Bukkit.getLogger().info("Removing corrupt tile entity");
|
||||
+ }
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
||||
+ public void removeTileEntity(BlockPosition blockposition) { this.d(blockposition); } // Paper - OBFHELPER
|
||||
public void d(BlockPosition blockposition) {
|
||||
if (this.j) {
|
||||
TileEntity tileentity = (TileEntity) this.tileEntities.remove(blockposition);
|
||||
--
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren