Package codechicken.chunkloader.tile
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 ClassesNested 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
FieldsModifier and TypeFieldDescriptionbooleanprotected boolean@Nullable UUID@Nullable net.minecraft.network.chat.Componentprotected boolean@Nullable TileChunkLoaderBase.RenderInfoprotected booleanFields 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
ConstructorsConstructorDescriptionTileChunkLoaderBase(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 TypeMethodDescriptionvoidactivate()voidvoidnet.minecraft.world.level.ChunkPos@Nullable UUIDgetOwner()net.minecraft.nbt.CompoundTaggetUpdateTag(net.minecraft.core.HolderLookup.Provider registries) voidhandleUpdateTag(net.minecraft.world.level.storage.ValueInput input) booleanstatic booleanisPoweringTo(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) booleanisValid()protected voidloadAdditional(net.minecraft.world.level.storage.ValueInput input) voidonBlockPlacedBy(net.minecraft.world.entity.LivingEntity entityliving) voidvoidonLoad()net.minecraft.core.BlockPospos()voidreadFromPacket(net.minecraft.network.RegistryFriendlyByteBuf packet) protected voidsaveAdditional(net.minecraft.world.level.storage.ValueOutput output) voidvoidvoidnet.minecraft.world.level.Levelworld()voidwriteToPacket(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, 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, requestModelDataUpdateMethods inherited from interface codechicken.chunkloader.api.IChunkLoader
getChunks
-
Field Details
-
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
-
-
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:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
loadAdditional
protected void loadAdditional(net.minecraft.world.level.storage.ValueInput input) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
onLoad
public void onLoad()- Specified by:
onLoadin interfacenet.neoforged.neoforge.common.extensions.IBlockEntityExtension
-
clearRemoved
public void clearRemoved()- Overrides:
clearRemovedin classnet.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:
onChunkUnloadedin interfacenet.neoforged.neoforge.common.extensions.IBlockEntityExtension
-
setRemoved
public void setRemoved()- Overrides:
setRemovedin classnet.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
- Specified by:
getOwnerin interfaceIChunkLoader
-
world
public net.minecraft.world.level.Level world()- Specified by:
worldin interfaceIChunkLoader
-
pos
public net.minecraft.core.BlockPos pos()- Specified by:
posin interfaceIChunkLoader
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceIChunkLoader
-
activate
public void activate()- Specified by:
activatein interfaceIChunkLoader
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceIChunkLoader
-
tickServer
public void tickServer() -
tickClient
public void tickClient() -
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag(net.minecraft.core.HolderLookup.Provider registries) - Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
handleUpdateTag
public void handleUpdateTag(net.minecraft.world.level.storage.ValueInput input) - Specified by:
handleUpdateTagin interfacenet.neoforged.neoforge.common.extensions.IBlockEntityExtension
-
writeToPacket
public void writeToPacket(net.minecraft.network.RegistryFriendlyByteBuf packet) -
readFromPacket
public void readFromPacket(net.minecraft.network.RegistryFriendlyByteBuf packet)
-