Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more no render setting implementations and commented out options not …
…done yet
  • Loading branch information
beanbag44 committed Sep 20, 2025
commit f6f6227f0e7743bc5e616e1981e50e971c40d015
12 changes: 12 additions & 0 deletions src/main/java/com/lambda/mixin/entity/EntityMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import com.lambda.event.events.EntityEvent;
import com.lambda.event.events.PlayerEvent;
import com.lambda.interaction.request.rotating.RotationManager;
import com.lambda.module.modules.render.NoRender;
import com.lambda.util.math.Vec2d;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import net.minecraft.entity.Entity;
import net.minecraft.entity.MovementType;
import net.minecraft.entity.data.TrackedData;
Expand Down Expand Up @@ -130,4 +132,14 @@ public void onTrackedDataSet(TrackedData<?> data, CallbackInfo ci) {
Entity entity = (Entity) (Object) this;
EventFlow.post(new EntityEvent.Update(entity, data));
}

@ModifyExpressionValue(method = "isInvisible", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;getFlag(I)Z"))
private boolean modifyGetFlagInvisible(boolean original) {
return (NoRender.INSTANCE.isDisabled() || !NoRender.getNoInvisibility()) && original;
}

@ModifyExpressionValue(method = "isGlowing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;getFlag(I)Z"))
private boolean modifyGetFlagGlowing(boolean original) {
return (NoRender.INSTANCE.isDisabled() || !NoRender.getNoGlow()) && original;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright 2025 Lambda
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.lambda.mixin.render;

import com.lambda.module.modules.render.NoRender;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.feature.ArmorFeatureRenderer;
import net.minecraft.client.render.entity.state.BipedEntityRenderState;
import net.minecraft.client.util.math.MatrixStack;
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.CallbackInfo;

@Mixin(ArmorFeatureRenderer.class)
public class ArmorFeatureRendererMixin {
@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)
private void injectRender(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, BipedEntityRenderState bipedEntityRenderState, float f, float g, CallbackInfo ci) {
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoArmor()) ci.cancel();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2025 Lambda
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.lambda.mixin.render;

import com.lambda.module.modules.render.NoRender;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.block.entity.BeaconBlockEntityRenderer;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Vec3d;
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.CallbackInfo;

@Mixin(BeaconBlockEntityRenderer.class)
public class BeaconBlockEntityRendererMixin {
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
private void injectRender(BlockEntity entity, float tickProgress, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, Vec3d cameraPos, CallbackInfo ci) {
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoBeaconBeams()) ci.cancel();
}
}
34 changes: 34 additions & 0 deletions src/main/java/com/lambda/mixin/render/BossBarHudMixin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2025 Lambda
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.lambda.mixin.render;

import com.lambda.module.modules.render.NoRender;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.hud.BossBarHud;
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.CallbackInfo;

@Mixin(BossBarHud.class)
public class BossBarHudMixin {
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
private void injectRender(DrawContext context, CallbackInfo ci) {
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoBossBar()) ci.cancel();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@

package com.lambda.mixin.render;

import com.lambda.module.modules.render.NoRender;
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.feature.ElytraFeatureRenderer;
import net.minecraft.client.render.entity.state.BipedEntityRenderState;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.Identifier;
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.CallbackInfo;

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

return original;
}

@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)
private void injectRender(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, BipedEntityRenderState bipedEntityRenderState, float f, float g, CallbackInfo ci) {
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoArmor() && NoRender.getIncludeNoElytra()) ci.cancel();
}
}
10 changes: 10 additions & 0 deletions src/main/java/com/lambda/mixin/render/EntityRendererMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@

import com.lambda.module.modules.render.NoRender;
import net.minecraft.client.render.Frustum;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.EntityRenderer;
import net.minecraft.client.render.entity.state.EntityRenderState;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.Entity;
import net.minecraft.text.Text;
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.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(EntityRenderer.class)
Expand All @@ -32,4 +37,9 @@ public class EntityRendererMixin {
private void injectShouldRender(Entity entity, Frustum frustum, double x, double y, double z, CallbackInfoReturnable<Boolean> cir) {
if (NoRender.shouldOmitEntity(entity)) cir.cancel();
}

@Inject(method = "renderLabelIfPresent", at = @At("HEAD"), cancellable = true)
private void injectRenderLabelIfPresent(EntityRenderState state, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoNametags()) ci.cancel();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright 2025 Lambda
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.lambda.mixin.render;

import com.lambda.module.modules.render.NoRender;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.feature.HeadFeatureRenderer;
import net.minecraft.client.render.entity.state.LivingEntityRenderState;
import net.minecraft.client.util.math.MatrixStack;
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.CallbackInfo;

@Mixin(HeadFeatureRenderer.class)
public class HeadFeatureRendererMixin {
@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)
private void injectRender(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, LivingEntityRenderState livingEntityRenderState, float f, float g, CallbackInfo ci) {
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoArmor() && NoRender.getIncludeNoOtherHeadItems()) ci.cancel();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import net.minecraft.client.render.entity.LivingEntityRenderer;
import net.minecraft.entity.LivingEntity;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2025 Lambda
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.lambda.mixin.render;

import com.lambda.module.modules.render.NoRender;
import net.minecraft.block.entity.MobSpawnerBlockEntity;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.block.entity.MobSpawnerBlockEntityRenderer;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Vec3d;
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.CallbackInfo;

@Mixin(MobSpawnerBlockEntityRenderer.class)
public class MobSpawnerBlockEntityRendererMixin {
@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)
private void injectRender(MobSpawnerBlockEntity mobSpawnerBlockEntity, float f, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, int j, Vec3d vec3d, CallbackInfo ci) {
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoSpawnerMob()) ci.cancel();
}
}
1 change: 0 additions & 1 deletion src/main/java/com/lambda/mixin/world/ClientWorldMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.lambda.event.events.EntityEvent;
import com.lambda.event.events.WorldEvent;
import com.lambda.module.modules.render.WorldColors;
import com.lambda.util.math.ColorKt;
import net.minecraft.block.BlockState;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.Entity;
Expand Down
15 changes: 9 additions & 6 deletions src/main/kotlin/com/lambda/module/modules/render/NoRender.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import net.minecraft.entity.Entity
import net.minecraft.entity.SpawnGroup
import net.minecraft.entity.effect.StatusEffects

