BlockEntity
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.BlockEntity;
Extends
BlockEntity extends AttachmentHolder
.
Implements
BlockEntity
implements the following interfaces:
Undocumented Interfaces
IBlockEntityExtension
Members
Getter
// BlockEntity.blockState as BlockStatemyBlockEntity.blockState
Return Type:
BlockState
blockState() as BlockState
Getter
Setter
data(data as IData)
getAttachmentData(type as AttachmentType<T>) as T
myBlockEntity.getAttachmentData<T>(myAttachmentType);
Parameters:
type: AttachmentType<T>
Type: AttachmentType<T>
Return Type:
T
getAttachmentData(type as Supplier<AttachmentType<T>>) as T
myBlockEntity.getAttachmentData<T>(mySupplier);
Parameters:
type: Supplier<AttachmentType<T>>
Type: Supplier<AttachmentType<T>>
Return Type:
T
hasAttachmentData(type as AttachmentType<T>) as bool
myBlockEntity.hasAttachmentData<T>(myAttachmentType);
Parameters:
type: AttachmentType<T>
Type: AttachmentType<T>
Return Type:
bool
hasAttachmentData(type as Supplier<AttachmentType<T>>) as bool
myBlockEntity.hasAttachmentData<T>(mySupplier);
Parameters:
type: Supplier<AttachmentType<T>>
Type: Supplier<AttachmentType<T>>
Return Type:
bool
Getter
// BlockEntity.hasLevel as boolmyBlockEntity.hasLevel
Return Type:
bool
hasLevel() as bool
// BlockEntity.hasLevel() as bool;myBlockEntity.hasLevel();
Return Type:
bool
Getter
// BlockEntity.registryName as ResourceLocationmyBlockEntity.registryName
Return Type:
ResourceLocation
registryName() as ResourceLocation
setAttachmentData(type as AttachmentType<T>, data as T) as T?
myBlockEntity.setAttachmentData<T>(myAttachmentType, myT);
Parameters:
type: AttachmentType<T>
Type: AttachmentType<T>
data: T
Type: T
Return Type:
T?
setAttachmentData(type as Supplier<AttachmentType<T>>, data as T) as T?
myBlockEntity.setAttachmentData<T>(mySupplier, myT);
Parameters:
type: Supplier<AttachmentType<T>>
Type: Supplier<AttachmentType<T>>
data: T
Type: T
Return Type:
T?