Skip to content

Commit

Permalink
fix: invalid height
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex4386 committed Dec 30, 2024
1 parent 5b144a5 commit c5dc08c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1304,11 +1304,16 @@ public void addRootlessCone(Location location, int height, boolean openVent) {
}

double averageHeight = heightSum / craterBlock.size();
int realHeight = (int) Math.round(averageHeight - baseBlock.getY());

if (realHeight < 2) {

return;
}
for (int x = -baseInt; x <= baseInt; x++) {
for (int z = -baseInt; z <= baseInt; z++) {
double distance = Math.sqrt(x * x + z * z);
int targetHeight = rootlessConeHeight(height, distance);
int targetHeight = rootlessConeHeight(realHeight, distance);
Block baseBlockAt = TyphonUtils.getHighestRocklikes(baseBlock.getRelative(x, 0, z));

for (int y = 1; y <= targetHeight; y++) {
Expand Down

0 comments on commit c5dc08c

Please sign in to comment.