top.hendrixshen.magiclib.event.render.mixin.MixinEntityRenderer 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_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