From e35f199344de61da86c9ee052a059973720862f0 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Sun, 27 Oct 2024 18:29:34 -0700 Subject: [PATCH] Use declaration order for state holder property iteration Mostly an aesthetic change for serialization, should not have any impact on performance or correctness. --- patches/server/1038-Moonrise-optimisation-patches.patch | 6 +++--- 1 file 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> properties) { + this.propertyToIndexer = new Int2ObjectOpenHashMap<>(properties.size()); -+ this.properties = new ReferenceOpenHashSet<>(properties); ++ this.properties = new ReferenceArrayList<>(properties); + + final List> sortedProperties = new ArrayList<>(properties); +