WIP: ore nodes, catching rules, bee nest fix, smaller Deep Dark
Done and checked: surface and cave-floor ore nodes (companion mod ore/OreNodes.kt), bigger and rarer underground veins; template with nodes passed the world check and the island quick check (node self-tests). Built, not yet tested: catching rules (catch rate falls with the level gap to the trainer's strongest Pokemon, failed catch enrages, strong wild Pokemon hunt weaker trainers; catching/, Fight or Flight config), bee nests emptied when their bee is turned away. In progress: the Deep Dark no longer fills the deepslate layer (split by temperature: cold = Deep Dark, hot = basalt deltas, warm = ordinary caves; world/biomes.json), zone layout regenerated; cave zone types added to world/zones.json but tools/zone_spawns.py doesn't use them yet; template not rebuilt for the new caves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
362d06aa4b
commit
6361636da7
29 files changed
+1733
-357
No files matched your search
+22
-2
@@ -4,8 +4,11 @@
|
||||
Vanilla's overworld biome parameters come from Minecraft's own data generator
|
||||
(run on the vanilla server jar that the NeoForge installer put in
|
||||
build/server; no server is started). Every entry is sent to its target biome
|
||||
from world/biomes.json, the extra entries are appended, and the result becomes
|
||||
the inline biome list of WorldGen Editor's delegate in
|
||||
from world/biomes.json ("remap"), or cut into pieces along one climate
|
||||
parameter ("split": each piece of the parameter's range goes to its own
|
||||
biome; the parts no piece covers are dropped, so the biome around them takes
|
||||
over), the extra entries are appended ("add"), and the result becomes the
|
||||
inline biome list of WorldGen Editor's delegate in
|
||||
datapacks/core/data/cobblesurvival/worldgen/world_preset/island.json.
|
||||
|
||||
The world type has no Nether dimension.
|
||||
@@ -38,11 +41,28 @@ def vanilla_parameters():
|
||||
return json.loads(report.read_text())["biomes"]
|
||||
|
||||
|
||||
def split(entry, rule):
|
||||
"""The pieces of a vanilla entry along rule["parameter"], each sent to its own biome."""
|
||||
name = rule["parameter"]
|
||||
value = entry["parameters"][name]
|
||||
low, high = (value, value) if isinstance(value, (int, float)) else value
|
||||
pieces = []
|
||||
for piece in rule["pieces"]:
|
||||
a, b = max(low, piece["range"][0]), min(high, piece["range"][1])
|
||||
if a < b or (a == b and low == high):
|
||||
pieces.append({"biome": piece["to"], "parameters": {**entry["parameters"], name: [a, b]}})
|
||||
return pieces
|
||||
|
||||
|
||||
def main():
|
||||
spec = json.loads((ROOT / "world/biomes.json").read_text())
|
||||
targets = set(spec["allowed"]) | set(spec["water"])
|
||||
entries, unmapped = [], set()
|
||||
splits = {s["biome"]: s for s in spec.get("split", [])}
|
||||
for entry in vanilla_parameters():
|
||||
if entry["biome"] in splits:
|
||||
entries += split(entry, splits[entry["biome"]])
|
||||
continue
|
||||
target = spec["remap"].get(entry["biome"])
|
||||
if target is None:
|
||||
unmapped.add(entry["biome"])
|
||||
|
||||
Reference in new issue
Block a user