EntityUtil

public final class EntityUtil

Properties

Link copied to clipboard
private final static Direction cameraUp

Calculates the camera's upward direction based on Entity.getFacing and Entity.getHorizontalFacing.

Functions

Link copied to clipboard
public final Direction getCameraUp()
Link copied to clipboard
public final static Vec3d getSpawnPosition(EntityType<? extends Entity> $self, World world, Vec3d center)

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.

Link copied to clipboard
public final static Unit lookForward(Entity $self)

Sets the yaw and pitch of the entity to look forward.