Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public static class CloudsConfig {

public boolean enabled = true;

public int[] dimensionList = {};

public boolean dimensionListIsBlacklist = true;

public int height = 256;
@Config.RangeInt(min = 4)
public int renderDistance = 32;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import javax.annotation.Nonnull;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.function.Predicate;

import static dev.redstudio.valkyrie.Valkyrie.MC;
Expand Down Expand Up @@ -203,7 +204,8 @@ private boolean isBuilt() {
}

public void updateSettings() {
final boolean enabled = ValkyrieConfig.graphics.clouds.enabled && MC.world != null && MC.world.provider.isSurfaceWorld();
final boolean enabled = ValkyrieConfig.graphics.clouds.enabled && MC.world != null && MC.world.provider.isSurfaceWorld() &&
(Arrays.stream(ValkyrieConfig.graphics.clouds.dimensionList).anyMatch(n -> n == MC.world.provider.getDimension()) != ValkyrieConfig.graphics.clouds.dimensionListIsBlacklist);

if (isBuilt() && (!enabled || ValkyrieConfig.graphics.clouds.renderDistance != renderDistance || ValkyrieConfig.graphics.clouds.layers != layers))
dispose();
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/assets/valkyrie/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ valkyrie.general.graphics.clouds.tooltip=Configuration for the clouds

valkyrie.general.graphics.clouds.enabled=Enabled
valkyrie.general.graphics.clouds.enabled.tooltip=Whether or not clouds are enabled
valkyrie.general.graphics.clouds.dimensionlist=Dimension List
valkyrie.general.graphics.clouds.dimensionlist.tooltip=Dimension List where clouds are whitelisted/blacklisted
valkyrie.general.graphics.clouds.dimensionlistisblacklist=Dimension List is Blacklist
valkyrie.general.graphics.clouds.dimensionlistisblacklist.tooltip=If True, Dimension List will be treated as a Blacklist instead of a Whitelist
valkyrie.general.graphics.clouds.height=Height
valkyrie.general.graphics.clouds.height.tooltip=The height of the clouds
valkyrie.general.graphics.clouds.renderdistance=Render Distance
Expand Down