mirror of
https://github.com/PaperMC/Paper.git
synced 2024-08-30 16:49:42 +02:00
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d25437bc Update to Minecraft 1.18-pre8 CraftBukkit Changes: 5a39a236 Update to Minecraft 1.18-pre8 Spigot Changes: 7840c2af Update to Minecraft 1.18-pre8
23 lines
1.4 KiB
Diff
23 lines
1.4 KiB
Diff
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 bd0d36822cbfb4005d280f8721b6ba0aafa370b4..fc6324aae881358dbf74caa70cd84ca5f566c701 100644
|
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
|
@@ -542,6 +542,11 @@ public class LevelChunk extends ChunkAccess {
|
|
}
|
|
|
|
// CraftBukkit start
|
|
+ // Paper start - Remove invalid mob spawner tile entities
|
|
+ } else if (blockEntity instanceof net.minecraft.world.level.block.entity.SpawnerBlockEntity
|
|
+ && !(getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SpawnerBlock)) {
|
|
+ this.removeBlockEntity(blockEntity.getBlockPos());
|
|
+ // Paper end
|
|
} else {
|
|
System.out.println("Attempted to place a tile entity (" + blockEntity + ") at " + blockEntity.getBlockPos().getX() + "," + blockEntity.getBlockPos().getY() + "," + blockEntity.getBlockPos().getZ()
|
|
+ " (" + this.getBlockState(blockposition) + ") where there was no entity tile!");
|