Fixed cloud problems
This commit is contained in:
@@ -20,12 +20,14 @@
|
||||
package com.seibel.lod.common;
|
||||
|
||||
import com.seibel.lod.common.wrappers.config.ConfigGui;
|
||||
import com.seibel.lod.common.wrappers.world.DimensionTypeWrapper;
|
||||
import com.seibel.lod.core.config.*;
|
||||
import com.seibel.lod.core.enums.config.*;
|
||||
import com.seibel.lod.core.enums.rendering.*;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IAdvanced.*;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IGraphics.*;
|
||||
import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IWorldGenerator;
|
||||
import net.minecraft.client.renderer.DimensionSpecialEffects;
|
||||
|
||||
/**
|
||||
* This handles any configuration the user has access to.
|
||||
@@ -142,13 +144,17 @@ public class Config extends ConfigGui
|
||||
@ConfigAnnotations.Entry
|
||||
public static boolean customClouds = false;
|
||||
|
||||
@ConfigAnnotations.Category("client.graphics.cloudQuality")
|
||||
@ConfigAnnotations.Entry
|
||||
public static boolean fabulousClouds = true;
|
||||
|
||||
@ConfigAnnotations.Category("client.graphics.cloudQuality")
|
||||
@ConfigAnnotations.Entry
|
||||
public static boolean extendClouds = true;
|
||||
|
||||
@ConfigAnnotations.Category("client.graphics.cloudQuality")
|
||||
@ConfigAnnotations.Entry
|
||||
public static int cloudHeight = 192;
|
||||
public static double cloudHeight = DimensionSpecialEffects.OverworldEffects.CLOUD_LEVEL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public class SkyCoverGenerators {
|
||||
public static final int COLOR = NativeImage.combine(255, 255, 255, 255);
|
||||
|
||||
// Where the generator for clouds could be made
|
||||
// TODO: Try to impliment this https://www.reddit.com/r/Minecraft/comments/e7xol/this_is_how_clouds_should_work_gif_simulation/
|
||||
// TODO: Try to implement this https://www.reddit.com/r/Minecraft/comments/e7xol/this_is_how_clouds_should_work_gif_simulation/
|
||||
|
||||
public static void clearSkyGenerator(SimplexNoise noiseSampler, NativeImage image, double cloudiness) {
|
||||
for (int x = 0; x < 256; x++) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"lod.title": "Distant Horizons",
|
||||
"DistantHorizons.config.title": "Distant Horizons config",
|
||||
"DistantHorizons.config.ShowButton": "Show menu button",
|
||||
"DistantHorizons.config.ShowButton.@tooltip": "Show the custom button to the left of the fov button",
|
||||
"DistantHorizons.config.client": "Client",
|
||||
"DistantHorizons.config.client.graphics": "Graphics",
|
||||
"DistantHorizons.config.client.graphics.quality": "Quality options",
|
||||
@@ -25,8 +26,10 @@
|
||||
"DistantHorizons.config.client.graphics.fogQuality.disableVanillaFog": "Disable vanilla fog",
|
||||
"DistantHorizons.config.client.graphics.fogQuality.disableVanillaFog.@tooltip": "If true disable Minecraft's fog. \nMay cause issues with other mods that edit fog. \nMay cause errors with other fog editing mods",
|
||||
"DistantHorizons.config.client.graphics.cloudQuality": "Cloud options",
|
||||
"DistantHorizons.config.client.graphics.cloudQuality.customCloud": "Custom cloud",
|
||||
"DistantHorizons.config.client.graphics.cloudQuality.customCloud.@tooltip": "Do you want to use a custom way or rendering the clouds. \nIf you turn this off then the other settings here wont do anything \nThis will also make the clouds more dynamic",
|
||||
"DistantHorizons.config.client.graphics.cloudQuality.customClouds": "Custom cloud",
|
||||
"DistantHorizons.config.client.graphics.cloudQuality.customClouds.@tooltip": "Do you want to use a custom way or rendering the clouds. \nIf you turn this off then the other settings here wont do anything \nThis will also make the clouds more dynamic",
|
||||
"DistantHorizons.config.client.graphics.cloudQuality.fabulousClouds": "Fabulous clouds",
|
||||
"DistantHorizons.config.client.graphics.cloudQuality.fabulousClouds.@tooltip": "Makes clouds look way better. \nTHIS IS CURRENTLY AN EXPERIMENTAL SETTING",
|
||||
"DistantHorizons.config.client.graphics.cloudQuality.extendClouds": "Extend the clouds",
|
||||
"DistantHorizons.config.client.graphics.cloudQuality.cloudHeight": "Cloud height",
|
||||
"DistantHorizons.config.client.graphics.advancedGraphics": "Advanced quality option",
|
||||
|
||||
@@ -40,15 +40,12 @@ import net.minecraft.client.renderer.RenderType;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.*;
|
||||
import com.mojang.math.Matrix4f;
|
||||
import net.minecraft.client.CloudStatus;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.client.renderer.texture.DynamicTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.network.chat.ChatType;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -99,7 +96,7 @@ public class MixinWorldRenderer
|
||||
|
||||
if (minecraft.level.dimension() == ClientLevel.OVERWORLD) {
|
||||
CloudTexture cloudTexture = NoiseCloudHandler.cloudTextures.get(NoiseCloudHandler.cloudTextures.size() - 1);
|
||||
renderCloudLayer(poseStack, model, tickDelta, cameraX, cameraY, cameraZ, Config.Client.Graphics.CloudQuality.cloudHeight, 0, 1, 1, cloudTexture.resourceLocation);
|
||||
renderCloudLayer(poseStack, model, tickDelta, cameraX, cameraY, cameraZ, (float) (Config.Client.Graphics.CloudQuality.cloudHeight + 0.01 /* Make clouds a bit higher so it dosnt do janky stuff */), 0, 1, 1, cloudTexture.resourceLocation);
|
||||
}
|
||||
|
||||
ci.cancel();
|
||||
|
||||
@@ -40,15 +40,12 @@ import net.minecraft.client.renderer.RenderType;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.*;
|
||||
import com.mojang.math.Matrix4f;
|
||||
import net.minecraft.client.CloudStatus;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.client.renderer.texture.DynamicTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.network.chat.ChatType;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -92,17 +89,19 @@ public class MixinWorldRenderer
|
||||
|
||||
@Inject(method = "renderClouds", at = @At("HEAD"), cancellable = true)
|
||||
public void renderClouds(PoseStack poseStack, Matrix4f model, float tickDelta, double cameraX, double cameraY, double cameraZ, CallbackInfo ci) {
|
||||
TextureManager textureManager = Minecraft.getInstance().getTextureManager();
|
||||
registerClouds(textureManager);
|
||||
NoiseCloudHandler.update();
|
||||
if (Config.Client.Graphics.CloudQuality.customClouds) {
|
||||
TextureManager textureManager = Minecraft.getInstance().getTextureManager();
|
||||
registerClouds(textureManager);
|
||||
NoiseCloudHandler.update();
|
||||
|
||||
if (minecraft.level.dimension() == ClientLevel.OVERWORLD) {
|
||||
CloudTexture cloudTexture = NoiseCloudHandler.cloudTextures.get(NoiseCloudHandler.cloudTextures.size() - 1);
|
||||
renderCloudLayer(poseStack, model, tickDelta, cameraX, cameraY, cameraZ, Config.Client.Graphics.CloudQuality.cloudHeight, 0, 1, 1, cloudTexture.resourceLocation);
|
||||
if (minecraft.level.dimension() == ClientLevel.OVERWORLD) {
|
||||
CloudTexture cloudTexture = NoiseCloudHandler.cloudTextures.get(NoiseCloudHandler.cloudTextures.size() - 1);
|
||||
renderCloudLayer(poseStack, model, tickDelta, cameraX, cameraY, cameraZ, (float) (Config.Client.Graphics.CloudQuality.cloudHeight + 0.01 /* Make clouds a bit higher so it dosnt do janky stuff */), 0, 1, 1, cloudTexture.resourceLocation);
|
||||
}
|
||||
|
||||
ci.cancel();
|
||||
}
|
||||
|
||||
ci.cancel();
|
||||
|
||||
// get the partial ticks since renderChunkLayer doesn't
|
||||
// have access to them
|
||||
previousPartialTicks = tickDelta;
|
||||
|
||||
Reference in New Issue
Block a user