2016-01-17 04:04:07 +01:00
|
|
|
From 1f32bbad70c29f4636c376fa8dac5e579e3e4865 Mon Sep 17 00:00:00 2001
|
2014-08-19 21:53:21 +02:00
|
|
|
From: Byteflux <byte@byteflux.net>
|
2015-10-03 05:58:02 +02:00
|
|
|
Date: Sun, 8 Mar 2015 22:55:25 -0600
|
2014-08-19 21:53:21 +02:00
|
|
|
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
|
2015-09-13 02:57:39 +02:00
|
|
|
index 022ba31..7242d45 100644
|
2014-08-19 21:53:21 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
2015-03-23 20:23:25 +01:00
|
|
|
@@ -784,6 +784,11 @@ public class Chunk {
|
2015-03-08 02:16:09 +01:00
|
|
|
tileentity.D();
|
|
|
|
this.tileEntities.put(blockposition, tileentity);
|
|
|
|
// CraftBukkit start
|
|
|
|
+ // PaperSpigot start - Remove invalid mob spawner tile entities
|
2014-08-19 21:53:21 +02:00
|
|
|
+ } else if (this.world.paperSpigotConfig.removeInvalidMobSpawnerTEs && tileentity instanceof TileEntityMobSpawner &&
|
2015-03-08 02:16:09 +01:00
|
|
|
+ org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getType(blockposition)) != org.bukkit.Material.MOB_SPAWNER) {
|
2014-11-28 02:17:45 +01:00
|
|
|
+ this.tileEntities.remove(blockposition);
|
2014-08-19 21:53:21 +02:00
|
|
|
+ // PaperSpigot end
|
|
|
|
} else {
|
2014-11-28 02:17:45 +01:00
|
|
|
System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ()
|
2015-03-08 02:16:09 +01:00
|
|
|
+ " (" + org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getType(blockposition)) + ") where there was no entity tile!");
|
2014-08-19 21:53:21 +02:00
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2016-01-17 04:04:07 +01:00
|
|
|
index 781cf75..af53220 100644
|
2014-08-19 21:53:21 +02:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2016-01-17 04:04:07 +01:00
|
|
|
@@ -173,4 +173,11 @@ public class PaperSpigotWorldConfig
|
2014-08-25 23:30:52 +02:00
|
|
|
waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 );
|
2014-11-28 02:17:45 +01:00
|
|
|
log( "Water over lava flow speed: " + waterOverLavaFlowSpeed );
|
2014-08-19 21:53:21 +02:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean removeInvalidMobSpawnerTEs;
|
|
|
|
+ private void removeInvalidMobSpawnerTEs()
|
|
|
|
+ {
|
2014-10-25 05:28:29 +02:00
|
|
|
+ removeInvalidMobSpawnerTEs = getBoolean( "remove-invalid-mob-spawner-tile-entities", true );
|
2014-08-19 21:53:21 +02:00
|
|
|
+ log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2016-01-17 04:04:07 +01:00
|
|
|
2.7.0
|
2014-08-19 21:53:21 +02:00
|
|
|
|