Package com.jozufozu.flywheel.lib.visual
Class AbstractEntityVisual<T extends net.minecraft.world.entity.Entity>
java.lang.Object
com.jozufozu.flywheel.lib.visual.AbstractVisual
com.jozufozu.flywheel.lib.visual.AbstractEntityVisual<T>
- Type Parameters:
T- The type ofEntity.
- All Implemented Interfaces:
EntityVisual<T>,Visual
- Direct Known Subclasses:
SimpleEntityVisual
public abstract class AbstractEntityVisual<T extends net.minecraft.world.entity.Entity>
extends AbstractVisual
implements EntityVisual<T>
The layer between an
There are a few additional features that overriding classes can opt in to: See the interfaces' documentation for more information about each one.
Implementing one or more of these will give an
Entity and the Flywheel backend.
There are a few additional features that overriding classes can opt in to: See the interfaces' documentation for more information about each one.
Implementing one or more of these will give an
AbstractEntityVisual access
to more interesting and regular points within a tick or a frame.-
Field Summary
FieldsFields inherited from class com.jozufozu.flywheel.lib.visual.AbstractVisual
deleted, instancerProvider, level, renderOrigin, visualizationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledistanceSquared(double x, double y, double z) Calculate the distance squared between this visual and the given level position.org.joml.Vector3fIn order to accommodate for floating point precision errors at high coordinates,VisualizationManagers are allowed to arbitrarily adjust the origin, and shift the level matrix provided as a shader uniform accordingly.org.joml.Vector3fgetVisualPosition(float partialTick) In order to accommodate for floating point precision errors at high coordinates,VisualizationManagers are allowed to arbitrarily adjust the origin, and shift the level matrix provided as a shader uniform accordingly.voidinit(float partialTick) Initialize instances here.booleanisVisible(org.joml.FrustumIntersection frustum) Methods inherited from class com.jozufozu.flywheel.lib.visual.AbstractVisual
_delete, delete, relight, relight, relight, relight, relight, relight, update
-
Field Details
-
entity
-
visibilityTester
-
-
Constructor Details
-
AbstractEntityVisual
-
-
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.
-
distanceSquared
public double distanceSquared(double x, double y, double z) Calculate the distance squared between this visual and the given level position.- Parameters:
x- The x coordinate.y- The y coordinate.z- The z coordinate.- Returns:
- The distance squared between this visual and the given position.
-
getVisualPosition
public org.joml.Vector3f getVisualPosition()In order to accommodate for floating point precision errors at high coordinates,VisualizationManagers are allowed to arbitrarily adjust the origin, and shift the level matrix provided as a shader uniform accordingly.- Returns:
- The position this visual should be rendered at to appear in the correct location.
-
getVisualPosition
public org.joml.Vector3f getVisualPosition(float partialTick) In order to accommodate for floating point precision errors at high coordinates,VisualizationManagers are allowed to arbitrarily adjust the origin, and shift the level matrix provided as a shader uniform accordingly.- Returns:
- The position this visual should be rendered at to appear in the correct location.
-
isVisible
public boolean isVisible(org.joml.FrustumIntersection frustum)
-