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.
Extends
BlockEntity extends AttachmentHolder
.
Implements
BlockEntity
implements the following interfaces:
Undocumented Interfaces
IBlockEntityExtension
Members
Getter
blockState() as BlockState
Gets the
BlockState
of the block entity.Returns: The BlockState
of the block entity.
Return Type:
BlockState
getAttachmentData(type as AttachmentType<T>) as T
Parameters:
type: AttachmentType<T>
Type: AttachmentType<T>
Return Type:
T
getAttachmentData(type as Supplier<AttachmentType<T>>) as T
Parameters:
type: Supplier<AttachmentType<T>>
Type: Supplier<AttachmentType<T>>
Return Type:
T
hasAttachmentData(type as AttachmentType<T>) as bool
Parameters:
type: AttachmentType<T>
Type: AttachmentType<T>
Return Type:
bool
hasAttachmentData(type as Supplier<AttachmentType<T>>) as bool
Parameters:
type: Supplier<AttachmentType<T>>
Type: Supplier<AttachmentType<T>>
Return Type:
bool
Getter
Checks if the block entity has a level.
Return Type:
bool
hasLevel() as bool
Checks if the block entity has a level.
Returns: Whether the block entity has a level.
Return Type:
bool
Getter
registryName() as ResourceLocation
Gets the
ResourceLocation
of the block entity type.Returns: The ResourceLocation
of the block entity type.
Return Type:
ResourceLocation
setAttachmentData(type as AttachmentType<T>, data as T) as T?
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?
Parameters:
type: Supplier<AttachmentType<T>>
Type: Supplier<AttachmentType<T>>
data: T
Type: T
Return Type:
T?