mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-26 14:00:14 +00:00
sphereCount -> blockCount
This commit is contained in:
1 parent
d579921894
commit
52133b129d
1 file changed
+3
-3
+3
-3
@@ -114,7 +114,7 @@ public class VanillaOre implements Structure {
|
|||||||
int horizontalSize = (int) (2 * (Math.ceil(eighthSize) + outset));
|
int horizontalSize = (int) (2 * (Math.ceil(eighthSize) + outset));
|
||||||
int verticalSize = 2 * (2 + outset);
|
int verticalSize = 2 * (2 + outset);
|
||||||
|
|
||||||
int sphereCount = 0;
|
int blockCount = 0;
|
||||||
BitSet visited = new BitSet(horizontalSize * verticalSize * horizontalSize);
|
BitSet visited = new BitSet(horizontalSize * verticalSize * horizontalSize);
|
||||||
|
|
||||||
// Generate a sphere at each point
|
// Generate a sphere at each point
|
||||||
@@ -153,7 +153,7 @@ public class VanillaOre implements Structure {
|
|||||||
BlockType block = world.getBlockState(xi, yi, zi).getBlockType();
|
BlockType block = world.getBlockState(xi, yi, zi).getBlockType();
|
||||||
if(shouldPlace(getReplaceable(), block, exposed, random, world, xi, yi, zi)) {
|
if(shouldPlace(getReplaceable(), block, exposed, random, world, xi, yi, zi)) {
|
||||||
world.setBlockState(xi, yi, zi, getMaterial(block), isApplyGravity());
|
world.setBlockState(xi, yi, zi, getMaterial(block), isApplyGravity());
|
||||||
++sphereCount;
|
++blockCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,7 @@ public class VanillaOre implements Structure {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return sphereCount > 0;
|
return blockCount > 0;
|
||||||
}
|
}
|
||||||
public BlockState getMaterial(BlockType replace) {
|
public BlockState getMaterial(BlockType replace) {
|
||||||
return materials.getOrDefault(replace, material);
|
return materials.getOrDefault(replace, material);
|
||||||
|
|||||||
Reference in new issue
Block a user