diff options
author | Jason Penilla <[email protected]> | 2024-10-27 18:29:34 -0700 |
---|---|---|
committer | Jason Penilla <[email protected]> | 2024-10-27 18:29:34 -0700 |
commit | e35f199344de61da86c9ee052a059973720862f0 (patch) | |
tree | 9a2388563c15d0093b5b56a3cf6d50cb7bae8b04 | |
parent | 9e35192360a837e81e669c59e89f1c5c4ab0f2f1 (diff) | |
download | Paper-e35f199344de61da86c9ee052a059973720862f0.tar.gz Paper-e35f199344de61da86c9ee052a059973720862f0.zip |
Use declaration order for state holder property iteration
Mostly an aesthetic change for serialization, should not have any impact on performance or correctness.
-rw-r--r-- | patches/server/1038-Moonrise-optimisation-patches.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/1038-Moonrise-optimisation-patches.patch b/patches/server/1038-Moonrise-optimisation-patches.patch index 68646b52eb..ed29e35d38 100644 --- a/patches/server/1038-Moonrise-optimisation-patches.patch +++ b/patches/server/1038-Moonrise-optimisation-patches.patch @@ -443,7 +443,7 @@ index 0000000000000000000000000000000000000000..01da52b9e8a786824f199a057b62ce04 +} diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/blockstate_propertyaccess/util/ZeroCollidingReferenceStateTable.java b/src/main/java/ca/spottedleaf/moonrise/patches/blockstate_propertyaccess/util/ZeroCollidingReferenceStateTable.java new file mode 100644 -index 0000000000000000000000000000000000000000..b5335a2a8cb5dc7637c7112c8f7193389d726489 +index 0000000000000000000000000000000000000000..866f38eb0f379ffbe2888023a7d1c290f521a231 --- /dev/null +++ b/src/main/java/ca/spottedleaf/moonrise/patches/blockstate_propertyaccess/util/ZeroCollidingReferenceStateTable.java @@ -0,0 +1,230 @@ @@ -458,7 +458,7 @@ index 0000000000000000000000000000000000000000..b5335a2a8cb5dc7637c7112c8f719338 +import it.unimi.dsi.fastutil.objects.ObjectIterator; +import it.unimi.dsi.fastutil.objects.ObjectSet; +import it.unimi.dsi.fastutil.objects.Reference2ObjectMap; -+import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet; ++import it.unimi.dsi.fastutil.objects.ReferenceArrayList; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; @@ -476,7 +476,7 @@ index 0000000000000000000000000000000000000000..b5335a2a8cb5dc7637c7112c8f719338 + + public ZeroCollidingReferenceStateTable(final Collection<Property<?>> properties) { + this.propertyToIndexer = new Int2ObjectOpenHashMap<>(properties.size()); -+ this.properties = new ReferenceOpenHashSet<>(properties); ++ this.properties = new ReferenceArrayList<>(properties); + + final List<Property<?>> sortedProperties = new ArrayList<>(properties); + |