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