Interface Engine
- All Known Implementing Classes:
EngineImpl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA block to be rendered as a crumbling overlay. -
Method Summary
Modifier and TypeMethodDescriptionCreate a plan that will be executed every frame.Create a visualization context that will render to the given stage.voiddelete()Free all resources associated with this engine.voidrenderCrumbling(TaskExecutor executor, RenderContext context, List<Engine.CrumblingBlock> crumblingBlocks) Render the given instances as a crumbling overlay.net.minecraft.core.Vec3ivoidrenderStage(TaskExecutor executor, RenderContext context, RenderStage stage) Render all instances necessary for the given stage.booleanupdateRenderOrigin(net.minecraft.client.Camera camera) Maintain the render origin to be within a certain distance from the camera in all directions, preventing floating point precision issues at high coordinates.
-
Method Details
-
createVisualizationContext
Create a visualization context that will render to the given stage.- Parameters:
stage- The stage to render to.- Returns:
- A new visualization context.
-
createFramePlan
Plan<RenderContext> createFramePlan()Create a plan that will be executed every frame.- Returns:
- A new plan.
-
renderStage
Render all instances necessary for the given stage.- Parameters:
executor- The task executor running the frame plan.context- The render context for this frame.stage- The stage to render.
-
renderCrumbling
void renderCrumbling(TaskExecutor executor, RenderContext context, List<Engine.CrumblingBlock> crumblingBlocks) Render the given instances as a crumbling overlay.
This is guaranteed to be called between the first and last calls torenderStage(com.jozufozu.flywheel.api.task.TaskExecutor, com.jozufozu.flywheel.api.event.RenderContext, com.jozufozu.flywheel.api.event.RenderStage)for the current frame.- Parameters:
executor- The task executor running the frame plan.context- The render context for this frame.crumblingBlocks- The instances to render. This list is never empty.
-
updateRenderOrigin
boolean updateRenderOrigin(net.minecraft.client.Camera camera) Maintain the render origin to be within a certain distance from the camera in all directions, preventing floating point precision issues at high coordinates.- Returns:
trueif the render origin changed,falseotherwise.
-
renderOrigin
net.minecraft.core.Vec3i renderOrigin()- Returns:
- The current render origin.
-
delete
void delete()Free all resources associated with this engine.
This engine will not be used again after this method is called.
-