Class LecternControllerBlockEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
All Implemented Interfaces:
PartialSafeNBT, SpecialBlockEntityItemRequirement, IInteractionChecker, net.createmod.ponder.api.VirtualBlockEntity, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension

public class LecternControllerBlockEntity extends SmartBlockEntity
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity

    net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput

    Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField
  • Field Summary

    Fields inherited from class com.simibubi.create.foundation.blockEntity.SmartBlockEntity

    lazyTickCounter, lazyTickRate

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    LecternControllerBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    dropController(net.minecraft.world.level.block.state.BlockState state)
     
    net.minecraft.world.item.ItemStack
     
    boolean
     
    boolean
    isUsedBy(net.minecraft.world.entity.player.Player player)
     
    static boolean
    playerInRange(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)
     
    static boolean
    playerIsUsingLectern(net.minecraft.world.entity.player.Player player)
     
    protected void
    read(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
    Hook only these in future subclasses of STE
    void
    setController(net.minecraft.world.item.ItemStack newController)
     
    void
    swapControllers(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.level.block.state.BlockState state)
     
    void
     
    void
    tryStartUsing(net.minecraft.world.entity.player.Player player)
     
    void
    tryStopUsing(net.minecraft.world.entity.player.Player player)
     
    protected void
    write(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
    Hook only these in future subclasses of STE
    void
    writeSafe(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries)
    This will always be called from the logical server

    Methods inherited from class com.simibubi.create.foundation.blockEntity.CachedRenderBBBlockEntity

    createRenderBoundingBox, getRenderBoundingBox, invalidateRenderBoundingBox

    Methods inherited from class com.simibubi.create.foundation.blockEntity.SyncedBlockEntity

    blockHolderGetter, getUpdatePacket, getUpdateTag, handleUpdateTag, notifyUpdate, onDataPacket, sendData

    Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

    addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, triggerEvent

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachments

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder

    getData, getExistingData, hasData, removeData, setData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension

    getModelData, hasCustomOutlineRendering, invalidateCapabilities, onLoad, requestModelDataUpdate
  • Constructor Details

    • LecternControllerBlockEntity

      public LecternControllerBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • addBehaviours

      public void addBehaviours(List<BlockEntityBehaviour> behaviours)
      Specified by:
      addBehaviours in class SmartBlockEntity
    • write

      protected void write(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
      Description copied from class: SmartBlockEntity
      Hook only these in future subclasses of STE
      Overrides:
      write in class SmartBlockEntity
    • writeSafe

      public void writeSafe(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries)
      Description copied from interface: PartialSafeNBT
      This will always be called from the logical server
      Specified by:
      writeSafe in interface PartialSafeNBT
      Overrides:
      writeSafe in class SmartBlockEntity
    • read

      protected void read(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
      Description copied from class: SmartBlockEntity
      Hook only these in future subclasses of STE
      Overrides:
      read in class SmartBlockEntity
    • getController

      public net.minecraft.world.item.ItemStack getController()
    • hasUser

      public boolean hasUser()
    • isUsedBy

      public boolean isUsedBy(net.minecraft.world.entity.player.Player player)
    • tryStartUsing

      public void tryStartUsing(net.minecraft.world.entity.player.Player player)
    • tryStopUsing

      public void tryStopUsing(net.minecraft.world.entity.player.Player player)
    • playerIsUsingLectern

      public static boolean playerIsUsingLectern(net.minecraft.world.entity.player.Player player)
    • tick

      public void tick()
      Overrides:
      tick in class SmartBlockEntity
    • setController

      public void setController(net.minecraft.world.item.ItemStack newController)
    • swapControllers

      public void swapControllers(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.level.block.state.BlockState state)
    • dropController

      public void dropController(net.minecraft.world.level.block.state.BlockState state)
    • playerInRange

      public static boolean playerInRange(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)