mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
36f34f01c0
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: da9ef3c5 #496: Add methods to get/set ItemStacks in EquipmentSlots 3abebc9f #492: Let Tameable extend Animals rather than Entity 941111a0 #495: Expose ItemStack and hand used in PlayerShearEntityEvent 4fe19cae #494: InventoryView - Add missing Brewing FUEL_TIME CraftBukkit Changes:933e9094
#664: Add methods to get/set ItemStacks in EquipmentSlots18722312
#662: Expose ItemStack and hand used in PlayerShearEntityEvent
38 lines
1.8 KiB
Diff
38 lines
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 8cf3076f4e0d8d7e81158881c763f89ebda7e678..721eceeffc843da8b9da1ccc2d07f3bcc901db76 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -298,4 +298,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 6694d0e36c0a3dc86c5b4e6fc1f132395ac36fc0..87d68a3e2161798b7496542093f09b2b739ad45b 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -630,6 +630,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
|
|
}
|