Paper/Spigot-Server-Patches/0033-Remove-invalid-mob-spawner-tile-entities.patch
Zach Brown c777f40058 Update from upstream SpigotMC
Add unbreakable API to item meta SpigotMC/Spigot@b1af008222
Configure how often EntityHangings calculate if they should die. SpigotMC/Spigot@ac6e1fc32d
Copy ItemStacks in DataWatcher to prevent ConcurrentModificationExcep… SpigotMC/Spigot@2af28ffbd1
Add the spigot.yml into the timings paste SpigotMC/Spigot@d61f38bd58

Note: This commit moves the entity-hanging tick into Spigot's spigot.yml and out of our paper.yml
2014-08-25 16:33:18 -05:00

42 Zeilen
2.0 KiB
Diff

From 4e8f6f02b5c941a718f1a60e31a198e3ac717cad Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
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 ce3fb73..753bdda 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -171,4 +171,11 @@ public class PaperSpigotWorldConfig
waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 );
log( "Water over lava flow speed: " + waterOverLavaFlowSpeed);
}
+
+ 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