mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-27 12:35:12 +01:00
prevent false material lookups when using compatibility
This commit is contained in:
parent
c8c19cf088
commit
2b39836714
@ -1022,15 +1022,17 @@ public enum LegacyMaterials {
|
||||
private static final Map<String, LegacyMaterials> lookupMap = new HashMap();
|
||||
|
||||
static {
|
||||
for (LegacyMaterials m : values()) {
|
||||
lookupMap.put(m.name(), m);
|
||||
lookupMap.put(m.material + ":" + (m.data == null ? "" : m.data), m);
|
||||
}
|
||||
for (LegacyMaterials m : values()) {
|
||||
if (!lookupMap.containsKey(m.legacy)) {
|
||||
lookupMap.put(m.legacy, m);
|
||||
}
|
||||
}
|
||||
for (LegacyMaterials m : values()) {
|
||||
lookupMap.put(m.name(), m);
|
||||
if (!m.usesCompatibility()) {
|
||||
lookupMap.put(m.material + ":" + (m.data == null ? "" : m.data), m);
|
||||
}
|
||||
}
|
||||
for (LegacyMaterials m : values()) {
|
||||
if (!m.usesCompatibility() && !lookupMap.containsKey(m.legacy)) {
|
||||
lookupMap.put(m.legacy, m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LegacyMaterials() {
|
||||
|
Loading…
Reference in New Issue
Block a user