Skip to content

Commit

Permalink
chore: use only strombolian
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex4386 committed Dec 26, 2024
1 parent 94023a7 commit b555e71
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,8 @@ public boolean tryRootlessCone() {

int threshold = Math.max(70, this.vent.getRadius() + 30);
double max = this.vent.getBasinLength() + 10;

max *= (0.2 * Math.random()) + 0.8;
if (max < threshold) return false;

double distanceRatio = Math.pow(1.0 - Math.random(), 2);
Expand Down Expand Up @@ -1306,15 +1308,15 @@ public void addRootlessCone(Location location) {
}

if (targetBlock.getType().isAir() || targetBlock.getType() == Material.WATER) {
Material material = Math.random() < 0.5 ? VolcanoComposition.getBombRock(this.settings.silicateLevel,
Material material = Math.random() < 0.8 ? VolcanoComposition.getBombRock(this.settings.silicateLevel,
this.getDistanceRatio(targetBlock.getLocation())
) : VolcanoComposition.getExtrusiveRock(this.settings.silicateLevel);

queueBlockUpdate(targetBlock, material, TyphonUtils.getBlockFaceUpdater(new Vector(x, 0, z)));
if (y == height) {
Block topBlock = targetBlock.getRelative(BlockFace.UP);
if (topBlock.getType().isAir() || topBlock.getType() == Material.WATER) {
if (allowLavaFlow && Math.random() < 0.2) this.flowLava(topBlock);
if (allowLavaFlow && Math.random() < 0.2) this.flowLavaFromBomb(topBlock, height + 5);
}
}
}
Expand Down Expand Up @@ -1370,7 +1372,7 @@ public VolcanoVent generateParasiticVent(Location location, String prefix, Consu
vent.enableKillSwitch = true;
vent.killAt = System.currentTimeMillis() + (long) (1000 * 60 * (2 + (Math.random() * 3)));
vent.lavaFlow.settings.silicateLevel = this.settings.silicateLevel;
vent.erupt.setStyle(Math.random() > 0.3 ? VolcanoEruptStyle.STROMBOLIAN : VolcanoEruptStyle.HAWAIIAN);
vent.erupt.setStyle(VolcanoEruptStyle.STROMBOLIAN);

if (setup != null) {
setup.accept(vent);
Expand Down

0 comments on commit b555e71

Please sign in to comment.