Skip to content

Commit 097fc00

Browse files
committed
Fix crash with Pehkui
1 parent 037cb0a commit 097fc00

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/main/java/cc/cassian/raspberry/mixin/minecraft/MobRendererMixin.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ of this software and associated documentation files (the "Software"), to deal
2525
package cc.cassian.raspberry.mixin.minecraft;
2626

2727
import com.mojang.blaze3d.vertex.PoseStack;
28-
2928
import net.minecraft.client.renderer.MultiBufferSource;
3029
import net.minecraft.client.renderer.entity.MobRenderer;
31-
import net.minecraft.world.entity.Entity;
3230
import net.minecraft.world.entity.Mob;
3331
import org.spongepowered.asm.mixin.Mixin;
3432
import org.spongepowered.asm.mixin.injection.At;
@@ -37,13 +35,15 @@ of this software and associated documentation files (the "Software"), to deal
3735

3836
@Mixin(MobRenderer.class)
3937
public abstract class MobRendererMixin<T extends Mob> extends EntityRendererMixin<T> {
40-
4138
@Inject(
42-
method = "renderLeash",
43-
at = @At("HEAD"),
44-
cancellable = true
39+
method = "render(Lnet/minecraft/world/entity/Mob;FFLcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;I)V",
40+
at = @At(
41+
value = "INVOKE",
42+
target = "Lnet/minecraft/client/renderer/entity/MobRenderer;renderLeash(Lnet/minecraft/world/entity/Mob;FLcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;Lnet/minecraft/world/entity/Entity;)V"
43+
),
44+
cancellable = true
4545
)
46-
private void raspberry$cancelVanillaLeash(T mob, float partialTick, PoseStack poseStack, MultiBufferSource buffer, Entity holder, CallbackInfo ci) {
46+
private void onRenderLeash(T entity, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource buffer, int packedLight, CallbackInfo ci) {
4747
ci.cancel();
4848
}
4949
}

0 commit comments

Comments
 (0)