mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 11:24:11 +01:00
Clarify exception message for bad hanging location. Fixes BUKKIT-4824
This change adds the location and a more specific message to the IllegalArgumentException that gets thrown when a hanging entity is being spawned in a location that it cannot survive.
This commit is contained in:
parent
90e8aa008a
commit
cfa5490a58
1 changed files with 1 additions and 1 deletions
|
@ -999,7 +999,7 @@ public class CraftWorld implements World {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity != null && !((EntityHanging) entity).survives()) {
|
if (entity != null && !((EntityHanging) entity).survives()) {
|
||||||
entity = null;
|
throw new IllegalArgumentException("Cannot spawn hanging entity for " + clazz.getName() + " at " + location);
|
||||||
}
|
}
|
||||||
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
|
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
|
||||||
entity = new EntityTNTPrimed(world, x, y, z, null);
|
entity = new EntityTNTPrimed(world, x, y, z, null);
|
||||||
|
|
Loading…
Reference in a new issue