fog off client command added
This commit is contained in:
1 parent
95d97608c2
commit
2fe5ed615e
3 files changed
+32
-1
No files matched your search
@@ -573,4 +573,11 @@ public class CarpetSettings
|
|||||||
category = CREATIVE
|
category = CREATIVE
|
||||||
)
|
)
|
||||||
public static boolean extremeBehaviours = false;
|
public static boolean extremeBehaviours = false;
|
||||||
|
|
||||||
|
@Rule(
|
||||||
|
desc = "Removes fog from client in the nether and the end",
|
||||||
|
extra = "Improves visibility, but looks weird",
|
||||||
|
category = CLIENT
|
||||||
|
)
|
||||||
|
public static boolean fogOff = false;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package carpet.mixins;
|
||||||
|
|
||||||
|
import carpet.CarpetSettings;
|
||||||
|
import net.minecraft.client.render.WorldRenderer;
|
||||||
|
import net.minecraft.world.dimension.Dimension;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
|
||||||
|
@Mixin(value = WorldRenderer.class, priority = 69420)
|
||||||
|
public class WorldRenderer_fogOffMixin
|
||||||
|
{
|
||||||
|
@Redirect(method = "render", require = 0, expect = 0, at = @At(
|
||||||
|
value = "INVOKE",
|
||||||
|
target = "Lnet/minecraft/world/dimension/Dimension;isFogThick(II)Z"
|
||||||
|
))
|
||||||
|
private boolean isReallyThick(Dimension dimension, int x, int z)
|
||||||
|
{
|
||||||
|
if (CarpetSettings.fogOff) return false;
|
||||||
|
return dimension.isFogThick(x, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -168,7 +168,8 @@
|
|||||||
"PlayerListHudMixin",
|
"PlayerListHudMixin",
|
||||||
"PistonBlockEntityRenderer_movableTEMixin",
|
"PistonBlockEntityRenderer_movableTEMixin",
|
||||||
"ClientPlayNetworkHandler_smoothClientAnimationsMixin",
|
"ClientPlayNetworkHandler_smoothClientAnimationsMixin",
|
||||||
"ClientPlayerEntity_clientCommandMixin"
|
"ClientPlayerEntity_clientCommandMixin",
|
||||||
|
"WorldRenderer_fogOffMixin"
|
||||||
],
|
],
|
||||||
"server": [
|
"server": [
|
||||||
"MinecraftDedicatedServerMixin"
|
"MinecraftDedicatedServerMixin"
|
||||||
|
|||||||
Reference in new issue
Block a user