Class SimpleEntityVisualizer<T extends net.minecraft.world.entity.Entity>
java.lang.Object
dev.engine_room.flywheel.lib.visualization.SimpleEntityVisualizer<T>
- All Implemented Interfaces:
EntityVisualizer<T>
public final class SimpleEntityVisualizer<T extends net.minecraft.world.entity.Entity>
extends Object
implements EntityVisualizer<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSimpleEntityVisualizer.Builder<T extends net.minecraft.world.entity.Entity>An object to configure the visualizer for an entity.static interfaceSimpleEntityVisualizer.Factory<T extends net.minecraft.world.entity.Entity> -
Constructor Summary
ConstructorsConstructorDescriptionSimpleEntityVisualizer(SimpleEntityVisualizer.Factory<T> visualFactory, Predicate<T> skipVanillaRender) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends net.minecraft.world.entity.Entity>
SimpleEntityVisualizer.Builder<T>builder(net.minecraft.world.entity.EntityType<T> type) Get an object to configure the visualizer for the given entity type.EntityVisual<? super T>createVisual(VisualizationContext ctx, T entity, float partialTick) Given an entity and context, constructs a visual for the entity.booleanskipVanillaRender(T entity) Checks if the given entity should not render with the vanillaEntityRenderer.
-
Constructor Details
-
SimpleEntityVisualizer
public SimpleEntityVisualizer(SimpleEntityVisualizer.Factory<T> visualFactory, Predicate<T> skipVanillaRender)
-
-
Method Details
-
createVisual
Description copied from interface:EntityVisualizerGiven an entity and context, constructs a visual for the entity.- Specified by:
createVisualin interfaceEntityVisualizer<T extends net.minecraft.world.entity.Entity>- Parameters:
ctx- Context for creating a visual.entity- The entity to construct a visual for.- Returns:
- The visual.
-
skipVanillaRender
Description copied from interface:EntityVisualizerChecks if the given entity should not render with the vanillaEntityRenderer.- Specified by:
skipVanillaRenderin interfaceEntityVisualizer<T extends net.minecraft.world.entity.Entity>- Parameters:
entity- The entity to check.- Returns:
trueif the entity should not render with the vanillaEntityRenderer,falseif it should.
-
builder
public static <T extends net.minecraft.world.entity.Entity> SimpleEntityVisualizer.Builder<T> builder(net.minecraft.world.entity.EntityType<T> type) Get an object to configure the visualizer for the given entity type.- Type Parameters:
T- The type of the entity.- Parameters:
type- The entity type to configure.- Returns:
- The configuration object.
-