Class LodestoneBlockEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
team.lodestar.lodestone.systems.blockentity.LodestoneBlockEntity
All Implemented Interfaces:
net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension
Direct Known Subclasses:
ItemHolderBlockEntity, MultiBlockComponentEntity, MultiBlockCoreEntity

public class LodestoneBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity
A simple block entity with various methods normally found inside of Block delegated here from LodestoneEntityBlock
  • 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 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
    LodestoneBlockEntity(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
    net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket
     
    net.minecraft.nbt.CompoundTag
    getUpdateTag(net.minecraft.core.HolderLookup.Provider pRegistries)
     
    protected void
    loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    void
    loadWithLevel(Consumer<net.minecraft.world.level.Level> levelConsumer)
    Call from loadAdditional(CompoundTag, HolderLookup.Provider) for anything tied to the entity being initialized/updated that requires a non-null level
    void
    onBreak(@Nullable net.minecraft.world.entity.player.Player player)
     
    net.minecraft.world.item.ItemStack
    onClone(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)
     
    void
    onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt, net.minecraft.core.HolderLookup.Provider lookupProvider)
     
    void
    onEntityInside(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity)
     
    void
    onNeighborUpdate(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos neighbor)
     
    void
    onPlace(net.minecraft.world.entity.LivingEntity placer, net.minecraft.world.item.ItemStack stack)
     
    net.minecraft.world.ItemInteractionResult
    onUse(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.InteractionHand pHand)
     
    net.minecraft.world.ItemInteractionResult
    onUseWithItem(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.item.ItemStack pStack, net.minecraft.world.InteractionHand pHand)
     
    net.minecraft.world.InteractionResult
    onUseWithoutItem(net.minecraft.world.entity.player.Player pPlayer)
     
    void
     
    final void
     
    void
    update(net.minecraft.world.level.Level level)
    A method designed to run anytime substantial changes to the entity are made.

    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, saveAdditional, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, 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, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onLoad, requestModelDataUpdate
  • Constructor Details

    • LodestoneBlockEntity

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

    • getUpdateTag

      public net.minecraft.nbt.CompoundTag getUpdateTag(net.minecraft.core.HolderLookup.Provider pRegistries)
      Overrides:
      getUpdateTag in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdatePacket

      public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()
      Overrides:
      getUpdatePacket in class net.minecraft.world.level.block.entity.BlockEntity
    • onDataPacket

      public void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt, net.minecraft.core.HolderLookup.Provider lookupProvider)
    • loadAdditional

      protected void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      loadAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • onBreak

      public void onBreak(@Nullable @Nullable net.minecraft.world.entity.player.Player player)
    • onPlace

      public void onPlace(net.minecraft.world.entity.LivingEntity placer, net.minecraft.world.item.ItemStack stack)
    • onNeighborUpdate

      public void onNeighborUpdate(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos neighbor)
    • onClone

      public net.minecraft.world.item.ItemStack onClone(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)
    • onUse

      public net.minecraft.world.ItemInteractionResult onUse(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.InteractionHand pHand)
    • onUseWithoutItem

      public net.minecraft.world.InteractionResult onUseWithoutItem(net.minecraft.world.entity.player.Player pPlayer)
    • onUseWithItem

      public net.minecraft.world.ItemInteractionResult onUseWithItem(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.item.ItemStack pStack, net.minecraft.world.InteractionHand pHand)
    • onEntityInside

      public void onEntityInside(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity)
    • update

      public void update(@Nonnull net.minecraft.world.level.Level level)
      A method designed to run anytime substantial changes to the entity are made. Called the tick after the entity is updated from the server to the client, or loaded from memory
    • tick

      public void tick()
    • loadWithLevel

      public void loadWithLevel(Consumer<net.minecraft.world.level.Level> levelConsumer)
      Call from loadAdditional(CompoundTag, HolderLookup.Provider) for anything tied to the entity being initialized/updated that requires a non-null level
    • triggerLevelConsumers

      public final void triggerLevelConsumers()