mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-26 18:21:35 +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. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
parent
46b65df5ae
commit
68620f46d3
@ -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 New Issue
Block a user