BlockEntity
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
import crafttweaker.api.block.entity.BlockEntity;Extending CapabilityProvider<BlockEntity>
BlockEntity extends CapabilityProvider<BlockEntity>. That means all methods available in CapabilityProvider<BlockEntity> are also available in BlockEntity
Methods
Return Type: BlockPos
// BlockEntity.getBlockPos() as BlockPos
myBlockEntity.getBlockPos();Return Type: BlockState
// BlockEntity.getBlockState() as BlockState
myBlockEntity.getBlockState();Return Type: Level?
// BlockEntity.getLevel() as Level?
myBlockEntity.getLevel();Return Type: ResourceLocation
// BlockEntity.getRegistryName() as ResourceLocation
myBlockEntity.getRegistryName();Return Type: boolean
// BlockEntity.hasLevel() as boolean
myBlockEntity.hasLevel();BlockEntity.setData(data as IData)| Parameter | Type | 
|---|---|
| Parameterdata | TypeIData | 
BlockEntity.updateData(data as IData)| Parameter | Type | 
|---|---|
| Parameterdata | TypeIData | 
Properties
| Name | Type | Has Getter | Has Setter | 
|---|---|---|---|
| NameblockPos | TypeBlockPos | Has Gettertrue | Has Setterfalse | 
| NameblockState | TypeBlockState | Has Gettertrue | Has Setterfalse | 
| Namedata | TypeIData | Has Gettertrue | Has Settertrue | 
| NamehasLevel | Typeboolean | Has Gettertrue | Has Setterfalse | 
| Namelevel | TypeLevel? | Has Gettertrue | Has Setterfalse | 
| NameregistryName | TypeResourceLocation | Has Gettertrue | Has Setterfalse |