Class AbstractEntityVisual<T extends net.minecraft.world.entity.Entity>
java.lang.Object
dev.engine_room.flywheel.lib.visual.AbstractVisual
dev.engine_room.flywheel.lib.visual.AbstractEntityVisual<T>
- Type Parameters:
T- The type ofEntity.
- All Implemented Interfaces:
EntityVisual<T>,Visual
- Direct Known Subclasses:
ComponentEntityVisual
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 dev.engine_room.flywheel.lib.visual.AbstractVisual
deleted, level, visualizationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcomputePackedLight(float partialTick) doubledistanceSquared(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.booleanisVisible(org.joml.FrustumIntersection frustum) protected voidMethods inherited from class dev.engine_room.flywheel.lib.visual.AbstractVisual
_delete, delete, instancerProvider, renderOrigin, update
-
Field Details
-
entity
-
visibilityTester
-
-
Constructor Details
-
AbstractEntityVisual
-
-
Method Details
-
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) -
computePackedLight
protected int computePackedLight(float partialTick) -
relight
-