Merge branch 'master' into 1.16
This commit is contained in:
commit
c283fddd38
3 files changed
+32
-1
No files matched your search
@@ -576,4 +576,11 @@ public class CarpetSettings
|
||||
category = CREATIVE
|
||||
)
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -169,7 +169,8 @@
|
||||
"PlayerListHudMixin",
|
||||
"PistonBlockEntityRenderer_movableTEMixin",
|
||||
"ClientPlayNetworkHandler_smoothClientAnimationsMixin",
|
||||
"ClientPlayerEntity_clientCommandMixin"
|
||||
"ClientPlayerEntity_clientCommandMixin",
|
||||
"WorldRenderer_fogOffMixin"
|
||||
],
|
||||
"server": [
|
||||
"MinecraftDedicatedServerMixin"
|
||||
|
||||
Reference in new issue
Block a user