Class TileChunkLoader

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

public class TileChunkLoader extends TileChunkLoaderBase
  • Nested Class Summary

    Nested classes/interfaces inherited from class codechicken.chunkloader.tile.TileChunkLoaderBase

    TileChunkLoaderBase.RenderInfo

    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
    int
     
     

    Fields inherited from class codechicken.chunkloader.tile.TileChunkLoaderBase

    active, loaded, owner, ownerName, powered, renderInfo, unloaded

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

    Modifier and Type
    Method
    Description
    void
     
    int
     
    Set<net.minecraft.world.level.ChunkPos>
     
    static Set<net.minecraft.world.level.ChunkPos>
    getContainedChunks(ChunkLoaderShape shape, int xCoord, int zCoord, int radius)
     
    protected void
    loadAdditional(net.minecraft.world.level.storage.ValueInput input)
     
    void
    readFromPacket(net.minecraft.network.RegistryFriendlyByteBuf packet)
     
    protected void
    saveAdditional(net.minecraft.world.level.storage.ValueOutput output)
     
    boolean
    setShapeAndRadius(ChunkLoaderShape newShape, int newRadius)
     
    boolean
    setShapeAndRadius(@Nullable net.minecraft.server.level.ServerPlayer player, ChunkLoaderShape newShape, int newRadius)
     
    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
  • Field Details

  • Constructor Details

    • TileChunkLoader

      public TileChunkLoader(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • setShapeAndRadius

      public boolean setShapeAndRadius(ChunkLoaderShape newShape, int newRadius)
    • setShapeAndRadius

      public boolean setShapeAndRadius(@Nullable @Nullable net.minecraft.server.level.ServerPlayer player, ChunkLoaderShape newShape, int newRadius)
    • writeToPacket

      public void writeToPacket(net.minecraft.network.RegistryFriendlyByteBuf packet)
      Overrides:
      writeToPacket in class TileChunkLoaderBase
    • readFromPacket

      public void readFromPacket(net.minecraft.network.RegistryFriendlyByteBuf packet)
      Overrides:
      readFromPacket in class TileChunkLoaderBase
    • saveAdditional

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

      protected void loadAdditional(net.minecraft.world.level.storage.ValueInput input)
      Overrides:
      loadAdditional in class TileChunkLoaderBase
    • getChunks

      public Set<net.minecraft.world.level.ChunkPos> getChunks()
    • getContainedChunks

      public static Set<net.minecraft.world.level.ChunkPos> getContainedChunks(ChunkLoaderShape shape, int xCoord, int zCoord, int radius)
    • countLoadedChunks

      public int countLoadedChunks()
    • activate

      public void activate()
      Specified by:
      activate in interface IChunkLoader
      Overrides:
      activate in class TileChunkLoaderBase