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 Summary
FieldsModifier and TypeFieldDescriptionprotected BiFunction<MaterialManager,T, EntityInstance<? super T>> -
Constructor Summary
ConstructorsConstructorDescriptionSimpleEntityInstancingController(BiFunction<MaterialManager, T, EntityInstance<? super T>> instanceFactory, Predicate<T> skipRender) -
Method Summary
Modifier and TypeMethodDescriptionEntityInstance<? super T>createInstance(MaterialManager materialManager, T entity) Given an entity and a material manager, constructs an instance for the entity.booleanshouldSkipRender(T entity) Checks if the given entity should not render normally.
-
Field Details
-
instanceFactory
protected BiFunction<MaterialManager,T extends net.minecraft.world.entity.Entity, instanceFactoryEntityInstance<? super T extends net.minecraft.world.entity.Entity>> -
skipRender
-
-
Constructor Details
-
SimpleEntityInstancingController
public SimpleEntityInstancingController(BiFunction<MaterialManager, T, EntityInstance<? super T>> instanceFactory, Predicate<T> skipRender)
-
-
Method Details
-
createInstance
Description copied from interface:EntityInstancingControllerGiven an entity and a material manager, constructs an instance for the entity.- Specified by:
createInstancein interfaceEntityInstancingController<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
Description copied from interface:EntityInstancingControllerChecks if the given entity should not render normally.- Specified by:
shouldSkipRenderin interfaceEntityInstancingController<T extends net.minecraft.world.entity.Entity>- Parameters:
entity- The entity to check.- Returns:
trueif the entity should not render normally,falseif it should.
-