|
18 | 18 |
|
19 | 19 | package gg.skytils.skytilsmod.mixins.transformers.renderer; |
20 | 20 |
|
| 21 | +import com.llamalad7.mixinextras.injector.wrapmethod.WrapMethod; |
| 22 | +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; |
21 | 23 | import gg.skytils.skytilsmod.features.impl.dungeons.MasterMode7Features; |
22 | | -import net.minecraft.client.render.entity.feature.EnderDragonDeathFeatureRenderer; |
23 | | -import net.minecraft.class_995; |
24 | | -import net.minecraft.entity.boss.dragon.EnderDragonEntity; |
| 24 | +import net.minecraft.client.render.VertexConsumer; |
| 25 | +import net.minecraft.client.render.entity.EnderDragonEntityRenderer; |
| 26 | +import net.minecraft.client.util.math.MatrixStack; |
25 | 27 | 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 | 28 |
|
30 | | -@Mixin(EnderDragonDeathFeatureRenderer.class) |
31 | | -public abstract class MixinLayerEnderDragonDeath implements class_995<EnderDragonEntity> { |
32 | | - @Inject(method = "method_4199(Lnet/minecraft/entity/boss/dragon/EnderDragonEntity;FFFFFFF)V", at = @At(value = "HEAD"), cancellable = true) |
33 | | - private void onRenderDragonDeath(EnderDragonEntity entitylivingbaseIn, float f, float g, float partialTicks, float h, float i, float j, float scale, CallbackInfo ci) { |
34 | | - if (MasterMode7Features.INSTANCE.shouldHideDragonDeath()) ci.cancel(); |
| 29 | +@Mixin(EnderDragonEntityRenderer.class) |
| 30 | +public abstract class MixinLayerEnderDragonDeath { |
| 31 | + @WrapMethod(method = "renderDeathAnimation") |
| 32 | + private static void onRenderDragonDeath(MatrixStack matrices, float animationProgress, VertexConsumer vertexConsumer, Operation<Void> original) { |
| 33 | + if (MasterMode7Features.INSTANCE.shouldHideDragonDeath()) return; |
| 34 | + |
| 35 | + original.call(matrices, animationProgress, vertexConsumer); |
35 | 36 | } |
36 | 37 | } |
0 commit comments