Skip to content

Commit

Permalink
chore: more distributed rootless cones
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex4386 committed Dec 26, 2024
1 parent 058690b commit 94023a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1210,16 +1210,18 @@ public double getRootlessConeRadius(int height) {
}

public boolean tryRootlessCone() {
// check the volcano has grown big enough (normalLavaLength >= 100)
if (this.vent.longestNormalLavaFlowLength < 100) return false;

// check if the lava sillicalevel isn't too high
if (this.settings.silicateLevel > 0.53) return false;

if (this.vent.erupt.getStyle() != VolcanoEruptStyle.HAWAIIAN)
return false;

double radius = 70 + (Math.random() * (this.vent.longestNormalLavaFlowLength - 70));
int threshold = Math.max(70, this.vent.getRadius() + 30);
double max = this.vent.getBasinLength() + 10;
if (max < threshold) return false;

double distanceRatio = Math.pow(1.0 - Math.random(), 2);
double radius = threshold + (distanceRatio * (max - threshold));
double angle = Math.random() * Math.PI * 2;

if (this.vent.isCaldera()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public void generateAmethystGeode(Block block) {

public void runSuccession(VolcanoVent vent) {
Block coreBlock = vent.getCoreBlock();
double longestFlow = Math.max(vent.longestNormalLavaFlowLength, vent.getSummitBlock().getY() - vent.location.getWorld().getSeaLevel() * Math.sqrt(3));
double longestFlow = vent.getBasinLength();

if (Math.random() < 0.2) {
longestFlow = Math.max(vent.longestNormalLavaFlowLength, vent.longestFlowLength);
Expand Down

0 comments on commit 94023a7

Please sign in to comment.