Skip to content

Commit

Permalink
Scoreboard hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
May2Beez committed Mar 18, 2024
1 parent 005a8fe commit e84c11d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
mcVersion=1.8.9
modid=farmhelperv2
modName=FarmHelper
version=2.5.1
version=2.5.2
shouldRelease=true
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.jelly.farmhelperv2.mixin.gui;

import com.jelly.farmhelperv2.event.UpdateScoreboardLineEvent;
import com.jelly.farmhelperv2.util.LogUtils;
import net.minecraft.client.gui.GuiIngame;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.scoreboard.Score;
Expand All @@ -19,7 +20,7 @@
import java.util.HashMap;
import java.util.Map;

@Mixin(value = GuiIngame.class, priority = Integer.MAX_VALUE)
@Mixin(GuiIngame.class)
public class MixinGuiIngame {

@Unique
Expand All @@ -36,6 +37,7 @@ private void renderScoreboard(ScoreObjective objective, ScaledResolution scaledR
ScorePlayerTeam scorePlayerTeam = scoreboard.getPlayersTeam(score.getPlayerName());
String string = ScorePlayerTeam.formatPlayerName(scorePlayerTeam, score.getPlayerName());
String clean = farmHelperV2$cleanSB(string);
LogUtils.sendDebug(clean);
if (!clean.equals(farmHelperV2$cachedScoreboard.get(index)) || !farmHelperV2$cachedScoreboard.containsKey(index)) {
farmHelperV2$cachedScoreboard.put(index, clean);
MinecraftForge.EVENT_BUS.post(new UpdateScoreboardLineEvent(clean));
Expand Down

0 comments on commit e84c11d

Please sign in to comment.