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

34 lines
1.9 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/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
2021-03-16 16:50:45 +01:00
@@ -0,0 +0,0 @@ import net.minecraft.world.level.TickListChunk;
import net.minecraft.world.level.TickListEmpty;
import net.minecraft.world.level.World;
import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.BlockMobSpawner;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.ITileEntity;
import net.minecraft.world.level.block.entity.TileEntity;
+import net.minecraft.world.level.block.entity.TileEntityMobSpawner;
import net.minecraft.world.level.block.state.IBlockData;
import net.minecraft.world.level.levelgen.ChunkProviderDebug;
import net.minecraft.world.level.levelgen.HeightMap;
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
2019-04-24 03:00:24 +02:00
}
2015-03-08 02:16:09 +01:00
// CraftBukkit start
2016-03-01 00:09:49 +01:00
+ // Paper start - Remove invalid mob spawner tile entities
+ } else if (tileentity instanceof TileEntityMobSpawner && !(getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ()).getBlock() instanceof BlockMobSpawner)) {
2014-11-28 02:17:45 +01:00
+ this.tileEntities.remove(blockposition);
2016-03-01 00:09:49 +01:00
+ // Paper end
} else {
System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.getPosition().getX() + "," + tileentity.getPosition().getY() + "," + tileentity.getPosition().getZ()
+ " (" + getType(blockposition) + ") where there was no entity tile!");