mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
best feature since a while
This commit is contained in:
parent
b386edc8a3
commit
5d16396279
5 changed files with 72 additions and 1 deletions
|
@ -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)
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
23
src/main/java/net/shadow/client/mixin/CameraMixin.java
Normal file
23
src/main/java/net/shadow/client/mixin/CameraMixin.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,6 +14,7 @@
|
||||||
"BlockMixin",
|
"BlockMixin",
|
||||||
"BlockRenderManagerMixin",
|
"BlockRenderManagerMixin",
|
||||||
"ButtonWidgetMixin",
|
"ButtonWidgetMixin",
|
||||||
|
"CameraMixin",
|
||||||
"ClientConnection1Mixin",
|
"ClientConnection1Mixin",
|
||||||
"ClientConnectionMixin",
|
"ClientConnectionMixin",
|
||||||
"ClientPlayerEntityMixin",
|
"ClientPlayerEntityMixin",
|
||||||
|
|
Loading…
Reference in a new issue