mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Keep order of block properties (#1053)
This commit is contained in:
parent
22be7410fc
commit
1c9015531f
@ -19,6 +19,7 @@ import java.util.Collection;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -62,7 +63,8 @@ public class BlockTypesCache {
|
|||||||
this.propertiesMapArr = new AbstractProperty[maxOrdinal + 1];
|
this.propertiesMapArr = new AbstractProperty[maxOrdinal + 1];
|
||||||
int prop_arr_i = 0;
|
int prop_arr_i = 0;
|
||||||
this.propertiesArr = new AbstractProperty[properties.size()];
|
this.propertiesArr = new AbstractProperty[properties.size()];
|
||||||
HashMap<String, AbstractProperty<?>> propMap = new HashMap<>();
|
// Preserve properties order with LinkedHashMap
|
||||||
|
HashMap<String, AbstractProperty<?>> propMap = new LinkedHashMap<>();
|
||||||
|
|
||||||
int bitOffset = 0;
|
int bitOffset = 0;
|
||||||
for (Map.Entry<String, ? extends Property<?>> entry : properties.entrySet()) {
|
for (Map.Entry<String, ? extends Property<?>> entry : properties.entrySet()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user