Skip to content

Commit

Permalink
upload progress
Browse files Browse the repository at this point in the history
  • Loading branch information
HamaIndustries committed Nov 29, 2024
1 parent 59cdb21 commit 1a9970a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ minecraft_version=1.21.1
loader_version=0.16.9

# Mod Properties
mod_version=5.0.0
mod_version=5.0.3
maven_group=symbolics.division.meret
archives_base_name=meret

Expand Down
21 changes: 1 addition & 20 deletions src/client/java/symbolics/division/meret/MeretClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,13 @@ public static Music getOverride(LocalPlayer player) {
return null;
}

var songTags = songRegistry.getTagNames().toList();


// for (var tag : songTags) {
// Area area = AreaClientData.getClientLevelData().get(tag.location());
// if (area != null && area.contains(player))
// queue.enqueue(area);
// }

// return null;
// if (queue.isEmpty()) return null;

// songRegistry.getOrCreateTag()



// sorry jasmine (´・ω・`)
return songRegistry.getTagNames()
.map(tag -> new Pair<>(tag, AreaClientData.getClientLevelData().get(tag.location())))
.filter(p -> p.getSecond() != null && p.getSecond().contains(player))
.max(Comparator.comparingInt(p -> p.getSecond().getPriority()))
.flatMap(p -> songRegistry.getOrCreateTag(p.getFirst()).getRandomElement(player.getRandom()))
.map(song -> new Music(song.value().soundEvent(), 10, 10, false))
.map(song -> new Music(song.value().soundEvent(), 20 * 3 * 60, 20 * 5 * 60, false))
.orElse(null);

// return new Music(song.value().soundEvent(), 10, 10, false);
//// return new Music(song.value().soundEvent(), 20 * 3 * 60, 20 * 5 * 60, false);
}
}

0 comments on commit 1a9970a

Please sign in to comment.