Class InstancedRenderRegistry.EntityConfig<T extends net.minecraft.world.entity.Entity>
java.lang.Object
com.jozufozu.flywheel.backend.instancing.InstancedRenderRegistry.EntityConfig<T>
- Type Parameters:
T- The type of the entity.
- Enclosing class:
- InstancedRenderRegistry
public static class InstancedRenderRegistry.EntityConfig<T extends net.minecraft.world.entity.Entity>
extends Object
An object to configure the instancing controller for an entity.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BiFunction<MaterialManager,T, EntityInstance<? super T>> protected net.minecraft.world.entity.EntityType<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets a predicate to always skip rendering for entities of this type.apply()Constructs the entity instancing controller, and sets it for the entity type.factory(BiFunction<MaterialManager, T, EntityInstance<? super T>> instanceFactory) Sets the instance factory for the entity.skipRender(Predicate<T> skipRender) Sets a predicate to determine whether to skip rendering an entity.
-
Field Details
-
type
-
instanceFactory
protected BiFunction<MaterialManager,T extends net.minecraft.world.entity.Entity, instanceFactoryEntityInstance<? super T extends net.minecraft.world.entity.Entity>> -
skipRender
-
-
Constructor Details
-
EntityConfig
-
-
Method Details
-
factory
public InstancedRenderRegistry.EntityConfig<T> factory(BiFunction<MaterialManager, T, EntityInstance<? super T>> instanceFactory) Sets the instance factory for the entity.- Parameters:
instanceFactory- The instance factory.- Returns:
this
-
skipRender
Sets a predicate to determine whether to skip rendering an entity.- Parameters:
skipRender- The predicate.- Returns:
this
-
alwaysSkipRender
Sets a predicate to always skip rendering for entities of this type.- Returns:
this
-
apply
Constructs the entity instancing controller, and sets it for the entity type.- Returns:
- The entity instancing controller.
-