2015-02-23 21:03:10 +00:00
|
|
|
From d9c73f504f132d34904c1445fa9391823b96c3d3 Mon Sep 17 00:00:00 2001
|
2014-08-19 19:53:21 +00:00
|
|
|
From: Byteflux <byte@byteflux.net>
|
2014-11-28 01:17:45 +00:00
|
|
|
Date: Fri, 28 Nov 2014 03:43:14 -0600
|
2014-08-19 19:53:21 +00: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-02-23 21:03:10 +00:00
|
|
|
index b76b446..2d99252 100644
|
2014-08-19 19:53:21 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
2015-01-07 04:13:40 +00:00
|
|
|
@@ -756,6 +756,11 @@ public class Chunk {
|
2014-08-19 19:53:21 +00:00
|
|
|
this.world.triggerHoppersList.add(tileentity);
|
|
|
|
}
|
|
|
|
// Spigot end
|
|
|
|
+ // PaperSpigot start - Remove invalid mob spawner Tile Entities
|
|
|
|
+ } else if (this.world.paperSpigotConfig.removeInvalidMobSpawnerTEs && tileentity instanceof TileEntityMobSpawner &&
|
2014-11-28 01:17:45 +00:00
|
|
|
+ org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getType(blockposition)) != org.bukkit.Material.MOB_SPAWNER) {
|
|
|
|
+ this.tileEntities.remove(blockposition);
|
2014-08-19 19:53:21 +00:00
|
|
|
+ // PaperSpigot end
|
|
|
|
// CraftBukkit start
|
|
|
|
} else {
|
2014-11-28 01:17:45 +00:00
|
|
|
System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ()
|
2014-08-19 19:53:21 +00:00
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-02-23 21:03:10 +00:00
|
|
|
index 3b55750..59a9387 100644
|
2014-08-19 19:53:21 +00:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-02-23 21:03:10 +00:00
|
|
|
@@ -162,4 +162,11 @@ public class PaperSpigotWorldConfig
|
2014-08-25 21:30:52 +00:00
|
|
|
waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 );
|
2014-11-28 01:17:45 +00:00
|
|
|
log( "Water over lava flow speed: " + waterOverLavaFlowSpeed );
|
2014-08-19 19:53:21 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean removeInvalidMobSpawnerTEs;
|
|
|
|
+ private void removeInvalidMobSpawnerTEs()
|
|
|
|
+ {
|
2014-10-25 03:28:29 +00:00
|
|
|
+ removeInvalidMobSpawnerTEs = getBoolean( "remove-invalid-mob-spawner-tile-entities", true );
|
2014-08-19 19:53:21 +00:00
|
|
|
+ log( "Remove invalid mob spawner tile entities: " + removeInvalidMobSpawnerTEs );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-01-29 21:26:20 +00:00
|
|
|
1.9.5.msysgit.0
|
2014-08-19 19:53:21 +00:00
|
|
|
|