From 825584d02ff23489511ee809d33184181a93a922 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 19 Aug 2014 14:53:21 -0500 Subject: [PATCH] Remove invalid mob spawner tile entities --- ...ve-invalid-mob-spawner-tile-entities.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Spigot-Server-Patches/0035-Remove-invalid-mob-spawner-tile-entities.patch diff --git a/Spigot-Server-Patches/0035-Remove-invalid-mob-spawner-tile-entities.patch b/Spigot-Server-Patches/0035-Remove-invalid-mob-spawner-tile-entities.patch new file mode 100644 index 0000000000..fd192ea242 --- /dev/null +++ b/Spigot-Server-Patches/0035-Remove-invalid-mob-spawner-tile-entities.patch @@ -0,0 +1,41 @@ +From 7e400c3c9715fb60b454dcdbe26762a5ff344839 Mon Sep 17 00:00:00 2001 +From: Byteflux +Date: Tue, 19 Aug 2014 14:51:28 -0500 +Subject: [PATCH] Remove invalid mob spawner tile entities + + +diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java +index 0423ee9..9454d4f 100644 +--- a/src/main/java/net/minecraft/server/Chunk.java ++++ b/src/main/java/net/minecraft/server/Chunk.java +@@ -755,6 +755,11 @@ public class Chunk { + this.world.triggerHoppersList.add(tileentity); + } + // Spigot end ++ // PaperSpigot start - Remove invalid mob spawner Tile Entities ++ } else if (this.world.paperSpigotConfig.removeInvalidMobSpawnerTEs && tileentity instanceof TileEntityMobSpawner && ++ org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getType(i, j, k)) != org.bukkit.Material.MOB_SPAWNER) { ++ this.tileEntities.remove(chunkposition); ++ // PaperSpigot end + // CraftBukkit start + } else { + System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.x + "," + tileentity.y + "," + tileentity.z +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index 552a53c..b6757ac 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -178,4 +178,11 @@ public class PaperSpigotWorldConfig + hangingTickFrequency = getInt( "hanging-tick-frequency", 100); + log( "Hanging entities tick frequency: " + hangingTickFrequency); + } ++ ++ public boolean removeInvalidMobSpawnerTEs; ++ private void removeInvalidMobSpawnerTEs() ++ { ++ removeInvalidMobSpawnerTEs = getBoolean( "remove-invalid-mob-spawner-tile-entities", true); ++ log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs ); ++ } + } +-- +1.9.1 +