top.hendrixshen.magiclib.event.render.mixin.MixinGameRenderer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of magiclib-1_14_4 Show documentation
Show all versions of magiclib-1_14_4 Show documentation
To beat magic with magic :(
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