PaperMC/Spigot-Server-Patches/Remove-invalid-mob-spawner-tile-entities.patch

22 lines
1.3 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
2016-03-01 00:09:49 +01:00
Date: Tue, 1 Mar 2016 15:08:03 -0600
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
2018-01-11 06:31:19 +01:00
index 350e0991..66c78083 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 {
2016-11-17 03:23:38 +01:00
tileentity.A();
2015-03-08 02:16:09 +01:00
this.tileEntities.put(blockposition, tileentity);
// CraftBukkit start
2016-03-01 00:09:49 +01:00
+ // Paper start - Remove invalid mob spawner tile entities
+ } else if (tileentity instanceof TileEntityMobSpawner && org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getBlockData(blockposition).getBlock()) != org.bukkit.Material.MOB_SPAWNER) {
2014-11-28 02:17:45 +01:00
+ this.tileEntities.remove(blockposition);
2016-03-01 00:09:49 +01:00
+ // Paper 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()
2016-03-01 00:09:49 +01:00
+ " (" + org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getBlockData(blockposition).getBlock()) + ") where there was no entity tile!");
--