Skip to content

Commit 4bfc998

Browse files
committed
Add oldWaterColorFog
1 parent 6ad743b commit 4bfc998

File tree

5 files changed

+59
-23
lines changed

5 files changed

+59
-23
lines changed

CHANGELOG.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
### NOTICE: This update will reset your settings! I'm sorry.
22

33
## Added:
4+
45
#### Server (For Server Developers)
5-
- New Server Features:
6-
- "all" - enables everything
7-
- "mining_item_usage" - Allows mining blocks whilst using an item like in <=1.7
8-
- "pick_inflation" - inflates the pick radius to 0.1 like in <=1.8
9-
- "clientside_entities" - makes entity movement client-sided like in <=1.7
10-
- "old_sneak_height" - Makes the sneaking bounding box/eye height as it was in <=1.8
6+
7+
- New Server Features:
8+
- "all" - enables everything
9+
- "mining_item_usage" - Allows mining blocks whilst using an item like in <=1.7
10+
- "pick_inflation" - inflates the pick radius to 0.1 like in <=1.8
11+
- "clientside_entities" - makes entity movement client-sided like in <=1.7
12+
- "old_sneak_height" - Makes the sneaking bounding box/eye height as it was in <=1.8
13+
1114
#### General
12-
- Merged Extras Back Into Animatium as a new config tab (all disabled by default)
15+
1316
- Onboarding Screen
1417
- Old Render Distance Checks
1518
- Old Depth Far
@@ -26,11 +29,37 @@
2629
- Center Crosshair (like it was in older versions around <=1.12.2)
2730
- Old Cloud Rendering (<=1.21.5)
2831
- Old Water Overlay Opacity (the texture when you are submerged) (<=1.12.2)
32+
- Old Water Color Fog
33+
- Merged Extras Back Into Animatium as a new config tab (all disabled by default)
34+
- Minimal View Bobbing
35+
- Show Self Nametag
36+
- Hide Nametag Background
37+
- Toggle Nametag Shadow
38+
- 1.7 Debug Hud Text Color
39+
- Allow usage swinging w/ item in offhand
40+
- Allow usage swinging always (even in the air)
41+
- Always Show Sharpness Particles
42+
- Disable Recipe/Tutorial Toasts
43+
- Show Arm Whilst Invisible
44+
- Fake the miss-penalty arm swing
45+
- Disable Blue Void Movement
46+
- Disable Entity Falling Over on Death
47+
- Deep Red Hurt Tint
48+
- Disable Particle Physics
49+
- Disable Self Particles (First-person)
50+
- Don't Clear Chat (on server leave/etc)
51+
- Don't Close Chat (on teleport or whatever)
52+
- Old Water Color (Restores old water color (WHITE) in biomes | REQUIRES RESOURCE PACK (PROVIDED))
2953

3054
## Changed:
55+
3156
#### General
57+
3258
- Simplified a ton of settings (Combined stuff like Sneaking Settings/Fishing Rod Version)
59+
3360
### Server
61+
3462
- Current config info is now sent inside the "info" payload (README for documentation)
35-
- Info payload now sends on server join instead of having to be requested, similar to how it originally was but better now
63+
- Info payload now sends on server join instead of having to be requested, similar to how it originally was but better
64+
now
3665
- During PLAY JOIN

