Skip to content

Commit 440e171

Browse files
committed
no render mixin fixes
1 parent e81c6ff commit 440e171

15 files changed

+153
-121
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,8 @@
1717

1818
package com.lambda.mixin.render;
1919

20-
import com.lambda.util.DebugInfoHud;
2120
import net.minecraft.client.gui.hud.DebugHud;
2221
import org.spongepowered.asm.mixin.Mixin;
23-
import org.spongepowered.asm.mixin.injection.At;
24-
import org.spongepowered.asm.mixin.injection.Inject;
25-
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
26-
27-
import java.util.List;
2822

2923
@Mixin(DebugHud.class)
3024
public class DebugHudMixin {

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

Lines changed: 0 additions & 60 deletions
This file was deleted.

src/main/java/com/lambda/mixin/render/blockEntity/AbstractSignBlockEntityRendererMixin.java renamed to src/main/java/com/lambda/mixin/render/blockentity/AbstractSignBlockEntityRendererMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18-
package com.lambda.mixin.render.blockEntity;
18+
package com.lambda.mixin.render.blockentity;
1919

2020
import com.lambda.module.modules.render.NoRender;
2121
import net.minecraft.client.render.block.entity.AbstractSignBlockEntityRenderer;

src/main/java/com/lambda/mixin/render/blockEntity/BeaconBlockEntityRendererMixin.java renamed to src/main/java/com/lambda/mixin/render/blockentity/BeaconBlockEntityRendererMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18-
package com.lambda.mixin.render.blockEntity;
18+
package com.lambda.mixin.render.blockentity;
1919

2020
import com.lambda.module.modules.render.NoRender;
2121
import net.minecraft.client.render.block.entity.BeaconBlockEntityRenderer;

src/main/java/com/lambda/mixin/render/blockEntity/BlockEntityRenderDispatcherMixin.java renamed to src/main/java/com/lambda/mixin/render/blockentity/BlockEntityRenderDispatcherMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18-
package com.lambda.mixin.render.blockEntity;
18+
package com.lambda.mixin.render.blockentity;
1919

2020
import com.lambda.module.modules.render.NoRender;
2121
import net.minecraft.block.entity.BlockEntity;

src/main/java/com/lambda/mixin/render/blockEntity/EnchantingTableBlockEntityRendererMixin.java renamed to src/main/java/com/lambda/mixin/render/blockentity/EnchantingTableBlockEntityRendererMixin.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18-
package com.lambda.mixin.render.blockEntity;
18+
package com.lambda.mixin.render.blockentity;
1919

2020
import com.lambda.module.modules.render.NoRender;
2121
import net.minecraft.client.render.block.entity.EnchantingTableBlockEntityRenderer;
@@ -30,8 +30,8 @@
3030

3131
@Mixin(EnchantingTableBlockEntityRenderer.class)
3232
public class EnchantingTableBlockEntityRendererMixin {
33-
// @WrapWithCondition(method = "render(Lnet/minecraft/block/entity/EnchantingTableBlockEntity;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/util/math/Vec3d;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/model/BookModel;render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;II)V"))
34-
// private boolean wrapRender(BookModel instance, MatrixStack matrixStack, VertexConsumer vertexConsumer, int i, int j) {
35-
// return NoRender.INSTANCE.isDisabled() || !NoRender.getNoEnchantingTableBook();
36-
// }
33+
@Inject(method = "render(Lnet/minecraft/client/render/block/entity/state/EnchantingTableBlockEntityRenderState;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/command/OrderedRenderCommandQueue;Lnet/minecraft/client/render/state/CameraRenderState;)V", at = @At("HEAD"), cancellable = true)
34+
private void injectRender(EnchantingTableBlockEntityRenderState renderState, MatrixStack matrices, OrderedRenderCommandQueue queue, CameraRenderState cameraRenderState, CallbackInfo ci) {
35+
if (NoRender.INSTANCE.isEnabled() && NoRender.getNoEnchantingTableBook()) ci.cancel();
36+
}
3737
}

src/main/java/com/lambda/mixin/render/blockEntity/MobSpawnerBlockEntityRendererMixin.java renamed to src/main/java/com/lambda/mixin/render/blockentity/MobSpawnerBlockEntityRendererMixin.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,15 @@
1515
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18-
package com.lambda.mixin.render.blockEntity;
18+
package com.lambda.mixin.render.blockentity;
1919

2020
import com.lambda.module.modules.render.NoRender;
21-
import net.minecraft.block.entity.MobSpawnerBlockEntity;
22-
import net.minecraft.client.render.VertexConsumerProvider;
2321
import net.minecraft.client.render.block.entity.MobSpawnerBlockEntityRenderer;
2422
import net.minecraft.client.render.command.OrderedRenderCommandQueue;
2523
import net.minecraft.client.render.entity.EntityRenderManager;
2624
import net.minecraft.client.render.entity.state.EntityRenderState;
2725
import net.minecraft.client.render.state.CameraRenderState;
2826
import net.minecraft.client.util.math.MatrixStack;
29-
import net.minecraft.util.math.Vec3d;
3027
import org.spongepowered.asm.mixin.Mixin;
3128
import org.spongepowered.asm.mixin.injection.At;
3229
import org.spongepowered.asm.mixin.injection.Inject;
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.particle;
19+
20+
import com.lambda.module.modules.render.NoRender;
21+
import net.minecraft.client.particle.BillboardParticle;
22+
import net.minecraft.client.particle.BillboardParticleSubmittable;
23+
import net.minecraft.client.particle.Particle;
24+
import net.minecraft.client.render.Camera;
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(BillboardParticle.class)
31+
public class BillboardParticleMixin {
32+
@Inject(method = "render(Lnet/minecraft/client/particle/BillboardParticleSubmittable;Lnet/minecraft/client/render/Camera;F)V", at = @At("HEAD"), cancellable = true)
33+
private void injectRender(BillboardParticleSubmittable submittable, Camera camera, float tickDelta, CallbackInfo ci) {
34+
if (NoRender.shouldOmitParticle((Particle) ((Object) this))) ci.cancel();
35+
}
36+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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.particle;
19+
20+
import com.lambda.module.modules.render.NoRender;
21+
import net.minecraft.client.particle.ElderGuardianParticle;
22+
import net.minecraft.client.particle.ElderGuardianParticleRenderer;
23+
import net.minecraft.client.particle.NoRenderParticleRenderer;
24+
import net.minecraft.client.render.Camera;
25+
import net.minecraft.client.render.Frustum;
26+
import net.minecraft.client.render.Submittable;
27+
import org.spongepowered.asm.mixin.Mixin;
28+
import org.spongepowered.asm.mixin.injection.At;
29+
import org.spongepowered.asm.mixin.injection.Inject;
30+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
31+
32+
@Mixin(ElderGuardianParticleRenderer.class)
33+
public class ElderGuardianParticleRendererMixin {
34+
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
35+
private void injectRender(Frustum frustum, Camera camera, float tickProgress, CallbackInfoReturnable<Submittable> cir) {
36+
if (NoRender.shouldOmitParticle(ElderGuardianParticle.class)) cir.setReturnValue(NoRenderParticleRenderer.EMPTY);
37+
}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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.particle;
19+
20+
import com.lambda.module.modules.render.NoRender;
21+
import net.minecraft.client.particle.ItemPickupParticle;
22+
import net.minecraft.client.particle.ItemPickupParticleRenderer;
23+
import net.minecraft.client.particle.NoRenderParticleRenderer;
24+
import net.minecraft.client.render.Camera;
25+
import net.minecraft.client.render.Frustum;
26+
import net.minecraft.client.render.Submittable;
27+
import org.spongepowered.asm.mixin.Mixin;
28+
import org.spongepowered.asm.mixin.injection.At;
29+
import org.spongepowered.asm.mixin.injection.Inject;
30+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
31+
32+
@Mixin(ItemPickupParticleRenderer.class)
33+
public class ItemPickupParticleRendererMixin {
34+
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
35+
private void injectRender(Frustum frustum, Camera camera, float tickProgress, CallbackInfoReturnable<Submittable> cir) {
36+
if (NoRender.shouldOmitParticle(ItemPickupParticle.class)) cir.setReturnValue(NoRenderParticleRenderer.EMPTY);
37+
}
38+
}

0 commit comments

Comments
 (0)