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 of Entity your 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 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 Details

    • entity

      protected final E extends net.minecraft.world.entity.Entity entity
    • bounds

      protected final GridAlignedBB bounds
  • Constructor Details

    • EntityInstance

      public EntityInstance(MaterialManager materialManager, E entity)
  • Method Details

    • getVolume

      public GridAlignedBB getVolume()
      Specified by:
      getVolume in interface LightListener
    • tickLightListener

      public boolean tickLightListener()
      Description copied from interface: TickingLightListener
      Called every tick for active listeners.
      Specified by:
      tickLightListener in interface TickingLightListener
      Returns:
      true if 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:
      getWorldPosition in interface Instance