src/main/java/org/visuals/legacy/animatium/config/category/OtherConfigCategory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public class OtherConfigCategory extends Category {
6464
public boolean fastGrass = true;
6565
public boolean oldY0Height = true;
6666
public boolean oldWaterOverlayOpacity = true;
67+
public boolean oldWaterColorFog = true;
6768
// public boolean disableRandomBlockRotations = true; // TODO: 3.1
6869
public VoidFogSetting voidFog = VoidFogSetting.BOTH;
6970

@@ -110,6 +111,7 @@ public EntryBundle bundle() {
110111
bundle.booleanEntry("fastGrass");
111112
bundle.booleanEntry("oldY0Height");
112113
bundle.booleanEntry("oldWaterOverlayOpacity");
114+
bundle.booleanEntry("oldWaterColorFog");
113115
// bundle.booleanEntry("disableRandomBlockRotations");
114116
bundle.enumEntry("voidFog", VoidFogSetting.class);
115117

src/main/java/org/visuals/legacy/animatium/mixins/v1/rendering/fog/MixinWaterFogEnvironment_OldWaterColor.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@
4343

4444
@Mixin(WaterFogEnvironment.class)
4545
public abstract class MixinWaterFogEnvironment_OldWaterColor {
46-
@WrapOperation(method = "getBaseColor", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/biome/Biome;getWaterFogColor()I"))
47-
private int animatium$oldWaterFogColor(Biome instance, Operation<Integer> original, ClientLevel level, Camera camera, int renderDistance, float partialTick) {
48-
if (Animatium.isEnabled() && AnimatiumConfig.instance().extras.oldWaterColorEffects) {
49-
float value = 0.0F;
50-
if (camera.getEntity() instanceof LivingEntity livingEntity) {
51-
value = EnchantmentHelper.getEnchantmentLevel(level.registryAccess().getOrThrow(Enchantments.RESPIRATION), livingEntity) * 0.2F;
52-
if (livingEntity.hasEffect(MobEffects.WATER_BREATHING)) {
53-
value *= 0.9F;
54-
}
55-
}
46+
@WrapOperation(method = "getBaseColor", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/biome/Biome;getWaterFogColor()I"))
47+
private int animatium$oldWaterFogColor(Biome instance, Operation<Integer> original, ClientLevel level, Camera camera, int renderDistance, float partialTick) {
48+
if (Animatium.isEnabled() && AnimatiumConfig.instance().other.oldWaterColorFog) {
49+
float value = 0.0F;
50+
if (camera.getEntity() instanceof LivingEntity livingEntity) {
51+
value = EnchantmentHelper.getEnchantmentLevel(level.registryAccess().getOrThrow(Enchantments.RESPIRATION), livingEntity) * 0.2F;
52+
if (livingEntity.hasEffect(MobEffects.WATER_BREATHING)) {
53+
value *= 0.9F;
54+
}
55+
}
5656

57-
return ARGB.colorFromFloat(1.0F, 0.02F + value, 0.02F + value, 0.2F + value);
58-
} else {
59-
return original.call(instance);
60-
}
61-
}
57+
return ARGB.colorFromFloat(1.0F, 0.02F + value, 0.02F + value, 0.2F + value);
58+
} else {
59+
return original.call(instance);
60+
}
61+
}
6262
}

src/main/java/org/visuals/legacy/animatium/util/config/Version.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public enum Version {
142142
other.fastGrass = true;
143143
other.oldY0Height = true;
144144
other.oldWaterOverlayOpacity = true;
145+
other.oldWaterColorFog = true;
145146
// other.disableRandomBlockRotations = true;
146147
}),
147148

@@ -246,6 +247,7 @@ public enum Version {
246247
other.fastGrass = false;
247248
other.oldY0Height = true;
248249
other.oldWaterOverlayOpacity = true;
250+
other.oldWaterColorFog = true;
249251
// other.disableRandomBlockRotations = false;
250252
}),
251253

@@ -364,6 +366,7 @@ public enum Version {
364366
other.fastGrass = false;
365367
other.oldY0Height = false;
366368
other.oldWaterOverlayOpacity = false;
369+
other.oldWaterColorFog = false;
367370
// other.disableRandomBlockRotations = false;
368371
});
369372

src/main/resources/assets/animatium/lang/en_us.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@
247247
"animatium.oldY0Height.description": "Changes the minY of the world back to 0 like it was in <=1.16.5.",
248248
"animatium.oldWaterOverlayOpacity": "[1.12] Old Water Overlay Opacity",
249249
"animatium.oldWaterOverlayOpacity.description": "Changes the water texture overlay opacity to 0.5 like it was in <=1.12.2.\n\nThis is when you are submerged in water.",
250+
"animatium.oldWaterColorFog": "[1.12] Old Water Color Fog",
251+
"animatium.oldWaterColorFog.description": "Restores the old water fog-color calculation from <=1.12.x",
250252
"animatium.voidFog": "[1.7] Void Fog/Particles Preset",
251253
"animatium.voidFog.description": "Reintroduces void fog & void particles from <=1.7.x",
252254
"animatium.enum.VoidFogSetting.BOTH": "Both",

0 commit comments

Comments
 (0)