best feature since a while

This commit is contained in:
0x3C50 2022-03-15 19:59:07 +01:00
parent b386edc8a3
commit 5d16396279
5 changed files with 72 additions and 1 deletions

View file

@ -34,7 +34,6 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.22' annotationProcessor 'org.projectlombok:lombok:1.18.22'
impl(name: "xauthlib-1.0.0") impl(name: "xauthlib-1.0.0")
impl("org.java-websocket:Java-WebSocket:1.5.2")
configurations.impl.dependencies.each { configurations.impl.dependencies.each {
implementation(it) implementation(it)

View file

@ -120,6 +120,7 @@ public class ModuleRegistry {
modules.add(new Theme()); modules.add(new Theme());
modules.add(new AntiCrash()); modules.add(new AntiCrash());
modules.add(new ClientSettings()); modules.add(new ClientSettings());
modules.add(new NoLiquidFog());
} }
public static List<Module> getModules() { public static List<Module> getModules() {

View file

@ -0,0 +1,47 @@
/*
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
*/
package net.shadow.client.feature.module.impl.render;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.minecraft.client.util.math.MatrixStack;
public class NoLiquidFog extends Module {
public static NoLiquidFog INSTANCE;
public NoLiquidFog() {
super("NoLiquidFog", "Removes the fogging effects of when you're in water or lava", ModuleType.RENDER);
INSTANCE = this;
}
@Override
public void tick() {
}
@Override
public void enable() {
}
@Override
public void disable() {
}
@Override
public String getContext() {
return null;
}
@Override
public void onWorldRender(MatrixStack matrices) {
}
@Override
public void onHudRender() {
}
}

View file

@ -0,0 +1,23 @@
/*
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
*/
package net.shadow.client.mixin;
import net.minecraft.client.render.Camera;
import net.minecraft.client.render.CameraSubmersionType;
import net.shadow.client.feature.module.impl.render.NoLiquidFog;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(Camera.class)
public class CameraMixin {
@Inject(method="getSubmersionType",at=@At("RETURN"),cancellable = true)
void pretendEverythingsFine(CallbackInfoReturnable<CameraSubmersionType> cir) {
if (NoLiquidFog.INSTANCE != null && NoLiquidFog.INSTANCE.isEnabled() && (cir.getReturnValue() == CameraSubmersionType.WATER || cir.getReturnValue() == CameraSubmersionType.LAVA)) {
cir.setReturnValue(CameraSubmersionType.NONE);
}
}
}

View file

@ -14,6 +14,7 @@
"BlockMixin", "BlockMixin",
"BlockRenderManagerMixin", "BlockRenderManagerMixin",
"ButtonWidgetMixin", "ButtonWidgetMixin",
"CameraMixin",
"ClientConnection1Mixin", "ClientConnection1Mixin",
"ClientConnectionMixin", "ClientConnectionMixin",
"ClientPlayerEntityMixin", "ClientPlayerEntityMixin",