Skip to content

Commit f6f6227

Browse files
committed
more no render setting implementations and commented out options not done yet
1 parent dae4318 commit f6f6227

File tree

12 files changed

+229
-9
lines changed

12 files changed

+229
-9
lines changed

src/main/java/com/lambda/mixin/entity/EntityMixin.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
import com.lambda.event.events.EntityEvent;
2323
import com.lambda.event.events.PlayerEvent;
2424
import com.lambda.interaction.request.rotating.RotationManager;
25+
import com.lambda.module.modules.render.NoRender;
2526
import com.lambda.util.math.Vec2d;
27+
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
2628
import net.minecraft.entity.Entity;
2729
import net.minecraft.entity.MovementType;
2830
import net.minecraft.entity.data.TrackedData;
@@ -130,4 +132,14 @@ public void onTrackedDataSet(TrackedData<?> data, CallbackInfo ci) {
130132
Entity entity = (Entity) (Object) this;
131133
EventFlow.post(new EntityEvent.Update(entity, data));
132134
}
135+
136+
@ModifyExpressionValue(method = "isInvisible", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;getFlag(I)Z"))
137+
private boolean modifyGetFlagInvisible(boolean original) {
138+
return (NoRender.INSTANCE.isDisabled() || !NoRender.getNoInvisibility()) && original;
139+
}
140+
141+
@ModifyExpressionValue(method = "isGlowing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;getFlag(I)Z"))
142+
private boolean modifyGetFlagGlowing(boolean original) {
143+
return (NoRender.INSTANCE.isDisabled() || !NoRender.getNoGlow()) && original;
144+
}
133145
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright 2025 Lambda
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
package com.lambda.mixin.render;
19+
20+
import com.lambda.module.modules.render.NoRender;
21+
import net.minecraft.client.render.VertexConsumerProvider;
22+
import net.minecraft.client.render.entity.feature.ArmorFeatureRenderer;
23+
import net.minecraft.client.render.entity.state.BipedEntityRenderState;
24+
import net.minecraft.client.util.math.MatrixStack;
25+
import org.spongepowered.asm.mixin.Mixin;
26+
import org.spongepowered.asm.mixin.injection.At;
27+
import org.spongepowered.asm.mixin.injection.Inject;
28+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
29+
30+
@Mixin(ArmorFeatureRenderer.class)
31+
public class ArmorFeatureRendererMixin {
32+
@Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/render/entity/state/BipedEntityRenderState;FF)V", at = @At("HEAD"), cancellable = true)
33+
private void injectRender(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, BipedEntityRenderState bipedEntityRenderState, float f, float g, CallbackInfo ci) {
34+
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoArmor()) ci.cancel();
35+
}
36+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2025 Lambda
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
package com.lambda.mixin.render;
19+
20+
import com.lambda.module.modules.render.NoRender;
21+
import net.minecraft.block.entity.BlockEntity;
22+
import net.minecraft.client.render.VertexConsumerProvider;
23+
import net.minecraft.client.render.block.entity.BeaconBlockEntityRenderer;
24+
import net.minecraft.client.util.math.MatrixStack;
25+
import net.minecraft.util.math.Vec3d;
26+
import org.spongepowered.asm.mixin.Mixin;
27+
import org.spongepowered.asm.mixin.injection.At;
28+
import org.spongepowered.asm.mixin.injection.Inject;
29+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
30+
31+
@Mixin(BeaconBlockEntityRenderer.class)
32+
public class BeaconBlockEntityRendererMixin {
33+
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
34+
private void injectRender(BlockEntity entity, float tickProgress, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, Vec3d cameraPos, CallbackInfo ci) {
35+
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoBeaconBeams()) ci.cancel();
36+
}
37+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright 2025 Lambda
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
package com.lambda.mixin.render;
19+
20+
import com.lambda.module.modules.render.NoRender;
21+
import net.minecraft.client.gui.DrawContext;
22+
import net.minecraft.client.gui.hud.BossBarHud;
23+
import org.spongepowered.asm.mixin.Mixin;
24+
import org.spongepowered.asm.mixin.injection.At;
25+
import org.spongepowered.asm.mixin.injection.Inject;
26+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
27+
28+
@Mixin(BossBarHud.class)
29+
public class BossBarHudMixin {
30+
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
31+
private void injectRender(DrawContext context, CallbackInfo ci) {
32+
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoBossBar()) ci.cancel();
33+
}
34+
}

src/main/java/com/lambda/mixin/render/ElytraFeatureRendererMixin.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@
1717

1818
package com.lambda.mixin.render;
1919

20+
import com.lambda.module.modules.render.NoRender;
2021
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
22+
import net.minecraft.client.render.VertexConsumerProvider;
2123
import net.minecraft.client.render.entity.feature.ElytraFeatureRenderer;
2224
import net.minecraft.client.render.entity.state.BipedEntityRenderState;
25+
import net.minecraft.client.util.math.MatrixStack;
2326
import net.minecraft.entity.LivingEntity;
2427
import net.minecraft.util.Identifier;
2528
import org.spongepowered.asm.mixin.Mixin;
2629
import org.spongepowered.asm.mixin.injection.At;
30+
import org.spongepowered.asm.mixin.injection.Inject;
31+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
2732

