Home Commands Examples Getting Started With Scripts Global Keywords 1.21 Migration Guide
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

EntityAccess

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.entity.EntityAccess;

Members

Getter
Gets the BlockPos of the entity.
script.zs
// EntityAccess.blockPosiion as BlockPos
myEntityAccess.blockPosiion

Return Type: BlockPos

blockPosiion() as BlockPos
Gets the BlockPos of the entity.

Returns: The BlockPos of the entity.

script.zs
// EntityAccess.blockPosiion() as BlockPos;
myEntityAccess.blockPosiion();

Return Type: BlockPos

Getter
Gets the bounding box of the entity.
script.zs
// EntityAccess.boundingBox as AABB
myEntityAccess.boundingBox

Return Type: AABB

boundingBox() as AABB
Gets the bounding box of the entity.

Returns: The bounding box of the entity.

script.zs
// EntityAccess.boundingBox() as AABB;
myEntityAccess.boundingBox();

Return Type: AABB

Getter
Gets the ID of the entity.
script.zs
// EntityAccess.id as int
myEntityAccess.id

Return Type: int

id() as int
Gets the ID of the entity.

Returns: The ID of the entity.

script.zs
// EntityAccess.id() as int;
myEntityAccess.id();

Return Type: int

Getter
Checks if the entity is always ticking.
script.zs
// EntityAccess.isAlwaysTicking as bool
myEntityAccess.isAlwaysTicking

Return Type: bool

isAlwaysTicking() as bool
Checks if the entity is always ticking.

Returns: true if the entity is always ticking.

script.zs
// EntityAccess.isAlwaysTicking() as bool;
myEntityAccess.isAlwaysTicking();

Return Type: bool

setRemoved(var1 as RemovalReason)
Removes this entity with the given removal reason.
script.zs
// EntityAccess.setRemoved(var1 as RemovalReason);
myEntityAccess.setRemoved(myRemovalReason);

Parameters:

var1 Type: RemovalReason - The removal reason to set.
Getter
Checks if the entity should be saved.
script.zs
// EntityAccess.shouldBeSaved as bool
myEntityAccess.shouldBeSaved

Return Type: bool

shouldBeSaved() as bool
Checks if the entity should be saved.

Returns: true if the entity should be saved.

script.zs
// EntityAccess.shouldBeSaved() as bool;
myEntityAccess.shouldBeSaved();

Return Type: bool

Getter
Gets the UUID of the entity.
script.zs
// EntityAccess.uuid as UUID
myEntityAccess.uuid

Return Type: UUID

uuid() as UUID
Gets the UUID of the entity.

Returns: The UUID of the entity.

script.zs
// EntityAccess.uuid() as UUID;
myEntityAccess.uuid();

Return Type: UUID