package b; import defpackage.*; import net.minecraft.client.gui.GuiGraphicsExtractor; import net.minecraft.client.gui.Hud; import net.minecraft.world.entity.player.Player; 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; @Mixin(Hud.class) public abstract class bi { private static final String FOOD_ACTION = "food bar indication"; private static final String HEALTH_ACTION = "food heal preview"; @Inject(method = "extractFood(Lnet/minecraft/client/gui/GuiGraphicsExtractor;Lnet/minecraft/world/entity/player/Player;II)V", at = @At("RETURN")) private void drawFoodIndication(GuiGraphicsExtractor context, Player player, int top, int right, CallbackInfo ci) { if (uy.INSTANCE.isEnabled()) { id.run(Cif.RENDER, "food bar indication", () -> uy.INSTANCE.renderFoodOverlay(context, player, top, right)); } } @Inject(method = "extractHearts(Lnet/minecraft/client/gui/GuiGraphicsExtractor;Lnet/minecraft/world/entity/player/Player;IIIIFIIIZ)V", at = @At("RETURN")) private void drawHealPreview( GuiGraphicsExtractor context, Player player, int left, int top, int lineHeight, int regenIndex, float maxHealth, int currentHealth, int displayHealth, int absorption, boolean blink, CallbackInfo ci ) { if (uy.INSTANCE.isEnabled()) { id.run(Cif.RENDER, "food heal preview", () -> uy.INSTANCE.renderHealthPreview(context, player, left, top, lineHeight, maxHealth, currentHealth)); } } }