2833
@Mixin(ElytraFeatureRenderer.class)
2934
public class ElytraFeatureRendererMixin<T extends LivingEntity> {
@@ -40,4 +45,9 @@ private static Identifier getTexture(Identifier original, BipedEntityRenderState
4045

4146
return original;
4247
}
48+
49+
@Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/render/entity/state/BipedEntityRenderState;FF)V", at = @At("HEAD"), cancellable = true)
50+
private void injectRender(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, BipedEntityRenderState bipedEntityRenderState, float f, float g, CallbackInfo ci) {
51+
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoArmor() && NoRender.getIncludeNoElytra()) ci.cancel();
52+
}
4353
}

src/main/java/com/lambda/mixin/render/EntityRendererMixin.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@
1919

2020
import com.lambda.module.modules.render.NoRender;
2121
import net.minecraft.client.render.Frustum;
22+
import net.minecraft.client.render.VertexConsumerProvider;
2223
import net.minecraft.client.render.entity.EntityRenderer;
24+
import net.minecraft.client.render.entity.state.EntityRenderState;
25+
import net.minecraft.client.util.math.MatrixStack;
2326
import net.minecraft.entity.Entity;
27+
import net.minecraft.text.Text;
2428
import org.spongepowered.asm.mixin.Mixin;
2529
import org.spongepowered.asm.mixin.injection.At;
2630
import org.spongepowered.asm.mixin.injection.Inject;
31+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
2732
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
2833

2934
@Mixin(EntityRenderer.class)
@@ -32,4 +37,9 @@ public class EntityRendererMixin {
3237
private void injectShouldRender(Entity entity, Frustum frustum, double x, double y, double z, CallbackInfoReturnable<Boolean> cir) {
3338
if (NoRender.shouldOmitEntity(entity)) cir.cancel();
3439
}
40+
41+
@Inject(method = "renderLabelIfPresent", at = @At("HEAD"), cancellable = true)
42+
private void injectRenderLabelIfPresent(EntityRenderState state, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
43+
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoNametags()) ci.cancel();
44+
}
3545
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright 2025 Lambda
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
package com.lambda.mixin.render;
19+
20+
import com.lambda.module.modules.render.NoRender;
21+
import net.minecraft.client.render.VertexConsumerProvider;
22+
import net.minecraft.client.render.entity.feature.HeadFeatureRenderer;
23+
import net.minecraft.client.render.entity.state.LivingEntityRenderState;
24+
import net.minecraft.client.util.math.MatrixStack;
25+
import org.spongepowered.asm.mixin.Mixin;
26+
import org.spongepowered.asm.mixin.injection.At;
27+
import org.spongepowered.asm.mixin.injection.Inject;
28+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
29+
30+
@Mixin(HeadFeatureRenderer.class)
31+
public class HeadFeatureRendererMixin {
32+
@Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/render/entity/state/LivingEntityRenderState;FF)V", at = @At("HEAD"), cancellable = true)
33+
private void injectRender(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, LivingEntityRenderState livingEntityRenderState, float f, float g, CallbackInfo ci) {
34+
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoArmor() && NoRender.getIncludeNoOtherHeadItems()) ci.cancel();
35+
}
36+
}

src/main/java/com/lambda/mixin/render/LivingEntityRendererMixin.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
2424
import net.minecraft.client.render.entity.LivingEntityRenderer;
2525
import net.minecraft.entity.LivingEntity;
26-
import org.jetbrains.annotations.Nullable;
2726
import org.spongepowered.asm.mixin.Mixin;
2827
import org.spongepowered.asm.mixin.injection.At;
2928

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2025 Lambda
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
package com.lambda.mixin.render;
19+
20+
import com.lambda.module.modules.render.NoRender;
21+
import net.minecraft.block.entity.MobSpawnerBlockEntity;
22+
import net.minecraft.client.render.VertexConsumerProvider;
23+
import net.minecraft.client.render.block.entity.MobSpawnerBlockEntityRenderer;
24+
import net.minecraft.client.util.math.MatrixStack;
25+
import net.minecraft.util.math.Vec3d;
26+
import org.spongepowered.asm.mixin.Mixin;
27+
import org.spongepowered.asm.mixin.injection.At;
28+
import org.spongepowered.asm.mixin.injection.Inject;
29+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
30+
31+
@Mixin(MobSpawnerBlockEntityRenderer.class)
32+
public class MobSpawnerBlockEntityRendererMixin {
33+
@Inject(method = "render(Lnet/minecraft/block/entity/MobSpawnerBlockEntity;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/util/math/Vec3d;)V", at = @At("HEAD"), cancellable = true)
34+
private void injectRender(MobSpawnerBlockEntity mobSpawnerBlockEntity, float f, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, int j, Vec3d vec3d, CallbackInfo ci) {
35+
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoSpawnerMob()) ci.cancel();
36+
}
37+
}

src/main/java/com/lambda/mixin/world/ClientWorldMixin.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import com.lambda.event.events.EntityEvent;
2222
import com.lambda.event.events.WorldEvent;
2323
import com.lambda.module.modules.render.WorldColors;
24-
import com.lambda.util.math.ColorKt;
2524
import net.minecraft.block.BlockState;
2625
import net.minecraft.client.world.ClientWorld;
2726
import net.minecraft.entity.Entity;

0 commit comments

Comments
 (0)