Package com.jozufozu.flywheel.vanilla
Class BellVisual
java.lang.Object
com.jozufozu.flywheel.lib.visual.AbstractVisual
com.jozufozu.flywheel.lib.visual.AbstractBlockEntityVisual<net.minecraft.world.level.block.entity.BellBlockEntity>
com.jozufozu.flywheel.vanilla.BellVisual
- All Implemented Interfaces:
BlockEntityVisual<net.minecraft.world.level.block.entity.BellBlockEntity>,DynamicVisual,LitVisual,Visual,SimpleDynamicVisual
public class BellVisual
extends AbstractBlockEntityVisual<net.minecraft.world.level.block.entity.BellBlockEntity>
implements SimpleDynamicVisual
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jozufozu.flywheel.api.visual.DynamicVisual
DynamicVisual.ContextNested classes/interfaces inherited from interface com.jozufozu.flywheel.api.visual.LitVisual
LitVisual.Notifier -
Field Summary
Fields inherited from class com.jozufozu.flywheel.lib.visual.AbstractBlockEntityVisual
blockEntity, blockState, notifier, pos, visualPosFields inherited from class com.jozufozu.flywheel.lib.visual.AbstractVisual
deleted, instancerProvider, level, renderOrigin, visualizationContext -
Constructor Summary
ConstructorsConstructorDescriptionBellVisual(VisualizationContext ctx, net.minecraft.world.level.block.entity.BellBlockEntity blockEntity) -
Method Summary
Modifier and TypeMethodDescriptionprotected void_delete()voidbeginFrame(DynamicVisual.Context context) Called every frame.voidcollectCrumblingInstances(Consumer<Instance> consumer) Collect all instances that should render with a crumbling overlay when the block corresponding to this visual is being broken.voidinit(float partialTick) Initialize instances here.voidCalled when a section this visual is contained in receives a light update.Methods inherited from class com.jozufozu.flywheel.lib.visual.AbstractBlockEntityVisual
collectLightSections, doDistanceLimitThisFrame, getVisualPosition, initLightSectionNotifier, isVisibleMethods inherited from class com.jozufozu.flywheel.lib.visual.AbstractVisual
delete, relight, relight, relight, relight, relight, relight, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jozufozu.flywheel.lib.visual.SimpleDynamicVisual
planFrame
-
Constructor Details
-
BellVisual
public BellVisual(VisualizationContext ctx, net.minecraft.world.level.block.entity.BellBlockEntity blockEntity)
-
-
Method Details
-
init
public void init(float partialTick) Description copied from interface:VisualInitialize instances here.This method will be called exactly once upon visual creation.
- Specified by:
initin interfaceVisual- Overrides:
initin classAbstractBlockEntityVisual<net.minecraft.world.level.block.entity.BellBlockEntity>
-
beginFrame
Description copied from interface:SimpleDynamicVisualCalled every frame.
The implementation is free to parallelize calls to this method. You must ensure proper synchronization if you need to mutate anything outside this visual.
This method andSimpleTickableVisual.tick(com.jozufozu.flywheel.api.visual.TickableVisual.Context)will never be called simultaneously.
Instancer/Instancecreation/acquisition is safe here.- Specified by:
beginFramein interfaceSimpleDynamicVisual
-
updateLight
public void updateLight()Description copied from interface:LitVisualCalled when a section this visual is contained in receives a light update.Even if multiple sections are updated at the same time, this method will only be called once.
The implementation is free to parallelize calls to this method, as well as execute the plan returned by
DynamicVisual.planFrame()simultaneously. It is safe to query/update light here, but you must ensure proper synchronization if you want to mutate anything outside this visual or anything that is also mutated withinDynamicVisual.planFrame().- Specified by:
updateLightin interfaceLitVisual
-
collectCrumblingInstances
Description copied from interface:BlockEntityVisualCollect all instances that should render with a crumbling overlay when the block corresponding to this visual is being broken.
Passingnullto the consumer has no effect.- Specified by:
collectCrumblingInstancesin interfaceBlockEntityVisual<net.minecraft.world.level.block.entity.BellBlockEntity>- Parameters:
consumer- A consumer to provide instances to.
-
_delete
protected void _delete()- Specified by:
_deletein classAbstractVisual
-