//ToDo: Implement unimplemented settings. (Keep in mind compatibility with other mods like sodium)
object NoRender : Module(
name = "NoRender",
description = "Disables rendering of certain things",
Expand Down Expand Up @@ -64,9 +65,12 @@ object NoRender : Module(
@JvmStatic val noGuiShadow by setting("No Gui Shadow", false)
@JvmStatic val noFloatingItemAnimation by setting("No Floating Item Animation", false, "Disables floating item animations, typically used when a totem pops")
@JvmStatic val noSignText by setting("No Sign Text", false)
@JvmStatic val noEnchantmentGlint by setting("No Enchantment Glint", false)
// Blehhh cba
// @JvmStatic val noEnchantmentGlint by setting("No Enchantment Glint", false)
@JvmStatic val noArmor by setting("No Armor", false)
@JvmStatic val noInvisibility by setting("No Invisibility", false)
@JvmStatic val includeNoElytra by setting("Include No Elytra", false) { noArmor }
@JvmStatic val includeNoOtherHeadItems by setting("Include No Other Head Items", false) { noArmor }
@JvmStatic val noInvisibility by setting("No Invisibility", true)
@JvmStatic val noGlow by setting("No Glow", false)
@JvmStatic val noCrosshair by setting("No Crosshair", false)
@JvmStatic val noBossBar by setting("No Boss Bar", false)
Expand All @@ -75,13 +79,12 @@ object NoRender : Module(
@JvmStatic val noWorldBorder by setting("No World Border", false)
@JvmStatic val noEnchantingTableBook by setting("No Enchanting Table Book", false)
@JvmStatic val noChatVerificationToast by setting("No Chat Verification Toast", true)
@JvmStatic val noBlockBreakingOverlay by setting("No Block Breaking Overlay", false)
// Couldn't get to work with block entities without crashing with sodium on boot
// @JvmStatic val noBlockBreakingOverlay by setting("No Block Breaking Overlay", false)
@JvmStatic val noBeaconBeams by setting("No Beacon Beams", false)
@JvmStatic val noSpawnerMob by setting("No Spawner Mob", false)
@JvmStatic val noDeadEntities by setting("No Dead Entities", false)
// @JvmStatic val noDeadEntities by setting("No Dead Entities", false)
@JvmStatic val noNametags by setting("No Nametags", false)
@JvmStatic val persistentBarriers by setting("Persistent Barriers", false)
@JvmStatic val noTextureRotations by setting("No Texture Rotations", false)
private val particles by setting("Particles", particleMap.values.toSet(), emptySet(), "Particles to omit from rendering")
private val playerEntities by setting("Player Entities", playerEntityMap.values.toSet(), emptySet(), "Player entities to omit from rendering")
private val bossEntities by setting("Boss Entities", bossEntityMap.values.toSet(), emptySet(), "Boss entities to omit from rendering")
Expand Down
9 changes: 8 additions & 1 deletion src/main/resources/lambda.mixins.common.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@
"network.LoginHelloC2SPacketMixin",
"network.LoginKeyC2SPacketMixin",
"render.AbstractSignBlockEntityRendererMixin",
"render.ArmorFeatureRendererMixin",
"render.BackgroundRendererMixin",
"render.BeaconBlockEntityRendererMixin",
"render.BlockEntityRenderDispatcherMixin",
"render.BlockRenderManagerMixin",
"render.BossBarHudMixin",
"render.CameraMixin",
"render.CapeFeatureRendererMixin",
"render.ChatHudMixin",
Expand All @@ -43,6 +46,7 @@
"render.EntityRendererMixin",
"render.GameRendererMixin",
"render.GlStateManagerMixin",
"render.HeadFeatureRendererMixin",
"render.HeldItemRendererMixin",
"render.InGameHudMixin",
"render.InGameOverlayRendererMixin",
Expand All @@ -66,5 +70,8 @@
],
"injectors": {
"defaultRequire": 1
}
},
"mixins": [
"render.MobSpawnerBlockEntityRendererMixin"
]
}