/*
 * Derived from Epic Fight (https://github.com/Epic-Fight/epicfight)
 * by the Epic Fight Team, licensed under GPLv3.
 * Modifications © 2026 TiedUp! Remake Contributors, distributed under GPLv3.
 */

package com.tiedup.remake.rig.mixin.client;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;

import com.mojang.blaze3d.vertex.PoseStack;

import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.Entity;

/**
 * Expose les méthodes protected {@code shouldShowName(Entity)} et
 * {@code renderNameTag(...)} de {@link EntityRenderer} pour que
 * {@link com.tiedup.remake.rig.render.PatchedEntityRenderer#render}
 * puisse rendre le nameplate sans les hard-coder.
 *
 * <p>Pure @Invoker mixin — pas de logique injectée, équivalent EF de
 * {@code yesman.epicfight.mixin.client.MixinEntityRenderer}.</p>
 */
@Mixin(value = EntityRenderer.class)
public interface MixinEntityRenderer {

	@Invoker("shouldShowName")
	boolean invokeShouldShowName(Entity entity);

	@Invoker("renderNameTag")
	void invokeRenderNameTag(Entity entity, Component name, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight);
}
