world

World/entity related functions.

All world functions must have World world = client.getWorld();

getBlockAt

Block block = world.getBlockAt(Vec3 position);

Returns a block at a specified position.

getDimension

String dimension = world.getDimension();

Returns the current dimension name.

getEntities

List<Entity> entities = world.getEntities();

Returns the world's entity list.

getEntityById

Entity entity = world.getEntityById(int entityId);

Returns an entity from their entity ID.

getNetworkPlayers

List<NetworkPlayer> networkPlayers = world.getNetworkPlayers();

Returns the world's network player list.

getPlayerEntities

List<Entity> players = world.getPlayerEntities();

Returns the world's player entity list.

getScoreboard

List<String> scoreboard = world.getScoreboard();

Returns the scoreboard.

getTeams

Map<String, List<String>> teamMap = world.getTeams();

Returns a map of the server's teams.

getTileEntities

List<TileEntity> tileEntities = world.getTileEntities();

Returns the world's tile entities.

raycastBlock

Object[] block = world.raycastBlock(double distance, float yaw, float pitch);

Casts a ray with a specified angle and returns the position, offset, and face of the hit. Custom yaw and pitch input is optional.

propertyindextype

position

0

Vec3

offset

1

Vec3

face

2

String

raycastEntity

Object[] entity = world.raycastEntity(double distance, float yaw, float pitch);

Casts a ray with a specified angle and returns the entity, offset, and distance squared of the hit. Custom yaw and pitch input is optional.

propertyindextype

entity

0

Entity

offset

1

Vec3

distance^2

2

double

Last updated