Handle waterlogged/water-filled blocks, fix turtle eggs, pickles

This commit is contained in:
Mike Primm 2018-08-20 16:19:44 -04:00
parent 42dfce94bc
commit 2ebab4b7fc
6 changed files with 59 additions and 37 deletions

View file

@ -124,7 +124,6 @@ public class DynmapBlockState {
matchflags |= isWater(blockName) ? MATCH_WATER : 0;
matchflags |= (blockName.equals(SNOW_BLOCK) || blockName.equals(SNOW_LAYER_BLOCK)) ? MATCH_SNOW : 0;
matchflags |= blockName.equals(GRASS_BLOCK) ? MATCH_GRASS : 0;
matchflags |= stateName.contains("waterlogged=true") ? MATCH_WATERLOGGED : 0;
}
/**
* Get state for same base block with given index
@ -281,6 +280,12 @@ public class DynmapBlockState {
public final boolean isWaterlogged() {
return (matchflags & MATCH_WATERLOGGED) != 0;
}
/**
* Set state to be waterlogged (block filled with water)
*/
public final void setWaterlogged() {
matchflags |= MATCH_WATERLOGGED;
}
/**
* Test for matching blockname
*/