mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-08-29 13:20:32 +00:00
correct max_y = 255 assumption
This commit is contained in:
@@ -98,7 +98,7 @@ public abstract class Worm {
|
|||||||
if(!(FastMath.floorDiv(origin.getBlockZ() + z, 16) == chunkZ)) continue;
|
if(!(FastMath.floorDiv(origin.getBlockZ() + z, 16) == chunkZ)) continue;
|
||||||
for(int y = -yRad - 1; y <= yRad + 1; y++) {
|
for(int y = -yRad - 1; y <= yRad + 1; y++) {
|
||||||
Vector3 position = origin.clone().add(new Vector3(x, y, z));
|
Vector3 position = origin.clone().add(new Vector3(x, y, z));
|
||||||
if(position.getY() < world.getMinHeight() || position.getY() > 255) continue;
|
if(position.getY() < world.getMinHeight() || position.getY() > world.getMaxHeight()) continue;
|
||||||
double eq = ellipseEquation(x, y, z, xRad, yRad, zRad);
|
double eq = ellipseEquation(x, y, z, xRad, yRad, zRad);
|
||||||
if(eq <= 1 &&
|
if(eq <= 1 &&
|
||||||
y >= -yRad - 1 + bottomCut && y <= yRad + 1 - topCut) {
|
y >= -yRad - 1 + bottomCut && y <= yRad + 1 - topCut) {
|
||||||
|
|||||||
Reference in New Issue
Block a user