Package com.jozufozu.flywheel.vanilla
Class MinecartVisual<T extends net.minecraft.world.entity.vehicle.AbstractMinecart>
java.lang.Object
com.jozufozu.flywheel.lib.visual.AbstractVisual
com.jozufozu.flywheel.lib.visual.AbstractEntityVisual<T>
com.jozufozu.flywheel.lib.visual.SimpleEntityVisual<T>
com.jozufozu.flywheel.vanilla.MinecartVisual<T>
- All Implemented Interfaces:
DynamicVisual,EntityVisual<T>,TickableVisual,Visual,SimpleDynamicVisual,SimpleTickableVisual
- Direct Known Subclasses:
TntMinecartVisual
public class MinecartVisual<T extends net.minecraft.world.entity.vehicle.AbstractMinecart>
extends SimpleEntityVisual<T>
implements SimpleTickableVisual, 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.TickableVisual
TickableVisual.Context -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ModelHolderstatic final ModelHolderstatic final ModelHolderstatic final ModelHolderstatic final ModelHolderstatic final ModelHolderstatic final ModelHolderFields inherited from class com.jozufozu.flywheel.lib.visual.SimpleEntityVisual
componentsFields inherited from class com.jozufozu.flywheel.lib.visual.AbstractEntityVisual
entity, visibilityTesterFields inherited from class com.jozufozu.flywheel.lib.visual.AbstractVisual
deleted, instancerProvider, level, renderOrigin, visualizationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_delete()voidbeginFrame(DynamicVisual.Context context) Called every frame.voidinit(float partialTick) Initialize instances here.static booleanshouldSkipRender(net.minecraft.world.entity.vehicle.AbstractMinecart minecart) voidtick(TickableVisual.Context context) Called every tick.protected voidupdateContents(TransformedInstance contents, com.mojang.blaze3d.vertex.PoseStack stack, float partialTick) voidMethods inherited from class com.jozufozu.flywheel.lib.visual.SimpleEntityVisual
addComponentMethods inherited from class com.jozufozu.flywheel.lib.visual.AbstractEntityVisual
distanceSquared, getVisualPosition, getVisualPosition, 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
planFrameMethods inherited from interface com.jozufozu.flywheel.lib.visual.SimpleTickableVisual
planTick
-
Field Details
-
CHEST_BODY_MODEL
-
COMMAND_BLOCK_BODY_MODEL
-
FURNACE_BODY_MODEL
-
HOPPER_BODY_MODEL
-
STANDARD_BODY_MODEL
-
SPAWNER_BODY_MODEL
-
TNT_BODY_MODEL
-
-
Constructor Details
-
MinecartVisual
-
-
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 classAbstractEntityVisual<T extends net.minecraft.world.entity.vehicle.AbstractMinecart>
-
tick
Description copied from interface:SimpleTickableVisualCalled every tick.
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 andSimpleDynamicVisual.beginFrame(com.jozufozu.flywheel.api.visual.DynamicVisual.Context)will never be called simultaneously.
Instancer/Instancecreation/acquisition is safe here.- Specified by:
tickin interfaceSimpleTickableVisual
-
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- Overrides:
beginFramein classSimpleEntityVisual<T extends net.minecraft.world.entity.vehicle.AbstractMinecart>
-
updateContents
protected void updateContents(TransformedInstance contents, com.mojang.blaze3d.vertex.PoseStack stack, float partialTick) -
updateLight
public void updateLight() -
_delete
protected void _delete()- Overrides:
_deletein classSimpleEntityVisual<T extends net.minecraft.world.entity.vehicle.AbstractMinecart>
-
shouldSkipRender
public static boolean shouldSkipRender(net.minecraft.world.entity.vehicle.AbstractMinecart minecart)
-