Add more state data (isSolid())

This commit is contained in:
BuildTools 2018-09-01 23:26:36 -05:00
parent 9cff98807a
commit eb5fe20502
13 changed files with 223 additions and 13 deletions

View file

@ -35,6 +35,7 @@ public class DynmapBlockState {
private static int MATCH_GRASS = 1 << 4;
private static int MATCH_WATERLOGGED = 1 << 5;
private static int MATCH_LEAVES = 1 << 6;
private static int MATCH_SOLID = 1 << 7;
// Map of base blocks by name
private static HashMap<String, DynmapBlockState> blocksByName = new HashMap<String, DynmapBlockState>();
@ -331,6 +332,18 @@ public class DynmapBlockState {
}
return null;
}
/**
* Test if block is solid
*/
public boolean isSolid() {
return (matchflags & MATCH_SOLID) != 0;
}
/**
* Set to solid
*/
public void setSolid() {
matchflags |= MATCH_SOLID;
}
/**
* To printable string
*/