Package codechicken.chunkloader.tile
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
-
Nested Class Summary
Nested classes/interfaces inherited from class codechicken.chunkloader.tile.TileChunkLoaderBase
TileChunkLoaderBase.RenderInfoNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsFieldNested 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
FieldsFields inherited from class codechicken.chunkloader.tile.TileChunkLoaderBase
active, loaded, owner, ownerName, powered, renderInfo, unloadedFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionTileChunkLoader(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()intSet<net.minecraft.world.level.ChunkPos> static Set<net.minecraft.world.level.ChunkPos> getContainedChunks(ChunkLoaderShape shape, int xCoord, int zCoord, int radius) protected voidloadAdditional(net.minecraft.world.level.storage.ValueInput input) voidreadFromPacket(net.minecraft.network.RegistryFriendlyByteBuf packet) protected voidsaveAdditional(net.minecraft.world.level.storage.ValueOutput output) booleansetShapeAndRadius(ChunkLoaderShape newShape, int newRadius) booleansetShapeAndRadius(@Nullable net.minecraft.server.level.ServerPlayer player, ChunkLoaderShape newShape, int newRadius) voidwriteToPacket(net.minecraft.network.RegistryFriendlyByteBuf packet) Methods inherited from class codechicken.chunkloader.tile.TileChunkLoaderBase
clearRemoved, deactivate, getChunkPosition, getOwner, getUpdateTag, handleUpdateTag, isPowered, isPoweringTo, isValid, onBlockPlacedBy, onChunkUnloaded, onLoad, pos, setRemoved, tickClient, tickServer, worldMethods 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, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, hasCustomOutlineRendering, invalidateCapabilities, onDataPacket, requestModelDataUpdate
-
Field Details
-
radius
public int radius -
shape
-
-
Constructor Details
-
TileChunkLoader
public TileChunkLoader(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
setShapeAndRadius
-
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:
writeToPacketin classTileChunkLoaderBase
-
readFromPacket
public void readFromPacket(net.minecraft.network.RegistryFriendlyByteBuf packet) - Overrides:
readFromPacketin classTileChunkLoaderBase
-
saveAdditional
protected void saveAdditional(net.minecraft.world.level.storage.ValueOutput output) - Overrides:
saveAdditionalin classTileChunkLoaderBase
-
loadAdditional
protected void loadAdditional(net.minecraft.world.level.storage.ValueInput input) - Overrides:
loadAdditionalin classTileChunkLoaderBase
-
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:
activatein interfaceIChunkLoader- Overrides:
activatein classTileChunkLoaderBase
-