Class EntityInstance<E extends net.minecraft.world.entity.Entity>
java.lang.Object
com.jozufozu.flywheel.backend.instancing.AbstractInstance
com.jozufozu.flywheel.backend.instancing.entity.EntityInstance<E>
- Type Parameters:
E- The type ofEntityyour class is an instance of.
- All Implemented Interfaces:
Instance,LightListener,TickingLightListener
- Direct Known Subclasses:
MinecartInstance
public abstract class EntityInstance<E extends net.minecraft.world.entity.Entity>
extends AbstractInstance
implements LightListener, TickingLightListener
The layer between a
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 a
BlockEntity 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 a
EntityInstance access
to more interesting and regular points within a tick or a frame.-
Field Summary
FieldsFields inherited from class com.jozufozu.flywheel.backend.instancing.AbstractInstance
materialManager, removed, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.math.Vector3fIn order to accommodate for floating point precision errors at high coordinates,BlockEntityInstanceManagers are allowed to arbitrarily adjust the origin, and shift the world matrix provided as a shader uniform accordingly.com.mojang.math.Vector3fgetInstancePosition(float partialTicks) In order to accommodate for floating point precision errors at high coordinates,BlockEntityInstanceManagers are allowed to arbitrarily adjust the origin, and shift the world matrix provided as a shader uniform accordingly.net.minecraft.core.BlockPosbooleanCalled every tick for active listeners.Methods inherited from class com.jozufozu.flywheel.backend.instancing.AbstractInstance
init, isListenerInvalid, onLightUpdate, relight, relight, relight, relight, remove, removeAndMark, shouldReset, update, updateLightMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jozufozu.flywheel.light.LightListener
isListenerInvalid, onLightPacket, onLightUpdate
-
Field Details
-
entity
-
bounds
-
-
Constructor Details
-
EntityInstance
-
-
Method Details
-
getVolume
- Specified by:
getVolumein interfaceLightListener
-
tickLightListener
public boolean tickLightListener()Description copied from interface:TickingLightListenerCalled every tick for active listeners.- Specified by:
tickLightListenerin interfaceTickingLightListener- Returns:
trueif the listener changed.
-
getInstancePosition
public com.mojang.math.Vector3f getInstancePosition()In order to accommodate for floating point precision errors at high coordinates,BlockEntityInstanceManagers are allowed to arbitrarily adjust the origin, and shift the world matrix provided as a shader uniform accordingly.- Returns:
- The position this instance should be rendered at to appear in the correct location.
-
getInstancePosition
public com.mojang.math.Vector3f getInstancePosition(float partialTicks) In order to accommodate for floating point precision errors at high coordinates,BlockEntityInstanceManagers are allowed to arbitrarily adjust the origin, and shift the world matrix provided as a shader uniform accordingly.- Returns:
- The position this instance should be rendered at to appear in the correct location.
-
getWorldPosition
public net.minecraft.core.BlockPos getWorldPosition()- Specified by:
getWorldPositionin interfaceInstance
-