13
0
geforkt von Mirrors/Paper

SPIGOT-1129: Fix spawning leash hitch without adjacent block

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2016-06-30 13:21:22 +10:00
Ursprung a44a8f29d0
Commit acd31bf4fb

Datei anzeigen

@ -1092,14 +1092,16 @@ public class CraftWorld implements World {
}
}
EnumDirection dir = CraftBlock.blockFaceToNotch(face).opposite();
if (Painting.class.isAssignableFrom(clazz)) {
entity = new EntityPainting(world, new BlockPosition((int) x, (int) y, (int) z), dir);
} else if (ItemFrame.class.isAssignableFrom(clazz)) {
entity = new EntityItemFrame(world, new BlockPosition((int) x, (int) y, (int) z), dir);
} else if (LeashHitch.class.isAssignableFrom(clazz)) {
if (LeashHitch.class.isAssignableFrom(clazz)) {
entity = new EntityLeash(world, new BlockPosition((int) x, (int) y, (int) z));
entity.attachedToPlayer = true;
} else {
EnumDirection dir = CraftBlock.blockFaceToNotch(face).opposite();
if (Painting.class.isAssignableFrom(clazz)) {
entity = new EntityPainting(world, new BlockPosition((int) x, (int) y, (int) z), dir);
} else if (ItemFrame.class.isAssignableFrom(clazz)) {
entity = new EntityItemFrame(world, new BlockPosition((int) x, (int) y, (int) z), dir);
}
}
if (entity != null && !((EntityHanging) entity).survives()) {