Interface IDhApiRenderProxy
public interface IDhApiRenderProxy
Used to interact with Distant Horizons' rendering system.
- Since:
- API 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionForces any cached render data to be deleted and regenerated.boolean
Returns the name of Distant Horizons' color texture.Returns the name of Distant Horizons' depth texture.float
getNearClipPlaneDistanceInBlocks
(float partialTicks) This may change based on FOV, player speed, and other factors.void
setDeferTransparentRendering
(boolean deferTransparentRendering) If set to true DH won't render opaque and transparent LODs in the same pass.
-
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 returnDhApiResult.success
= false
Background:
When rendering Distant Horizons bakes each block's color into the geometry that's rendered.
This improves rendering speed and VRAM size, but prevents dynamically changing LOD colors. -
getDhDepthTextureId
DhApiResult<Integer> getDhDepthTextureId()Returns the name of Distant Horizons' depth texture.
Will returnDhApiResult.success
= false andDhApiResult.payload
= -1 if the texture hasn't been created yet. -
getDhColorTextureId
DhApiResult<Integer> getDhColorTextureId()Returns the name of Distant Horizons' color texture.
Will returnDhApiResult.success
= false andDhApiResult.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.
-