public RockEntity(double x, double y, double dx, double dy, int width, int height, int size, int type, double gridSize, double spawnTimer) {
        this.x = x;
        this.y = y;
        this.dx = dx;
        this.dy = dy;
        this.width = width;
        this.height = height;
        this.size = size;
        this.spawnTimer = spawnTimer;
        startTime = spawnTimer < 0 ? 1000 : spawnTimer;
        switch (size) {
            case RockEntity.BIG:
                this.grid = gridSize;
                break;
            case RockEntity.MEDIUM:
                this.grid = 3.0 * gridSize / 4;
                break;
            case RockEntity.SMALL:
                this.grid = gridSize / 2;
                break;
        }
        this.radius = 3 * grid;
        bounds = new BoundingShape(BoundingShape.CIRCLE, RockEntity.this.radius);
        fakeRocks = new RockMockupEntity[4];
        for (int i = 0; i < 4; ++i) {
            fakeRocks[i] = new RockMockupEntity(i);
        }

        switch (type % 3) {
            case 0: {
                double[] xs = {0 * grid, 1 * grid, 3 * grid, 2 * grid, 4 * grid, 3 * grid, 1 * grid, -1 * grid, -2 * grid, -3 * grid, -2 * grid};
                double[] ys = {-2 * grid, -3 * grid, -1 * grid, 0 * grid, 1 * grid, 3 * grid, 2 * grid, 3 * grid, 1 * grid, 0 * grid, -2 * grid};
                xCoords = xs;
                yCoords = ys;
                break;
            }
            case 1: {
                double[] xs = {-1 * grid, 2 * grid, 3 * grid, 3 * grid, 1 * grid, -0.5 * grid, -0.5 * grid, -2 * grid, -3 * grid, -2 * grid, -3 * grid};
                double[] ys = {-3 * grid, -3 * grid, -1 * grid, 0 * grid, 3 * grid, 3 * grid, 0 * grid, 3 * grid, 0.5 * grid, 0 * grid, -0.5 * grid};
                xCoords = xs;
                yCoords = ys;
                break;
            }
            case 2: {
                double[] xs = {-1.5 * grid, 1 * grid, 3 * grid, 0 * grid, 3 * grid, 1 * grid, 0 * grid, -2 * grid, -3 * grid, -3 * grid, -1 * grid};
                double[] ys = {-3 * grid, -3 * grid, -1.5 * grid, -0.5 * grid, 1 * grid, 3 * grid, 2 * grid, 3 * grid, 0.5 * grid, -1.5 * grid, -1.5 * grid};
                xCoords = xs;
                yCoords = ys;
                break;
            }
        }
    }