Implement #4534 as configurable multipliers

This commit is contained in:
simibubi 2023-05-10 15:31:28 +02:00
parent 9e3140938b
commit b4a8386cd8
2 changed files with 14 additions and 3 deletions

View file

@ -319,14 +319,14 @@ public class ClientEvents {
if (AllFluids.CHOCOLATE.get() if (AllFluids.CHOCOLATE.get()
.isSame(fluid)) { .isSame(fluid)) {
event.scaleFarPlaneDistance(1f / 32f); event.scaleFarPlaneDistance(1f / 32f * AllConfigs.CLIENT.chocolateTransparencyMultiplier.getF());
event.setCanceled(true); event.setCanceled(true);
return; return;
} }
if (AllFluids.HONEY.get() if (AllFluids.HONEY.get()
.isSame(fluid)) { .isSame(fluid)) {
event.scaleFarPlaneDistance(1f / 8f); event.scaleFarPlaneDistance(1f / 8f * AllConfigs.CLIENT.honeyTransparencyMultiplier.getF());
event.setCanceled(true); event.setCanceled(true);
return; return;
} }

View file

@ -31,7 +31,14 @@ public class CClient extends ConfigBase {
public final ConfigInt ingameMenuConfigButtonOffsetX = i(-4, Integer.MIN_VALUE, Integer.MAX_VALUE, "ingameMenuConfigButtonOffsetX", public final ConfigInt ingameMenuConfigButtonOffsetX = i(-4, Integer.MIN_VALUE, Integer.MAX_VALUE, "ingameMenuConfigButtonOffsetX",
Comments.ingameMenuConfigButtonOffsetX); Comments.ingameMenuConfigButtonOffsetX);
public final ConfigBool ignoreFabulousWarning = b(false, "ignoreFabulousWarning", public final ConfigBool ignoreFabulousWarning = b(false, "ignoreFabulousWarning",
Comments.ignoreFabulousWarning); Comments.ignoreFabulousWarning);
// custom fluid fog
public final ConfigGroup fluidFogSettings = group(1, "fluidFogSettings", Comments.fluidFogSettings);
public final ConfigFloat honeyTransparencyMultiplier =
f(1, .125f, 256, "honey", Comments.honeyTransparencyMultiplier);
public final ConfigFloat chocolateTransparencyMultiplier =
f(1, .125f, 256, "chocolate", Comments.chocolateTransparencyMultiplier);
//overlay group //overlay group
public final ConfigGroup overlay = group(1, "goggleOverlay", public final ConfigGroup overlay = group(1, "goggleOverlay",
@ -147,6 +154,10 @@ public class CClient extends ConfigBase {
static String trains = "Railway related settings"; static String trains = "Railway related settings";
static String mountedZoomMultiplier = "How far away the Camera should zoom when seated on a train"; static String mountedZoomMultiplier = "How far away the Camera should zoom when seated on a train";
static String showTrackGraphOnF3 = "Display nodes and edges of a Railway Network while f3 debug mode is active"; static String showTrackGraphOnF3 = "Display nodes and edges of a Railway Network while f3 debug mode is active";
static String fluidFogSettings = "Configure your vision range when submerged in Create's custom fluids";
static String honeyTransparencyMultiplier = "The vision range through honey will be multiplied by this factor";
static String chocolateTransparencyMultiplier = "The vision range though chocolate will be multiplied by this factor";
} }
} }