3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 12:00:06 +01:00

Use declaration order for state holder property iteration

Mostly an aesthetic change for serialization, should not have any impact on performance or correctness.
Dieser Commit ist enthalten in:
Jason Penilla 2024-10-27 18:29:34 -07:00
Ursprung 9e35192360
Commit e35f199344
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0E75A301420E48F8

Datei anzeigen

@ -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);
+