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.
import crafttweaker.api.block.entity.type.BeehiveBlockEntityOccupant;
Members
static create(ticksInHive as int) as Occupant
Creates a new occupant for a beehive.script.zs
Returns: The new occupant.
BeehiveBlockEntityOccupant.create(myInt);
Parameters:
ticksInHive: int
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.script.zs
Returns: The new entity.
myOccupant.createEntity(myLevel, myBlockPos);
Parameters:
Return Type:
Entity
Getter
Gets the entity data for the occupant.script.zs
// Occupant.entityData as CustomDatamyOccupant.entityData
Return Type:
CustomData
Getter
Gets the minimum number of ticks the occupant has been in the hive.script.zs
// Occupant.minTicksInHive as intmyOccupant.minTicksInHive
Return Type:
int
static of(entity as Entity) as Occupant
Creates a new occupant for a beehive.script.zs
Returns: The new occupant.
BeehiveBlockEntityOccupant.of(myEntity);
Return Type:
BeehiveBlockEntityOccupant
Getter
Gets the number of ticks the occupant has been in the hive.script.zs
// Occupant.ticksInHive as intmyOccupant.ticksInHive
Return Type:
int