All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.hendrixshen.magiclib.event.render.mixin.MixinEntityRenderer Maven / Gradle / Ivy

There is a newer version: 0.7.398+fe2125a-beta
Show newest version
package top.hendrixshen.magiclib.event.render.mixin;

import com.mojang.blaze3d.vertex.PoseStack;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.class_1297;
import net.minecraft.class_897;
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 top.hendrixshen.magiclib.event.render.impl.RenderEventHandler;

//#if MC > 11404
//$$ import net.minecraft.client.renderer.MultiBufferSource;
//#endif

@Environment(EnvType.CLIENT)
@Mixin(class_897.class)
public class MixinEntityRenderer {
    @Inject(
            method = "render",
            at = @At(
                    value = "RETURN"
            )
    )
    //#if MC > 11404
    //$$ private void postRenderEntity(T entity, float yaw, float tickDelta, PoseStack poseStack, MultiBufferSource source, int light, CallbackInfo ci) {
    //#else
    private void postRenderEntity(T entity, double x, double y, double z, float yaw, float tickDelta, CallbackInfo ci) {
        PoseStack poseStack = new PoseStack();
    //#endif
        RenderEventHandler.getInstance().dispatchPostRenderEntityEvent(entity, poseStack, tickDelta);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy