mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 19:28:03 +01:00
Remove invalid mob spawner tile entities
This commit is contained in:
parent
b06551d732
commit
b457c5bdad
1 changed files with 39 additions and 0 deletions
|
@ -0,0 +1,39 @@
|
|||
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ 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 );
|
||||
+ }
|
||||
}
|
||||
--
|
Loading…
Add table
Reference in a new issue