Skip to content

Commit 1db3d77

Browse files
committed
Added Fullbright
1 parent 8a5fef6 commit 1db3d77

File tree

5 files changed

+63
-1
lines changed

5 files changed

+63
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.lambda.mixin.render;
2+
3+
import com.lambda.module.modules.render.Fullbright;
4+
import com.lambda.module.modules.render.NoRender;
5+
import com.lambda.module.modules.render.XRay;
6+
import net.minecraft.client.render.LightmapTextureManager;
7+
import org.spongepowered.asm.mixin.Mixin;
8+
import org.spongepowered.asm.mixin.injection.At;
9+
import org.spongepowered.asm.mixin.injection.Inject;
10+
import org.spongepowered.asm.mixin.injection.ModifyArgs;
11+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
12+
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
13+
14+
@Mixin(LightmapTextureManager.class)
15+
public class LightmapTextureManagerMixin {
16+
@ModifyArgs(method = "update", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/texture/NativeImage;setColor(III)V"))
17+
private void updateModify(Args args) {
18+
if (Fullbright.INSTANCE.isEnabled() || XRay.INSTANCE.isEnabled()) {
19+
args.set(2, 0xFFFFFFFF);
20+
}
21+
}
22+
23+
@Inject(method = "getDarknessFactor(F)F", at = @At("HEAD"), cancellable = true)
24+
private void getDarknessFactor(float tickDelta, CallbackInfoReturnable<Float> info) {
25+
if (NoRender.getNoDarkness()) info.setReturnValue(0.0f);
26+
}
27+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.lambda.module.modules.render
2+
3+
import com.lambda.module.Module
4+
import com.lambda.module.tag.ModuleTag
5+
6+
object Fullbright : Module(
7+
name = "Fullbright",
8+
description = "Makes everything brighter",
9+
defaultTags = setOf(ModuleTag.RENDER)
10+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.lambda.module.modules.render
2+
3+
import com.lambda.module.Module
4+
import com.lambda.module.tag.ModuleTag
5+
6+
object NoRender : Module(
7+
name = "NoRender",
8+
description = "Disables rendering of certain things",
9+
defaultTags = setOf(ModuleTag.RENDER)
10+
) {
11+
@JvmStatic val noDarkness by setting("No Darkness", true)
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.lambda.module.modules.render
2+
3+
import com.lambda.module.Module
4+
import com.lambda.module.tag.ModuleTag
5+
6+
object XRay : Module(
7+
name = "XRay",
8+
description = "Allows you to see ores through walls",
9+
defaultTags = setOf(ModuleTag.RENDER)
10+
) {
11+
12+
}

common/src/main/resources/lambda.mixins.common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"client": [
77
"ClientConnectionMixin",
88
"MinecraftClientMixin",
9-
"baritone.MixinLookBehavior",
109
"baritone.MixinBaritonePlayerContext",
10+
"baritone.MixinLookBehavior",
1111
"entity.ClientPlayerEntityMixin",
1212
"entity.EntityMixin",
1313
"entity.LivingEntityMixin",
@@ -20,6 +20,7 @@
2020
"render.ChatScreenMixin",
2121
"render.DebugHudMixin",
2222
"render.GameRendererMixin",
23+
"render.LightmapTextureManagerMixin",
2324
"render.RenderTickCounterMixin",
2425
"render.WorldRendererMixin"
2526
],

0 commit comments

Comments
 (0)