Package codechicken.multipart.api.part
Interface RandomTickPart
- All Superinterfaces:
MultiPart
- All Known Implementing Classes:
RedstoneTorchPart
Interface for parts with random update ticks.
Used in conjunction with TickScheduler
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonChunkLoad(net.minecraft.world.level.chunk.LevelChunk chunk) Called when the containing chunk is loaded on the server.default voidCalled when this part joins the world.voidCalled on random update.Methods inherited from interface codechicken.multipart.api.part.MultiPart
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, capCache, click, getBlockSupportShape, getCloneStack, getCollisionShape, getDrops, getExplosionResistance, getInteractionShape, getLightEmission, getModelData, getPlacementSound, getRenderBounds, getRenderOcclusionShape, getShape, getStrength, getType, getVisualShape, harvest, hasLevel, hasTile, invalidateConvertedTile, level, load, occlusionTest, onAdded, onChunkUnload, onConverted, onEntityCollision, onEntityStanding, onMoved, onNeighborBlockChanged, onPartChanged, onRemoved, onWorldSeparate, pos, preRemove, readDesc, readUpdate, save, scheduledTick, scheduleTick, sendUpdate, tile, useItemOn, useWithoutItem, writeDesc
-
Method Details
-
randomTick
void randomTick()Called on random update.Random ticks are between 800 and 1600 ticks from their last scheduled/random tick.
-
onChunkLoad
default void onChunkLoad(net.minecraft.world.level.chunk.LevelChunk chunk) Description copied from interface:MultiPartCalled when the containing chunk is loaded on the server.- Specified by:
onChunkLoadin interfaceMultiPart- Parameters:
chunk- The chunk.
-
onWorldJoin
default void onWorldJoin()Description copied from interface:MultiPartCalled when this part joins the world.This may be due to placement, chunk load, frames, etc.
Use this to sync with external data structures.
Called client and server side.
- Specified by:
onWorldJoinin interfaceMultiPart
-