Skip to content

Commit

Permalink
Fix stray rabbit highlight not working on slot 26 and golden rabbits …
Browse files Browse the repository at this point in the history
…not being highlighted (#741)
  • Loading branch information
Emirlol authored May 31, 2024
1 parent a14017a commit 0d2c75f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,11 @@ private static Optional<ColorHighlight> getPrestigeHighlight() {

private static List<ColorHighlight> getStrayRabbitHighlight(Int2ObjectMap<ItemStack> slots) {
final List<ColorHighlight> highlights = new ArrayList<>();
for (byte i = STRAY_RABBIT_START; i < STRAY_RABBIT_END; i++) {
for (byte i = STRAY_RABBIT_START; i <= STRAY_RABBIT_END; i++) {
ItemStack item = slots.get(i);
if (item.isOf(Items.PLAYER_HEAD) && item.getName().getString().equals("CLICK ME!")) {
if (!item.isOf(Items.PLAYER_HEAD)) continue;
String name = item.getName().getString();
if (name.equals("CLICK ME!") || name.startsWith("GOLDEN RABBIT")) {
highlights.add(ColorHighlight.green(i));
}
}
Expand Down

0 comments on commit 0d2c75f

Please sign in to comment.