mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
0708fa363b
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 CraftBukkit Changes:eb2e6578
SPIGOT-5116: Fix concurrent modification exception inside ChunkMapDistance989f9b3d
SPIGOT-4849: Fix server crash when accessing chunks during chunk load/unload/populate eventsf554183c
SPIGOT-5171: Don't fire PlayerTeleportEvent if not actually moving2349feb8
SPIGOT-5163: Cancelling PlayerBucketFillEvent visually removes the targeted block Spigot Changes: 9a643a6a Remove DataWatcher Locking
41 lines
1.7 KiB
Diff
41 lines
1.7 KiB
Diff
From ea60900a8d77be0c965014324fc93dc5657d4be1 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 241149c9f..849872f66 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -291,4 +291,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 3d366ddeb..cacef3ac9 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -533,6 +533,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
|
|
}
|
|
--
|
|
2.22.0
|
|
|