Delete superseded Highland sietch generator
All checks were successful
DuneRealms Resourcepack CI / resourcepack (push) Successful in 1m54s
DuneRealms Plugin CI / plugins (push) Successful in 2m56s

This commit is contained in:
unimatrixgit 2026-11-29 22:34:48 +01:00
commit 93b570c114
5 changed files with 2 additions and 84 deletions

View file

@ -10,7 +10,7 @@ DuneRealms terrain runs on Java 21. Build with `gradle build`; install `build/li
- **Desert villages**: custom four-house sandstone settlements, with cut-sandstone lanes, villagers, beds, non-farming workstations, lanterns and finite shared supply chests. No farmland, crops or hay bales enter the structure palette. Chests use `dunerealms:chests/desert-village`: bread, dried kelp, apples and raw iron. Placement regions default to 768 blocks, with terrain suitability checks.
- **Old Harkonnen Fortress**: a custom jungle-temple-style Arrakis adaptation with sandstone walls, darkstone pillars, a stepped roof, red banner, stair and underground loot vault. It is a custom layout, not a replacement of Minecraft's built-in jungle temple structure definition. The default attempt rate is one per 1,000 Arrakis chunks, matching the Java desert-well-style chance; uneven terrain can reject an attempt. Its finite chest uses `dunerealms:chests/old-harkonnen-fortress`. When loot is generated, DuneTerrain appends a complete Harkonnen kit from the updated DuneCore kit factory: red faction stillsuit, native equipment attributes and trim, and the enchanted spice shovel. Food and raw iron also come from the loot table. Install updated Core and Terrain together; without the updated Core API, fortress rewards fall back to basic sword/food rather than fabricated faction equipment.
Dune-highlands receive three naturally generated compact cave sietches per region by default (three times the one-site regional baseline, with a minimum of three). Each has a cave mouth, sleeping and kitchen chambers, a reservoir, and an independent personal supply cache using the existing loot/claim rules. The existing 2,000-block open-desert sietch placement algorithm and large cave template are unchanged. Configure only the new `sietches.highlands` section to tune or disable highland sites; `sietches.spacing` still controls the original desert grid. These extra caves apply only to new chunks; previously generated highlands are not retrofitted.
Arrakis generates small, medium, and large sietches on separate grids with default spacing of 600, 900, and 2,000 blocks. Larger tiers take priority when footprints overlap. Each tier has independent `enabled` and `spacing` settings under `sietches`. Placement applies as chunks generate.
Oasis trees, personal cave sietch supplies, regular suspicious-sand spice deposits and magma-marked spice blows remain enabled. Custom structures are generated only on the Arrakis world.

View file

@ -720,8 +720,7 @@ public final class DuneTerrain extends JavaPlugin implements Listener {
}
private int spacing(SietchLayout.Tier tier) {
int fallback = tier == SietchLayout.Tier.LARGE ? plugin.getConfig().getInt("sietches.spacing", tier.spacing) : tier.spacing;
return Math.max(128, plugin.getConfig().getInt("sietches." + tier.key() + ".spacing", fallback));
return Math.max(128, plugin.getConfig().getInt("sietches." + tier.key() + ".spacing", tier.spacing));
}
@Override public void populate(WorldInfo world, Random random, int cx, int cz, LimitedRegion region) {

View file

@ -1,33 +0,0 @@
package com.example.duneterrain;
import java.util.*;
/** Threefold regional placement, independent of the legacy open-desert sietch grid. */
final class HighlandSietches {
record Site(int x,int z,long cacheId) {}
static List<Site> sites(RockPlateaus.Shape shape,int multiplier,int minimum) {
int target=Math.max(3,Math.min(12,Math.max(minimum,multiplier)));
List<Site> candidates=new ArrayList<>();
int extent=(int)Math.ceil(shape.radius()*1.6);
for(int dx=-extent;dx<=extent;dx+=2)for(int dz=-extent;dz<=extent;dz+=2) {
int x=(int)shape.centerX()+dx,z=(int)shape.centerZ()+dz;
if(shape.depth(x,z)<.25)continue;
candidates.add(new Site(x,z,DenseSpice.mix(shape.seed()^x*341873128712L^z*132897987541L^0x5349455443484849L)));
}
List<Site> result=new ArrayList<>();
// Start at one end, then choose the farthest remaining sites, keeping compact caves apart.
Site center=new Site((int)shape.centerX(),(int)shape.centerZ(),0);
candidates.sort(Comparator.<Site>comparingLong(s->distance(s,center)).reversed().thenComparingLong(Site::cacheId));
while(result.size()<target&&!candidates.isEmpty()) {
Site best=null;long distance=-1;
for(Site candidate:candidates) {
long nearest=result.isEmpty()?Long.MAX_VALUE:result.stream().mapToLong(s->distance(s,candidate)).min().orElse(0);
if(nearest>distance){distance=nearest;best=candidate;}
}
if(!result.isEmpty()&&distance<26L*26)break;
result.add(best);candidates.remove(best);
}
return List.copyOf(result);
}
private static long distance(Site a,Site b) {long dx=a.x()-b.x(),dz=a.z()-b.z();return dx*dx+dz*dz;}
}

View file

@ -1,15 +0,0 @@
package com.example.duneterrain;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class HighlandSietchesTest {
@Test void everyDefaultHighlandHasThreeDistinctSpacedCavesInsideItsFootprint() {
for(int cx=-10;cx<=10;cx++)for(int cz=-10;cz<=10;cz++) {
long seed=RockPlateaus.formationSeed(cx,cz);
var shape=RockPlateaus.shape(seed,RockPlateaus.centerX(cx,300,500),RockPlateaus.centerZ(cz,300,500),RockPlateaus.radius(seed,45,55),.02);
var sites=HighlandSietches.sites(shape,3,3);assertEquals(3,sites.size(),"region "+cx+","+cz);
assertEquals(sites,HighlandSietches.sites(shape,3,3));
assertEquals(3,sites.stream().map(HighlandSietches.Site::cacheId).distinct().count());
for(var a:sites){assertTrue(shape.depth(a.x(),a.z())>=.25);for(var b:sites)if(a!=b){int dx=a.x()-b.x(),dz=a.z()-b.z();assertTrue(dx*dx+dz*dz>=676);}}
}
}
}

View file

@ -248,39 +248,6 @@
],
"fields": []
},
"com/example/duneterrain/HighlandSietches$Site": {
"methods": [
[
"toString",
"()Ljava/lang/String;"
],
[
"hashCode",
"()I"
],
[
"equals",
"(Ljava/lang/Object;)Z"
],
[
"x",
"()I"
],
[
"z",
"()I"
],
[
"cacheId",
"()J"
]
],
"fields": []
},
"com/example/duneterrain/HighlandSietches": {
"methods": [],
"fields": []
},
"com/example/duneterrain/RockPlateaus$Shape": {
"methods": [
[