mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-31 04:46:38 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b0da38c2 Repository details in RuntimeException for MavenLibraryResolver#addRepository (#12939) PaperMC/Paper@1922be90 Update custom tags (#12183) PaperMC/Paper@79cf1353 Ignore HopperInventorySearchEvent when it has no listeners (#13009) PaperMC/Paper@ea014f7a feat: add stuckEntityPoiRetryDelay config (#12949) PaperMC/Paper@a9e76749 Support for showNotification in PlayerRecipeDiscoverEvent (#12992) PaperMC/Paper@5622c9dd Expose attribute sentiment (#12974) PaperMC/Paper@42b653b1 Expose more argument types (#12665) PaperMC/Paper@52d9a221 [ci/skip] Fix typo in Display javadoc (#13010) PaperMC/Paper@614e9acf Improve APIs around riptide tridents (#12996) PaperMC/Paper@51706e5a Fixed DyeItem sheep dye hunk
29 lines
1.9 KiB
Diff
29 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
|
Date: Tue, 9 Nov 2077 00:00:00 +0800
|
|
Subject: [PATCH] Replace EntitySelectorOptions map with optimized collection
|
|
|
|
|
|
diff --git a/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java b/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
|
index 3b945ac061f192b09dd86e8627dacf11b190d2d9..9e2fd3684260fad1d94a795cb5617c5ccc231adc 100644
|
|
--- a/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
|
+++ b/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
|
@@ -357,7 +357,7 @@ public class EntitySelectorOptions {
|
|
}, entitySelectorParser -> true, Component.translatable("argument.entity.options.nbt.description"));
|
|
register("scores", parser -> {
|
|
StringReader reader = parser.getReader();
|
|
- Map<String, MinMaxBounds.Ints> map = Maps.newHashMap();
|
|
+ it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap<String, MinMaxBounds.Ints> map = new it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap<>(); // Leaf - Replace options map with optimized collection
|
|
reader.expect('{');
|
|
reader.skipWhitespace();
|
|
|
|
@@ -380,7 +380,7 @@ public class EntitySelectorOptions {
|
|
parser.addPredicate(entity -> {
|
|
Scoreboard scoreboard = entity.getServer().getScoreboard();
|
|
|
|
- for (Entry<String, MinMaxBounds.Ints> entry : map.entrySet()) {
|
|
+ for (Entry<String, MinMaxBounds.Ints> entry : map.object2ObjectEntrySet()) { // Leaf - Replace options map with optimized collection
|
|
Objective objective = scoreboard.getObjective(entry.getKey());
|
|
if (objective == null) {
|
|
return false;
|