@Override
    public void update(Level level, int x, int y, int z, Random rand) {
        boolean var8 = false;

        boolean var6;
        do {
            --y;
            if (level.getTile(x, y, z) != 0 || !canFlow(level, x, y, z)) {
                break;
            }

            if (var6 = level.setTile(x, y, z, movingId)) {
                var8 = true;
            }
        } while (var6 && type != LiquidType.lava);

        ++y;
        if (type == LiquidType.water || !var8) {
            var8 = var8 | flow(level, x - 1, y, z) | flow(level, x + 1, y, z)
                    | flow(level, x, y, z - 1) | flow(level, x, y, z + 1);
        }

        if (!var8) {
            level.setTileNoUpdate(x, y, z, stillId);
        } else {
            level.addToTickNextTick(x, y, z, movingId);
        }

    }