Class ItemVisual

java.lang.Object
dev.engine_room.flywheel.lib.visual.AbstractVisual
dev.engine_room.flywheel.lib.visual.AbstractEntityVisual<T>
dev.engine_room.flywheel.lib.visual.ComponentEntityVisual<net.minecraft.world.entity.item.ItemEntity>
dev.engine_room.vanillin.visuals.ItemVisual
All Implemented Interfaces:
dev.engine_room.flywheel.api.visual.DynamicVisual, dev.engine_room.flywheel.api.visual.EntityVisual<net.minecraft.world.entity.item.ItemEntity>, dev.engine_room.flywheel.api.visual.Visual, dev.engine_room.flywheel.lib.visual.SimpleDynamicVisual

public class ItemVisual extends dev.engine_room.flywheel.lib.visual.ComponentEntityVisual<net.minecraft.world.entity.item.ItemEntity> implements dev.engine_room.flywheel.lib.visual.SimpleDynamicVisual
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     

    Nested classes/interfaces inherited from interface dev.engine_room.flywheel.api.visual.DynamicVisual

    dev.engine_room.flywheel.api.visual.DynamicVisual.Context
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final dev.engine_room.flywheel.lib.util.RendererReloadCache<ItemVisual.ItemKey,dev.engine_room.flywheel.api.model.Model>
     

    Fields inherited from class dev.engine_room.flywheel.lib.visual.ComponentEntityVisual

    components

    Fields inherited from class dev.engine_room.flywheel.lib.visual.AbstractEntityVisual

    entity, visibilityTester

    Fields inherited from class dev.engine_room.flywheel.lib.visual.AbstractVisual

    deleted, level, visualizationContext
  • Constructor Summary

    Constructors
    Constructor
    Description
    ItemVisual(dev.engine_room.flywheel.api.visualization.VisualizationContext ctx, net.minecraft.world.entity.item.ItemEntity entity, float partialTick)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    void
    beginFrame(dev.engine_room.flywheel.api.visual.DynamicVisual.Context ctx)
     
    static net.minecraft.client.resources.model.BakedModel
    getModel(net.minecraft.world.item.ItemStack stack)
     
    protected int
    getRenderAmount(net.minecraft.world.item.ItemStack pStack)
     
    static boolean
    isSupported(net.minecraft.client.resources.model.BakedModel model)
     
    static boolean
    isSupported(net.minecraft.world.entity.item.ItemEntity entity)
     
    boolean
     
    boolean
     

    Methods inherited from class dev.engine_room.flywheel.lib.visual.ComponentEntityVisual

    addComponent

    Methods inherited from class dev.engine_room.flywheel.lib.visual.AbstractEntityVisual

    computePackedLight, distanceSquared, getVisualPosition, getVisualPosition, isVisible, relight

    Methods inherited from class dev.engine_room.flywheel.lib.visual.AbstractVisual

    delete, instancerProvider, renderOrigin, update

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface dev.engine_room.flywheel.lib.visual.SimpleDynamicVisual

    planFrame

    Methods inherited from interface dev.engine_room.flywheel.api.visual.Visual

    delete, update
  • Field Details

    • MODEL_CACHE

      public static final dev.engine_room.flywheel.lib.util.RendererReloadCache<ItemVisual.ItemKey,dev.engine_room.flywheel.api.model.Model> MODEL_CACHE
  • Constructor Details

    • ItemVisual

      public ItemVisual(dev.engine_room.flywheel.api.visualization.VisualizationContext ctx, net.minecraft.world.entity.item.ItemEntity entity, float partialTick)
  • Method Details

    • isSupported

      public static boolean isSupported(net.minecraft.world.entity.item.ItemEntity entity)
    • getModel

      public static net.minecraft.client.resources.model.BakedModel getModel(net.minecraft.world.item.ItemStack stack)
    • isSupported

      public static boolean isSupported(net.minecraft.client.resources.model.BakedModel model)
    • beginFrame

      public void beginFrame(dev.engine_room.flywheel.api.visual.DynamicVisual.Context ctx)
      Specified by:
      beginFrame in interface dev.engine_room.flywheel.lib.visual.SimpleDynamicVisual
      Overrides:
      beginFrame in class dev.engine_room.flywheel.lib.visual.ComponentEntityVisual<net.minecraft.world.entity.item.ItemEntity>
    • getRenderAmount

      protected int getRenderAmount(net.minecraft.world.item.ItemStack pStack)
    • shouldSpreadItems

      public boolean shouldSpreadItems()
      Returns:
      If items should spread out when rendered in 3D
    • shouldBob

      public boolean shouldBob()
      Returns:
      If items should have a bob effect
    • _delete

      protected void _delete()
      Overrides:
      _delete in class dev.engine_room.flywheel.lib.visual.ComponentEntityVisual<net.minecraft.world.entity.item.ItemEntity>