Interface LockAndKeyBehavior<T extends net.minecraft.world.level.block.entity.BlockEntity>
- Type Parameters:
T- The type of theBlockEntity.
- All Known Implementing Classes:
LockAndKeyBehavior.Simple
public interface LockAndKeyBehavior<T extends net.minecraft.world.level.block.entity.BlockEntity>
Holds all information Bibliocraft needs to make the Lock and Key item work on a block entity.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordLockAndKeyBehavior.Simple<T extends net.minecraft.world.level.block.entity.BlockEntity> -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.chat.ComponentgetDisplayName(T blockEntity) Returns theBlockEntity's display name.net.minecraft.world.LockCodegetLockKey(T blockEntity) Returns theBlockEntity'sLockCode.voidsetLockKey(T blockEntity, net.minecraft.world.LockCode lock) Sets theBlockEntity'sLockCode.
-
Method Details
-
getLockKey
Returns theBlockEntity'sLockCode.- Parameters:
blockEntity- theBlockEntity- Returns:
- the
BlockEntity'sLockCode.
-
setLockKey
Sets theBlockEntity'sLockCode.- Parameters:
blockEntity- theBlockEntitylock- theLockCodeto set
-
getDisplayName
Returns theBlockEntity's display name.- Parameters:
blockEntity- theBlockEntity- Returns:
- the
BlockEntity's display name.
-