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

top.hendrixshen.magiclib.event.render.mixin.MixinGameRenderer 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_310;
import net.minecraft.class_757;
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;
import top.hendrixshen.magiclib.util.MiscUtil;

/**
 * The implementation for mc [1.14.4, ~)
 */
@Environment(EnvType.CLIENT)
@Mixin(class_757.class)
public class MixinGameRenderer {
    @Inject(
            method = "render(FJ)V",
            at = @At(
                    value = "CONSTANT",
                    args = "stringValue=hand"
            )
    )
    private void postRenderLevel(float tickDelta, long endTime, CallbackInfo ci) {
        RenderEventHandler.getInstance().dispatchPostRenderLevelEvent(MiscUtil.cast(class_310.method_1551().field_1687), new PoseStack(), tickDelta);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy