package net.saltymc.eaa.mixin; import net.minecraft.client.gui.hud.InGameHud; import net.minecraft.client.gui.hud.PlayerListHud; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.scoreboard.Scoreboard; import net.minecraft.scoreboard.ScoreboardObjective; import net.saltymc.eaa.custom.ping.CustomPlayerListHud; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; /** * By: https://github.com/vladmarica/better-ping-display-fabric/ */ @Mixin(InGameHud.class) abstract class InGameHudMixin { @Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/PlayerListHud;render(Lnet/minecraft/client/util/math/MatrixStack;ILnet/minecraft/scoreboard/Scoreboard;Lnet/minecraft/scoreboard/ScoreboardObjective;)V")) private void render(PlayerListHud hud, MatrixStack stack, int width, Scoreboard scoreboard, ScoreboardObjective objective) { CustomPlayerListHud.render(hud, stack, width, scoreboard, objective); } }