Class VisualizerRegistry
java.lang.Object
dev.engine_room.flywheel.api.visualization.VisualizerRegistry
The registry for
Visualizers.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends net.minecraft.world.entity.Entity>
@Nullable EntityVisualizer<? super T> getVisualizer(net.minecraft.world.entity.EntityType<T> type) Gets the visualizer for the given entity type, if one exists.static <T extends net.minecraft.world.level.block.entity.BlockEntity>
@Nullable BlockEntityVisualizer<? super T> getVisualizer(net.minecraft.world.level.block.entity.BlockEntityType<T> type) Gets the visualizer for the given block entity type, if one exists.static <T extends net.minecraft.world.entity.Entity>
voidsetVisualizer(net.minecraft.world.entity.EntityType<T> type, @Nullable EntityVisualizer<? super T> visualizer) Sets the visualizer for the given entity type.static <T extends net.minecraft.world.level.block.entity.BlockEntity>
voidsetVisualizer(net.minecraft.world.level.block.entity.BlockEntityType<T> type, @Nullable BlockEntityVisualizer<? super T> visualizer) Sets the visualizer for the given block entity type.
-
Method Details
-
getVisualizer
@Nullable public static <T extends net.minecraft.world.level.block.entity.BlockEntity> @Nullable BlockEntityVisualizer<? super T> getVisualizer(net.minecraft.world.level.block.entity.BlockEntityType<T> type) Gets the visualizer for the given block entity type, if one exists.- Type Parameters:
T- The type of the block entity.- Parameters:
type- The block entity type to get the visualizer for.- Returns:
- The visualizer for the given block entity type, or
nullif none exists.
-
getVisualizer
@Nullable public static <T extends net.minecraft.world.entity.Entity> @Nullable EntityVisualizer<? super T> getVisualizer(net.minecraft.world.entity.EntityType<T> type) Gets the visualizer for the given entity type, if one exists.- Type Parameters:
T- The type of the entity.- Parameters:
type- The entity type to get the visualizer for.- Returns:
- The visualizer for the given entity type, or
nullif none exists.
-
setVisualizer
public static <T extends net.minecraft.world.level.block.entity.BlockEntity> void setVisualizer(net.minecraft.world.level.block.entity.BlockEntityType<T> type, @Nullable @Nullable BlockEntityVisualizer<? super T> visualizer) Sets the visualizer for the given block entity type.- Type Parameters:
T- The type of the block entity.- Parameters:
type- The block entity type to set the visualizer for.visualizer- The visualizer to set.
-
setVisualizer
public static <T extends net.minecraft.world.entity.Entity> void setVisualizer(net.minecraft.world.entity.EntityType<T> type, @Nullable @Nullable EntityVisualizer<? super T> visualizer) Sets the visualizer for the given entity type.- Type Parameters:
T- The type of the entity.- Parameters:
type- The entity type to set the visualizer for.visualizer- The visualizer to set.
-