public class GetCollisionBoxesEvent extends WorldEvent
World#collidesWithAnyBlock(AxisAlignedBB)
and before returning the list in World#getCollisionBoxes(Entity, AxisAlignedBB)
entity
contains the entity passed in the World#getCollisionBoxes(Entity, AxisAlignedBB)
. Can be null. Calls from World#collidesWithAnyBlock(AxisAlignedBB)
will be null.aabb
contains the AxisAlignedBB passed in the method.collisionBoxesList
contains the list of detected collision boxes intersecting with aabb
. The list can be modified.Cancelable
.HasResult
MinecraftForge.EVENT_BUS
.WorldEvent.CreateSpawnPosition, WorldEvent.Load, WorldEvent.PotentialSpawns, WorldEvent.Save, WorldEvent.Unload
Modifier and Type | Field and Description |
---|---|
private AxisAlignedBB |
aabb |
private java.util.List<AxisAlignedBB> |
collisionBoxesList |
private Entity |
entity |
Constructor and Description |
---|
GetCollisionBoxesEvent(World world,
Entity entity,
AxisAlignedBB aabb,
java.util.List<AxisAlignedBB> collisionBoxesList) |
Modifier and Type | Method and Description |
---|---|
AxisAlignedBB |
getAabb() |
java.util.List<AxisAlignedBB> |
getCollisionBoxesList() |
Entity |
getEntity() |
getWorld
private final Entity entity
private final AxisAlignedBB aabb
private final java.util.List<AxisAlignedBB> collisionBoxesList
public GetCollisionBoxesEvent(World world, @Nullable Entity entity, AxisAlignedBB aabb, java.util.List<AxisAlignedBB> collisionBoxesList)
public Entity getEntity()
public AxisAlignedBB getAabb()
public java.util.List<AxisAlignedBB> getCollisionBoxesList()