Interface LockAndKeyBehavior<T extends net.minecraft.world.level.block.entity.BlockEntity>

Type Parameters:
T - The type of the BlockEntity.
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 Classes
    Modifier and Type
    Interface
    Description
    static final record 
    LockAndKeyBehavior.Simple<T extends net.minecraft.world.level.block.entity.BlockEntity>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Component
    getDisplayName(T blockEntity)
    Returns the BlockEntity's display name.
    net.minecraft.world.LockCode
    getLockKey(T blockEntity)
    Returns the BlockEntity's LockCode.
    void
    setLockKey(T blockEntity, net.minecraft.world.LockCode lock)
    Sets the BlockEntity's LockCode.
  • Method Details

    • getLockKey

      net.minecraft.world.LockCode getLockKey(T blockEntity)
      Returns the BlockEntity's LockCode.
      Parameters:
      blockEntity - the BlockEntity
      Returns:
      the BlockEntity's LockCode.
    • setLockKey

      void setLockKey(T blockEntity, net.minecraft.world.LockCode lock)
      Sets the BlockEntity's LockCode.
      Parameters:
      blockEntity - the BlockEntity
      lock - the LockCode to set
    • getDisplayName

      net.minecraft.network.chat.Component getDisplayName(T blockEntity)
      Returns the BlockEntity's display name.
      Parameters:
      blockEntity - the BlockEntity
      Returns:
      the BlockEntity's display name.