Class TileChunkLoaderBase

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
codechicken.chunkloader.tile.TileChunkLoaderBase
All Implemented Interfaces:
IChunkLoader, net.minecraft.util.debug.DebugValueSource, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension
Direct Known Subclasses:
TileChunkLoader, TileSpotLoader

public abstract class TileChunkLoaderBase extends net.minecraft.world.level.block.entity.BlockEntity implements IChunkLoader
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

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

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField

    Nested classes/interfaces inherited from interface net.minecraft.util.debug.DebugValueSource

    net.minecraft.util.debug.DebugValueSource.Registration, net.minecraft.util.debug.DebugValueSource.ValueGetter<T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
     
    protected boolean
     
    @Nullable UUID
     
    @Nullable net.minecraft.network.chat.Component
     
    protected boolean
     
     
    protected boolean
     

    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
    TileChunkLoaderBase(net.minecraft.world.level.block.entity.BlockEntityType<?> tileEntityTypeIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    void
     
    net.minecraft.world.level.ChunkPos
     
    @Nullable UUID
     
    net.minecraft.nbt.CompoundTag
    getUpdateTag(net.minecraft.core.HolderLookup.Provider registries)
     
    void
    handleUpdateTag(net.minecraft.world.level.storage.ValueInput input)
     
    boolean
     
    static boolean
    isPoweringTo(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side)
     
    boolean
     
    protected void
    loadAdditional(net.minecraft.world.level.storage.ValueInput input)
     
    void
    onBlockPlacedBy(net.minecraft.world.entity.LivingEntity entityliving)
     
    void
     
    void
     
    net.minecraft.core.BlockPos
    pos()
     
    void
    readFromPacket(net.minecraft.network.RegistryFriendlyByteBuf packet)
     
    protected void
    saveAdditional(net.minecraft.world.level.storage.ValueOutput output)
     
    void
     
    void
     
    void
     
    net.minecraft.world.level.Level
     
    void
    writeToPacket(net.minecraft.network.RegistryFriendlyByteBuf packet)
     

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

    addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, problemPath, registerDebugValues, removeComponentsFromTag, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, syncData, triggerEvent

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

    deserializeAttachments, getData, getExistingDataOrNull, 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, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncData

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

    getModelData, hasCustomOutlineRendering, invalidateCapabilities, onDataPacket, requestModelDataUpdate

    Methods inherited from interface codechicken.chunkloader.api.IChunkLoader

    getChunks
  • Field Details

    • owner

      @Nullable public @Nullable UUID owner
    • ownerName

      @Nullable public @Nullable net.minecraft.network.chat.Component ownerName
    • loaded

      protected boolean loaded
    • unloaded

      protected boolean unloaded
    • powered

      protected boolean powered
    • active

      public boolean active
    • renderInfo

      @Nullable public @Nullable TileChunkLoaderBase.RenderInfo renderInfo
  • Constructor Details

    • TileChunkLoaderBase

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

    • saveAdditional

      protected void saveAdditional(net.minecraft.world.level.storage.ValueOutput output)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • loadAdditional

      protected void loadAdditional(net.minecraft.world.level.storage.ValueInput input)
      Overrides:
      loadAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • onLoad

      public void onLoad()
      Specified by:
      onLoad in interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
    • clearRemoved

      public void clearRemoved()
      Overrides:
      clearRemoved in class net.minecraft.world.level.block.entity.BlockEntity
    • isPowered

      public boolean isPowered()
    • isPoweringTo

      public static boolean isPoweringTo(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side)
    • onChunkUnloaded

      public void onChunkUnloaded()
      Specified by:
      onChunkUnloaded in interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
    • setRemoved

      public void setRemoved()
      Overrides:
      setRemoved in class net.minecraft.world.level.block.entity.BlockEntity
    • getChunkPosition

      public net.minecraft.world.level.ChunkPos getChunkPosition()
    • onBlockPlacedBy

      public void onBlockPlacedBy(net.minecraft.world.entity.LivingEntity entityliving)
    • getOwner

      @Nullable public @Nullable UUID getOwner()
      Specified by:
      getOwner in interface IChunkLoader
    • world

      public net.minecraft.world.level.Level world()
      Specified by:
      world in interface IChunkLoader
    • pos

      public net.minecraft.core.BlockPos pos()
      Specified by:
      pos in interface IChunkLoader
    • deactivate

      public void deactivate()
      Specified by:
      deactivate in interface IChunkLoader
    • activate

      public void activate()
      Specified by:
      activate in interface IChunkLoader
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface IChunkLoader
    • tickServer

      public void tickServer()
    • tickClient

      public void tickClient()
    • getUpdateTag

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

      public void handleUpdateTag(net.minecraft.world.level.storage.ValueInput input)
      Specified by:
      handleUpdateTag in interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
    • writeToPacket

      public void writeToPacket(net.minecraft.network.RegistryFriendlyByteBuf packet)
    • readFromPacket

      public void readFromPacket(net.minecraft.network.RegistryFriendlyByteBuf packet)