Only allow rendering clouds in config set dimensions
This commit is contained in:
@@ -467,6 +467,18 @@ public class Config
|
||||
+ "")
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<String> dimensionEnabledCloudRenderingCsv = new ConfigEntry.Builder<String>()
|
||||
.set("minecraft:overworld")
|
||||
.setAppearance(EConfigEntryAppearance.ALL)
|
||||
.comment(""
|
||||
+ "A comma separated separated list of dimension resource locations where DH clouds will render.\n"
|
||||
+ "\n"
|
||||
+ "Example: \"minecraft:overworld,minecraft:the_end\"\n"
|
||||
+ "\n"
|
||||
+ "Changes will only be seen when the world is re-loaded.\n"
|
||||
+ "")
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<Boolean> enableInstancedRendering = new ConfigEntry.Builder<Boolean>()
|
||||
.set(true)
|
||||
.comment(""
|
||||
|
||||
@@ -137,8 +137,9 @@ public abstract class AbstractDhLevel implements IDhLevel
|
||||
if (this instanceof IDhClientLevel)
|
||||
{
|
||||
// only add clouds for certain dimension types
|
||||
if (!this.getLevelWrapper().hasCeiling()
|
||||
&& !this.getLevelWrapper().getDimensionType().isTheEnd()) // TODO config value for white/black list
|
||||
String enabledCloudDimensions = Config.Client.Advanced.Graphics.GenericRendering.dimensionEnabledCloudRenderingCsv.get();
|
||||
String dimName = this.getLevelWrapper().getDimensionType().getName();
|
||||
if (enabledCloudDimensions.contains(dimName))
|
||||
{
|
||||
this.cloudRenderHandler = new CloudRenderHandler((IDhClientLevel)this, genericRenderer);
|
||||
}
|
||||
|
||||
+1
@@ -27,6 +27,7 @@ public interface IDimensionTypeWrapper extends IDhApiDimensionTypeWrapper, IBind
|
||||
@Override
|
||||
boolean hasCeiling();
|
||||
|
||||
/** example: "minecraft:overworld" */
|
||||
String getName();
|
||||
|
||||
@Override
|
||||
|
||||
@@ -233,6 +233,10 @@
|
||||
"Enable Cloud Rendering",
|
||||
"distanthorizons.config.client.advanced.graphics.genericRendering.enableCloudRendering.@tooltip":
|
||||
"If true LOD clouds will be rendered.",
|
||||
"distanthorizons.config.client.advanced.graphics.genericRendering.dimensionEnabledCloudRenderingCsv":
|
||||
"Enable Cloud Rendering",
|
||||
"distanthorizons.config.client.advanced.graphics.genericRendering.dimensionEnabledCloudRenderingCsv.@tooltip":
|
||||
"A comma separated separated list of dimension resource locations where DH clouds will render. \n\nExample: \"minecraft:overworld,minecraft:the_end\" \n\nChanges will only be seen when the world is re-loaded.",
|
||||
"distanthorizons.config.client.advanced.graphics.genericRendering.enableUnexploredFogRendering":
|
||||
"Enable Unexplored Fog Rendering",
|
||||
"distanthorizons.config.client.advanced.graphics.genericRendering.enableUnexploredFogRendering.@tooltip":
|
||||
|
||||
Reference in New Issue
Block a user