Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 1749fa0

Browse files
committed
address issues found by @DarkKronicle
1 parent 5e3eb40 commit 1749fa0

File tree

14 files changed

+28
-28
lines changed

14 files changed

+28
-28
lines changed

1.16.5/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsGame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public void renderCustomScoreboardObjective(MatrixStack matrices, String playerN
463463
color = new Color(200, 200, 200).getAsInt();
464464
} else {
465465
int health = objective.getScoreboard().getPlayerScore(playerName, objective).getScore();
466-
color = Color.blend(new Color(255, 255, 255), new Color(215, 0, 64), (int) (1 - (health / 20f) * 100)).getAsInt();
466+
color = Color.blend(new Color(255, 255, 255), new Color(215, 0, 64), (int) ((1 - (health / 20f)) * 100)).getAsInt();
467467
render = String.valueOf(health);
468468
}
469469
// Health

1.16.5/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsPlayer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525

2626
import lombok.Data;
27-
import lombok.Getter;
2827
import net.minecraft.client.MinecraftClient;
2928
import net.minecraft.client.network.PlayerListEntry;
3029

@@ -36,7 +35,6 @@
3635
public class BedwarsPlayer {
3736

3837
private final BedwarsTeam team;
39-
@Getter
4038
private PlayerListEntry profile;
4139
private boolean alive = true;
4240
private boolean disconnected = false;
@@ -94,7 +92,9 @@ public void tick(int currentTick) {
9492
triedStats = true;
9593
try {
9694
stats = BedwarsPlayerStats.fromAPI(profile.getProfile().getId().toString().replace("-", ""));
97-
} catch (Exception e) {
95+
} catch (Exception ignored) {
96+
}
97+
if (stats == null){
9898
stats = BedwarsPlayerStats.generateFake(profile.getProfile().getName());
9999
}
100100
}

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsGame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public void renderCustomScoreboardObjective(MatrixStack matrices, String playerN
463463
color = new Color(200, 200, 200).getAsInt();
464464
} else {
465465
int health = objective.getScoreboard().getPlayerScore(playerName, objective).getScore();
466-
color = Color.blend(new Color(255, 255, 255), new Color(215, 0, 64), (int) (1 - (health / 20f) * 100)).getAsInt();
466+
color = Color.blend(new Color(255, 255, 255), new Color(215, 0, 64), (int) ((1 - (health / 20f)) * 100)).getAsInt();
467467
render = String.valueOf(health);
468468
}
469469
// Health

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsPlayer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525

2626
import lombok.Data;
27-
import lombok.Getter;
2827
import net.minecraft.client.MinecraftClient;
2928
import net.minecraft.client.network.PlayerListEntry;
3029

@@ -36,7 +35,6 @@
3635
public class BedwarsPlayer {
3736

3837
private final BedwarsTeam team;
39-
@Getter
4038
private PlayerListEntry profile;
4139
private boolean alive = true;
4240
private boolean disconnected = false;
@@ -94,7 +92,9 @@ public void tick(int currentTick) {
9492
triedStats = true;
9593
try {
9694
stats = BedwarsPlayerStats.fromAPI(profile.getProfile().getId().toString().replace("-", ""));
97-
} catch (Exception e) {
95+
} catch (Exception ignored) {
96+
}
97+
if (stats == null){
9898
stats = BedwarsPlayerStats.generateFake(profile.getProfile().getName());
9999
}
100100
}

1.19.2/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsGame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public void renderCustomScoreboardObjective(MatrixStack matrices, String playerN
463463
color = new Color(200, 200, 200).getAsInt();
464464
} else {
465465
int health = objective.getScoreboard().getPlayerScore(playerName, objective).getScore();
466-
color = Color.blend(new Color(255, 255, 255), new Color(215, 0, 64), (int) (1 - (health / 20f) * 100)).getAsInt();
466+
color = Color.blend(new Color(255, 255, 255), new Color(215, 0, 64), (int) ((1 - (health / 20f)) * 100)).getAsInt();
467467
render = String.valueOf(health);
468468
}
469469
// Health

1.19.2/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsPlayer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525

2626
import lombok.Data;
27-
import lombok.Getter;
2827
import net.minecraft.client.MinecraftClient;
2928
import net.minecraft.client.network.PlayerListEntry;
3029

@@ -36,7 +35,6 @@
3635
public class BedwarsPlayer {
3736

3837
private final BedwarsTeam team;
39-
@Getter
4038
private PlayerListEntry profile;
4139
private boolean alive = true;
4240
private boolean disconnected = false;
@@ -94,7 +92,9 @@ public void tick(int currentTick) {
9492
triedStats = true;
9593
try {
9694
stats = BedwarsPlayerStats.fromAPI(profile.getProfile().getId().toString().replace("-", ""));
97-
} catch (Exception e) {
95+
} catch (Exception ignored) {
96+
}
97+
if (stats == null){
9898
stats = BedwarsPlayerStats.generateFake(profile.getProfile().getName());
9999
}
100100
}

1.19.3/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsGame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public void renderCustomScoreboardObjective(MatrixStack matrices, String playerN
463463
color = new Color(200, 200, 200).getAsInt();
464464
} else {
465465
int health = objective.getScoreboard().getPlayerScore(playerName, objective).getScore();
466-
color = Color.blend(new Color(255, 255, 255), new Color(215, 0, 64), (int) (1 - (health / 20f) * 100)).getAsInt();
466+
color = Color.blend(new Color(255, 255, 255), new Color(215, 0, 64), (int) ((1 - (health / 20f)) * 100)).getAsInt();
467467
render = String.valueOf(health);
468468
}
469469
// Health

1.19.3/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsPlayer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525

2626
import lombok.Data;
27-
import lombok.Getter;
2827
import net.minecraft.client.MinecraftClient;
2928
import net.minecraft.client.network.PlayerListEntry;
3029

@@ -36,7 +35,6 @@
3635
public class BedwarsPlayer {
3736

3837
private final BedwarsTeam team;
39-
@Getter
4038
private PlayerListEntry profile;
4139
private boolean alive = true;
4240
private boolean disconnected = false;
@@ -94,7 +92,9 @@ public void tick(int currentTick) {
9492
triedStats = true;
9593
try {
9694
stats = BedwarsPlayerStats.fromAPI(profile.getProfile().getId().toString().replace("-", ""));
97-
} catch (Exception e) {
95+
} catch (Exception ignored) {
96+
}
97+
if (stats == null){
9898
stats = BedwarsPlayerStats.generateFake(profile.getProfile().getName());
9999
}
100100
}

1.19.4/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsGame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public void renderCustomScoreboardObjective(MatrixStack matrices, String playerN
462462
color = new Color(200, 200, 200).getAsInt();
463463
} else {
464464
int health = objective.getScoreboard().getPlayerScore(playerName, objective).getScore();
465-
color = Color.blend(new Color(255, 255, 255), new Color(215, 0, 64), (int) (1 - (health / 20f) * 100)).getAsInt();
465+
color = Color.blend(new Color(255, 255, 255), new Color(215, 0, 64), (int) ((1 - (health / 20f)) * 100)).getAsInt();
466466
render = String.valueOf(health);
467467
}
468468
// Health

1.19.4/src/main/java/io/github/axolotlclient/modules/hypixel/bedwars/BedwarsPlayer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525

2626
import lombok.Data;
27-
import lombok.Getter;
2827
import net.minecraft.client.MinecraftClient;
2928
import net.minecraft.client.network.PlayerListEntry;
3029

@@ -36,7 +35,6 @@
3635
public class BedwarsPlayer {
3736

3837
private final BedwarsTeam team;
39-
@Getter
4038
private PlayerListEntry profile;
4139
private boolean alive = true;
4240
private boolean disconnected = false;
@@ -94,7 +92,9 @@ public void tick(int currentTick) {
9492
triedStats = true;
9593
try {
9694
stats = BedwarsPlayerStats.fromAPI(profile.getProfile().getId().toString().replace("-", ""));
97-
} catch (Exception e) {
95+
} catch (Exception ignored) {
96+
}
97+
if (stats == null){
9898
stats = BedwarsPlayerStats.generateFake(profile.getProfile().getName());
9999
}
100100
}

0 commit comments

Comments
 (0)