Interface Engine

All Known Implementing Classes:
EngineImpl

@BackendImplemented public interface Engine
  • Method Details

    • createVisualizationContext

      VisualizationContext createVisualizationContext(RenderStage stage)
      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

      void renderStage(TaskExecutor executor, RenderContext context, RenderStage stage)
      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 to renderStage(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:
      true if the render origin changed, false otherwise.
    • 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.