mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Trigger a fog update every 3 seconds at maximum, fixing fog colour not blending when standing still
This commit is contained in:
parent
836e8156c6
commit
7d6bca6d67
@ -414,13 +414,16 @@ public class ModEventHandlerRenderer {
|
|||||||
private static int fogZ;
|
private static int fogZ;
|
||||||
private static Vec3 fogRGBMultiplier;
|
private static Vec3 fogRGBMultiplier;
|
||||||
private static boolean doesBiomeApply = false;
|
private static boolean doesBiomeApply = false;
|
||||||
|
private static long fogTimer = 0;
|
||||||
|
|
||||||
/** Same procedure as getting the blended sky color but for fog */
|
/** Same procedure as getting the blended sky color but for fog */
|
||||||
public static Vec3 getFogBlendColor(World world, int playerX, int playerZ, float red, float green, float blue, double partialTicks) {
|
public static Vec3 getFogBlendColor(World world, int playerX, int playerZ, float red, float green, float blue, double partialTicks) {
|
||||||
|
|
||||||
if(playerX == fogX && playerZ == fogZ && fogInit) return fogRGBMultiplier;
|
long millis = System.currentTimeMillis() - fogTimer;
|
||||||
|
if(playerX == fogX && playerZ == fogZ && fogInit && millis < 3000) return fogRGBMultiplier;
|
||||||
|
|
||||||
fogInit = true;
|
fogInit = true;
|
||||||
|
fogTimer = System.currentTimeMillis();
|
||||||
GameSettings settings = Minecraft.getMinecraft().gameSettings;
|
GameSettings settings = Minecraft.getMinecraft().gameSettings;
|
||||||
int[] ranges = ForgeModContainer.blendRanges;
|
int[] ranges = ForgeModContainer.blendRanges;
|
||||||
int distance = 0;
|
int distance = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user