mirror of
https://github.com/songoda/SongodaCore.git
synced 2025-02-20 05:21:22 +01:00
prevent false material lookups when using compatibility
This commit is contained in:
parent
c8c19cf088
commit
2b39836714
@ -1024,10 +1024,12 @@ public enum LegacyMaterials {
|
|||||||
static {
|
static {
|
||||||
for (LegacyMaterials m : values()) {
|
for (LegacyMaterials m : values()) {
|
||||||
lookupMap.put(m.name(), m);
|
lookupMap.put(m.name(), m);
|
||||||
|
if (!m.usesCompatibility()) {
|
||||||
lookupMap.put(m.material + ":" + (m.data == null ? "" : m.data), m);
|
lookupMap.put(m.material + ":" + (m.data == null ? "" : m.data), m);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (LegacyMaterials m : values()) {
|
for (LegacyMaterials m : values()) {
|
||||||
if (!lookupMap.containsKey(m.legacy)) {
|
if (!m.usesCompatibility() && !lookupMap.containsKey(m.legacy)) {
|
||||||
lookupMap.put(m.legacy, m);
|
lookupMap.put(m.legacy, m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user