Interface VisualizationContext

All Known Subinterfaces:
VisualEmbedding

@BackendImplemented public interface VisualizationContext
A context object passed on visual creation.
  • Method Details

    • instancerProvider

      InstancerProvider instancerProvider()
      Returns:
      The InstancerProvider that the visual can use to get instancers to render models.
    • renderOrigin

      net.minecraft.core.Vec3i renderOrigin()
      All models render as if this position is (0, 0, 0).

      For a Visual to appear in the correct position in the world, it must render at its actual world position minus this renderOrigin.
      i.e. be.getBlockPos() - visualizationContext.renderOrigin()

      This exists to prevent floating point precision issues when the camera is far away from the level's origin.

      Returns:
      The origin of the renderer as a level position.
    • createEmbedding

      VisualEmbedding createEmbedding(net.minecraft.core.Vec3i renderOrigin)
      Create a new embedding to compose visuals.
      Parameters:
      renderOrigin - The renderOrigin the embedding will appear to have.
      Returns:
      The embedding.
      See Also: