Class SimpleEntityInstancingController<T extends net.minecraft.world.entity.Entity>

java.lang.Object
com.jozufozu.flywheel.backend.instancing.entity.SimpleEntityInstancingController<T>
All Implemented Interfaces:
EntityInstancingController<T>

public class SimpleEntityInstancingController<T extends net.minecraft.world.entity.Entity> extends Object implements EntityInstancingController<T>
  • Field Details

    • instanceFactory

      protected BiFunction<MaterialManager,T extends net.minecraft.world.entity.Entity,EntityInstance<? super T extends net.minecraft.world.entity.Entity>> instanceFactory
    • skipRender

      protected Predicate<T extends net.minecraft.world.entity.Entity> skipRender
  • Constructor Details

  • Method Details

    • createInstance

      public EntityInstance<? super T> createInstance(MaterialManager materialManager, T entity)
      Description copied from interface: EntityInstancingController
      Given an entity and a material manager, constructs an instance for the entity.
      Specified by:
      createInstance in interface EntityInstancingController<T extends net.minecraft.world.entity.Entity>
      Parameters:
      materialManager - The material manager to use.
      entity - The entity to construct an instance for.
      Returns:
      The instance.
    • shouldSkipRender

      public boolean shouldSkipRender(T entity)
      Description copied from interface: EntityInstancingController
      Checks if the given entity should not render normally.
      Specified by:
      shouldSkipRender in interface EntityInstancingController<T extends net.minecraft.world.entity.Entity>
      Parameters:
      entity - The entity to check.
      Returns:
      true if the entity should not render normally, false if it should.