Modding:Level of detail
The lodLevel (level of detail) parameter of ITerrainMeshPool.AddMeshData controls at which distances the mesh is rendered. In general, meshes with a lower lodLevel are used for higher detail shapes.
FrustumCulling.InFrustumAndRange controls which levels of detail are rendered at which distances. The following table summarizes the logic. Note that the table is accurate for meshes directly added through ITerrainMeshPool.AddMeshData
, but inaccurate for meshes added by the json tessellator, because the json tessellator adjusts the lodlevel before inserting the meshes in the pool.
Distance to block | Level 0 | Level 1 | Level 2 | Level 3 |
---|---|---|---|---|
short | visible | visible | visible | hidden |
medium | hidden | visible | visible | hidden |
long | hidden | visible | hidden | visible |
Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.
Modding | |
---|---|
Modding Introduction | Getting Started • Theme Pack |
Content Modding | Content Mods • Developing a Content Mod • Basic Tutorials • Intermediate Tutorials • Advanced Tutorials • Content Mod Concepts |
Code Modding | Code Mods • Setting up your Development Environment |
Property Overview | Item • Entity • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |