Class SimpleBlockEntityVisualizer<T extends net.minecraft.world.level.block.entity.BlockEntity>
java.lang.Object
dev.engine_room.flywheel.lib.visualization.SimpleBlockEntityVisualizer<T>
- All Implemented Interfaces:
BlockEntityVisualizer<T>
public final class SimpleBlockEntityVisualizer<T extends net.minecraft.world.level.block.entity.BlockEntity>
extends Object
implements BlockEntityVisualizer<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSimpleBlockEntityVisualizer.Builder<T extends net.minecraft.world.level.block.entity.BlockEntity>An object to configure the visualizer for a block entity.static interfaceSimpleBlockEntityVisualizer.Factory<T extends net.minecraft.world.level.block.entity.BlockEntity> -
Constructor Summary
ConstructorsConstructorDescriptionSimpleBlockEntityVisualizer(SimpleBlockEntityVisualizer.Factory<T> visualFactory, Predicate<T> skipVanillaRender) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends net.minecraft.world.level.block.entity.BlockEntity>
SimpleBlockEntityVisualizer.Builder<T>builder(net.minecraft.world.level.block.entity.BlockEntityType<T> type) Get an object to configure the visualizer for the given block entity type.BlockEntityVisual<? super T>createVisual(VisualizationContext ctx, T blockEntity, float partialTick) Given a block entity and context, constructs a visual for the block entity.booleanskipVanillaRender(T blockEntity) Checks if the given block entity should not be rendered with the vanillaBlockEntityRenderer.
-
Constructor Details
-
SimpleBlockEntityVisualizer
public SimpleBlockEntityVisualizer(SimpleBlockEntityVisualizer.Factory<T> visualFactory, Predicate<T> skipVanillaRender)
-
-
Method Details
-
createVisual
public BlockEntityVisual<? super T> createVisual(VisualizationContext ctx, T blockEntity, float partialTick) Description copied from interface:BlockEntityVisualizerGiven a block entity and context, constructs a visual for the block entity.- Specified by:
createVisualin interfaceBlockEntityVisualizer<T extends net.minecraft.world.level.block.entity.BlockEntity>- Parameters:
ctx- Context for creating a visual.blockEntity- The block entity to construct a visual for.- Returns:
- The visual.
-
skipVanillaRender
Description copied from interface:BlockEntityVisualizerChecks if the given block entity should not be rendered with the vanillaBlockEntityRenderer.- Specified by:
skipVanillaRenderin interfaceBlockEntityVisualizer<T extends net.minecraft.world.level.block.entity.BlockEntity>- Parameters:
blockEntity- The block entity to check.- Returns:
trueif the block entity should not be rendered with the vanillaBlockEntityRenderer,falseif it should.
-
builder
public static <T extends net.minecraft.world.level.block.entity.BlockEntity> SimpleBlockEntityVisualizer.Builder<T> builder(net.minecraft.world.level.block.entity.BlockEntityType<T> type) Get an object to configure the visualizer for the given block entity type.- Type Parameters:
T- The type of the block entity.- Parameters:
type- The block entity type to configure.- Returns:
- The configuration object.
-