Skip to content

Commit

Permalink
draw player above friends
Browse files Browse the repository at this point in the history
  • Loading branch information
sisby-folk committed Apr 23, 2024
1 parent bca560d commit 0fd0919
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/folk/sisby/antique_atlas/gui/AtlasScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,11 @@ public void render(DrawContext context, int mouseX, int mouseY, float par3) {

context.getMatrices().push();
context.getMatrices().translate(getGuiX(), getGuiY(), 0);
for (PlayerSummary friend : friends.values()) {
if (state.is(HIDING_MARKERS) && (!playerBookmark.isSelected() || !friend.username().equals(player.getGameProfile().getName()))) continue;
PlayerSummary playerSummary = friends.remove(player.getUuid());
List<PlayerSummary> orderedFriends = new ArrayList<>(friends.values());
if (playerSummary != null) orderedFriends.add(playerSummary);
for (PlayerSummary friend : orderedFriends) {
if (state.is(HIDING_MARKERS)) continue;
renderPlayer(context, friend, 1, hoveredFriend == friend && markerModal.getParent() == null);
}
context.getMatrices().pop();
Expand Down

0 comments on commit 0fd0919

Please sign in to comment.