//TODO: maybe skip some of this stuff if the cube is empty? (would need to use hints)
public void generate(ICubicWorld world, ICubePrimer cube, CubePos cubePos) {
		//TODO: maybe skip some of this stuff if the cube is empty? (would need to use hints)
		int radius = this.range;
		this.world = world;
		this.rand.setSeed(world.getSeed());
		//used to randomize contribution of each coordinate to the cube seed
		//without these swapping x/y/z coordinates would result in the same seed
		//so structures would generate symmetrically
		long randX = this.rand.nextLong();
		long randY = this.rand.nextLong();
		long randZ = this.rand.nextLong();
		int cubeX = cubePos.getX();
		int cubeY = cubePos.getY();
		int cubeZ = cubePos.getZ();
		//x/y/zOrigin is location of the structure "center", and cubeX/Y/Z is the currently generated cube
		for (int xOrigin = cubeX - radius; xOrigin <= cubeX + radius; ++xOrigin) {
			for (int yOrigin = cubeY - radius; yOrigin <= cubeY + radius; ++yOrigin) {
				for (int zOrigin = cubeZ - radius; zOrigin <= cubeZ + radius; ++zOrigin) {
					long randX_mul = xOrigin*randX;
					long randY_mul = yOrigin*randY;
					long randZ_mul = zOrigin*randZ;
					this.rand.setSeed(randX_mul ^ randY_mul ^ randZ_mul ^ world.getSeed());
					this.generate(world, cube, xOrigin, yOrigin, zOrigin, cubePos);
				}
			}
		}
	}
public void generate(ICubicWorld world, ICubePrimer cube, CubePos cubePos) {
//TODO: maybe skip some of this stuff if the cube is empty? (would need to use hints)
int radius = this.range;
this.world = world;
public void generate(ICubicWorld world, ICubePrimer cube, CubePos cubePos) {
//TODO: maybe skip some of this stuff if the cube is empty? (would need to use hints)
int radius = this.range;
this.world = world;
this.rand.setSeed(world.getSeed());
//used to randomize contribution of each coordinate to the cube seed
//without these swapping x/y/z coordinates would result in the same seed
//so structures would generate symmetrically
long randX = this.rand.nextLong();
long randY = this.rand.nextLong();
long randZ = this.rand.nextLong();
int cubeX = cubePos.getX();
public void generate(ICubicWorld world, ICubePrimer cube, CubePos cubePos) {
//TODO: maybe skip some of this stuff if the cube is empty? (would need to use hints)
int radius = this.range;
this.world = world;
this.rand.setSeed(world.getSeed());
//used to randomize contribution of each coordinate to the cube seed
//without these swapping x/y/z coordinates would result in the same seed
//so structures would generate symmetrically
long randX = this.rand.nextLong();
long randY = this.rand.nextLong();
long randZ = this.rand.nextLong();
int cubeX = cubePos.getX();
int cubeY = cubePos.getY();
int cubeZ = cubePos.getZ();
//x/y/zOrigin is location of the structure "center", and cubeX/Y/Z is the currently generated cube
for (int xOrigin = cubeX - radius; xOrigin <= cubeX + radius; ++xOrigin) {
for (int yOrigin = cubeY - radius; yOrigin <= cubeY + radius; ++yOrigin) {
for (int zOrigin = cubeZ - radius; zOrigin <= cubeZ + radius; ++zOrigin) {
long randX_mul = xOrigin*randX;
long randY_mul = yOrigin*randY;
long randZ_mul = zOrigin*randZ;
this.rand.setSeed(randX_mul ^ randY_mul ^ randZ_mul ^ world.getSeed());