PaperMC/patches/server/Remove-invalid-mob-spawner-tile-entities.patch

23 lines
1.4 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
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/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
2021-11-23 12:27:39 +01:00
@@ -0,0 +0,0 @@ public class LevelChunk extends ChunkAccess {
2021-06-11 14:02:28 +02:00
}
// CraftBukkit start
+ // Paper start - Remove invalid mob spawner tile entities
2021-11-23 12:27:39 +01:00
+ } else if (blockEntity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity
+ && !(getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SpawnerBlock)) {
2021-06-12 08:02:49 +02:00
+ this.removeBlockEntity(blockEntity.getBlockPos());
2021-06-11 14:02:28 +02:00
+ // Paper end
} else {
System.out.println("Attempted to place a tile entity (" + blockEntity + ") at " + blockEntity.getBlockPos().getX() + "," + blockEntity.getBlockPos().getY() + "," + blockEntity.getBlockPos().getZ()
2021-06-12 00:37:16 +02:00
+ " (" + this.getBlockState(blockposition) + ") where there was no entity tile!");