prevent false material lookups when using compatibility

This commit is contained in:
jascotty2 2019-09-07 15:06:47 -05:00
parent c8c19cf088
commit 2b39836714

View File

@ -1024,10 +1024,12 @@ public enum LegacyMaterials {
static {
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 (!lookupMap.containsKey(m.legacy)) {
if (!m.usesCompatibility() && !lookupMap.containsKey(m.legacy)) {
lookupMap.put(m.legacy, m);
}
}