BeehiveBlockEntityOccupant

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.block.entity.type.BeehiveBlockEntityOccupant;

Members

static create(ticksInHive as int) as Occupant
Creates a new occupant for a beehive.

Returns: The new occupant.

script.zs
// Occupant.create(ticksInHive as int) as BeehiveBlockEntityOccupant;
BeehiveBlockEntityOccupant.create(myInt);

Parameters:

ticksInHive Type: int - The number of ticks the occupant has been in the hive.

Return Type: BeehiveBlockEntityOccupant

createEntity(level as Level, pos as BlockPos) as Entity
Creates an entity for the occupant.

Returns: The new entity.

script.zs
// Occupant.createEntity(level as Level, pos as BlockPos) as Entity;
myOccupant.createEntity(myLevel, myBlockPos);

Parameters:

level Type: Level - The level to create the entity in.
pos Type: BlockPos - The position to create the entity at.

Return Type: Entity

Getter
Gets the entity data for the occupant.
script.zs
// Occupant.entityData as CustomData
myOccupant.entityData

Return Type: CustomData

Getter
Gets the minimum number of ticks the occupant has been in the hive.
script.zs
// Occupant.minTicksInHive as int
myOccupant.minTicksInHive

Return Type: int

static of(entity as Entity) as Occupant
Creates a new occupant for a beehive.

Returns: The new occupant.

script.zs
// Occupant.of(entity as Entity) as BeehiveBlockEntityOccupant;
BeehiveBlockEntityOccupant.of(myEntity);

Parameters:

entity Type: Entity - The entity to create the occupant for.

Return Type: BeehiveBlockEntityOccupant

Getter
Gets the number of ticks the occupant has been in the hive.
script.zs
// Occupant.ticksInHive as int
myOccupant.ticksInHive

Return Type: int