boolean isChange = terrains[type] != null; terrains[type] = null; if (isChange) markChanged();
terrains[type] = null;
    public void removeTerrain(int type) {        boolean isChange = terrains[type] != null;    	terrains[type] = null;        if (isChange) markChanged();    }