getSpawnPosition

public final static Vec3d getSpawnPosition(EntityType<? extends Entity> $self, World world, Vec3d center)(source)

Gets the spawn position if the given entity has enough space to spawn at the given position, or null, if the position is obstructed by blocks.

Parameters

world

The world to spawn the entity in

center

The center position of the entity