Interface IDhApiRenderProxy


public interface IDhApiRenderProxy
Used to interact with Distant Horizons' rendering system.
Since:
API 1.0.0
  • Method Details

    • clearRenderDataCache

      DhApiResult<Boolean> clearRenderDataCache()
      Forces any cached render data to be deleted and regenerated. This is generally called whenever resource packs are changed or specific rendering settings are changed in Distant Horizon's config.

      If this is called on a dedicated server it won't do anything and will return DhApiResult.success = false

      Background:
      Distant Horizons has two different file formats: Full data and Render data.
      - Full data files store the block, biome, etc. information and is the result of loading or generating new chunks.
      - Render data files store LOD colors and are created using the Full data and currently loaded resource packs.
      This is the data cleared by this method.
    • getDhDepthTextureId

      DhApiResult<Integer> getDhDepthTextureId()
      Returns the name of Distant Horizons' depth texture.
      Will return DhApiResult.success = false and DhApiResult.payload = -1 if the texture hasn't been created yet.
    • getDhColorTextureId

      DhApiResult<Integer> getDhColorTextureId()
      Returns the name of Distant Horizons' color texture.
      Will return DhApiResult.success = false and DhApiResult.payload = -1 if the texture hasn't been created yet.
    • setDeferTransparentRendering

      void setDeferTransparentRendering(boolean deferTransparentRendering)
      If set to true DH won't render opaque and transparent LODs in the same pass. Instead, opaque objects will be rendered at the normal time, but transparent objects will only be rendered in a second pass during Minecraft's own transparent rendering pass.
    • getDeferTransparentRendering

      boolean getDeferTransparentRendering()
      Returns:
      If DH should defer transparent rendering or not.
    • getNearClipPlaneDistanceInBlocks

      float getNearClipPlaneDistanceInBlocks(float partialTicks)
      This may change based on FOV, player speed, and other factors.