Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
SPIGOT-2644: Clearer error for invalid hanging spawns
Dieser Commit ist enthalten in:
Ursprung
43ab2669d7
Commit
4d87c3422c
@ -1085,6 +1085,9 @@ public class CraftWorld implements World {
|
|||||||
entity = new EntityLeash(world, new BlockPosition((int) x, (int) y, (int) z));
|
entity = new EntityLeash(world, new BlockPosition((int) x, (int) y, (int) z));
|
||||||
entity.attachedToPlayer = true;
|
entity.attachedToPlayer = true;
|
||||||
} else {
|
} 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();
|
EnumDirection dir = CraftBlock.blockFaceToNotch(face).opposite();
|
||||||
if (Painting.class.isAssignableFrom(clazz)) {
|
if (Painting.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntityPainting(world, new BlockPosition((int) x, (int) y, (int) z), dir);
|
entity = new EntityPainting(world, new BlockPosition((int) x, (int) y, (int) z), dir);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren