Add state= mapping for replacing data= in models and textures

(eventually)
This commit is contained in:
Mike Primm 2022-02-01 23:50:58 -06:00
parent 3c76c3f875
commit 66082093de
7 changed files with 582 additions and 572 deletions

View file

@ -542,6 +542,17 @@ public class DynmapBlockState {
}
return lightAttenuation;
}
/*
* Test if matches attrib=value pair
*/
public final boolean isStateMatch(String attrib, String value) {
String v = attrib + "=" + value;
v = v.toLowerCase();
for (String state : stateList) {
if (state.equals(v)) return true;
}
return false;
}
/**
* To printable string
*/