2020-01-22 03:02:07 +01:00
|
|
|
From 4e6c0d35f3089a469d2dc5fe45c51a7fccbb0bc2 Mon Sep 17 00:00:00 2001
|
2019-10-30 18:29:40 +01:00
|
|
|
From: MisterErwin <git@askarian.net>
|
|
|
|
Date: Wed, 30 Oct 2019 16:57:54 +0100
|
|
|
|
Subject: [PATCH] Fix spawning of hanging entities that are not ItemFrames and
|
|
|
|
can not face UP or DOWN
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2020-01-22 03:02:07 +01:00
|
|
|
index 1a6a88b17..be8b617f2 100644
|
2019-10-30 18:29:40 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2020-01-06 00:08:18 +01:00
|
|
|
@@ -1831,7 +1831,12 @@ public class CraftWorld implements World {
|
2019-10-30 18:29:40 +01:00
|
|
|
height = 9;
|
|
|
|
}
|
|
|
|
|
|
|
|
- BlockFace[] faces = new BlockFace[]{BlockFace.EAST, BlockFace.NORTH, BlockFace.WEST, BlockFace.SOUTH, BlockFace.UP, BlockFace.DOWN};
|
|
|
|
+ // Paper start - In addition to d65a2576e40e58c8e446b330febe6799d13a604f do not check UP/DOWN for non item frames
|
|
|
|
+ // BlockFace[] faces = new BlockFace[]{BlockFace.EAST, BlockFace.NORTH, BlockFace.WEST, BlockFace.SOUTH, BlockFace.UP, BlockFace.DOWN};
|
|
|
|
+ BlockFace[] faces = (ItemFrame.class.isAssignableFrom(clazz))
|
|
|
|
+ ? new BlockFace[]{BlockFace.EAST, BlockFace.NORTH, BlockFace.WEST, BlockFace.SOUTH, BlockFace.UP, BlockFace.DOWN}
|
|
|
|
+ : new BlockFace[]{BlockFace.EAST, BlockFace.NORTH, BlockFace.WEST, BlockFace.SOUTH};
|
|
|
|
+ // Paper end
|
|
|
|
final BlockPosition pos = new BlockPosition(x, y, z);
|
|
|
|
for (BlockFace dir : faces) {
|
|
|
|
IBlockData nmsBlock = world.getType(pos.shift(CraftBlock.blockFaceToNotch(dir)));
|
|
|
|
--
|
2020-01-22 03:02:07 +01:00
|
|
|
2.25.0.windows.1
|
2019-10-30 18:29:40 +01:00
|
|
|
|