13
0
geforkt von Mirrors/Paper

SPIGOT-2644: Clearer error for invalid hanging spawns

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2016-08-31 17:25:37 +10:00
Ursprung 859ccb933b
Commit 6711effca1

Datei anzeigen

@ -1085,6 +1085,9 @@ public class CraftWorld implements World {
entity = new EntityLeash(world, new BlockPosition((int) x, (int) y, (int) z));
entity.attachedToPlayer = true;
} else {
// No valid face found
Preconditions.checkArgument(face != BlockFace.SELF, "Cannot spawn hanging entity for %s at %s (no free face)", clazz.getName(), location);
EnumDirection dir = CraftBlock.blockFaceToNotch(face).opposite();
if (Painting.class.isAssignableFrom(clazz)) {
entity = new EntityPainting(world, new BlockPosition((int) x, (int) y, (int) z), dir);