getOrAlloc

fun getOrAlloc(index: Int, sizeX: Int, sizeZ: Int, fineX: Int, fineY: Int, fineZ: Int, level: Int, angle: Int): WorldEntityAvatar

Gets an existing world entity avatar from the queue if one is ready, or constructs a new avatar if not.

Return

either a new world entity avatar, or a pooled one that has been updated to contain the provided params.

Parameters

index

the index of the world entity

sizeX

the width of the world entity in zones (8 tiles/zone)

sizeZ

the height of the world entity in zones (8 tiles/zone)

fineX

the absolute fine x coordinate of the avatar. This can be calculated by doing x * 128 with absolute coord grid values.

fineY

the fine y coordinate (height) of the avatar. Note that as of revision 226, this property is overwritten by the ground height and has no impact on the perceived height of the world entity.

fineZ

the absolute fine x coordinate of the avatar. This can be calculated by doing z * 128 with absolute coord grid values.

level

the level of the world entity.