summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js75
1 files changed, 52 insertions, 23 deletions
diff --git a/index.js b/index.js
index 3c6a450..0bc43cd 100644
--- a/index.js
+++ b/index.js
@@ -2,7 +2,7 @@ const path = require('path');
const fs = require('fs');
const { execSync } = require('child_process');
-const { jigsawConversion } = require('./src/worldgen/structure/index.js');
+const { jigsawConversion, jigsawStartHeightBiasedToBottom } = require('./src/worldgen/structure/index.js');
const { TemplatePool, JigsawStartHeight } = require('./src/enum.js');
@@ -96,29 +96,40 @@ function overwriteWorldgenNoiseSettings(name, data) {
// overworld
-const overworld = getWorldgenNoiseSettingsMeta('overworld');
-Object.assign(overworld, {
- aquifers_enabled: false,
- ore_veins_enabled: false,
- default_block: {
- ...overworld.default_block,
-
- Name: 'minecraft:air',
- },
- default_fluid: {
- ...overworld.default_fluid,
+function overworldNoiseSettingsAdjustments(base) {
+ return {
+ aquifers_enabled: false,
+ ore_veins_enabled: false,
+ default_block: {
+ ...base.default_block,
+
+ Name: 'minecraft:air',
+ },
+ default_fluid: {
+ ...base.default_fluid,
- Name: 'minecraft:air',
- },
- noise: {
- ...overworld.noise,
+ Name: 'minecraft:air',
+ },
+ noise: {
+ ...base.noise,
- min_y: 0,
- height: 320,
- },
-});
+ min_y: 0,
+ height: 320,
+ },
+ };
+};
+const overworld = getWorldgenNoiseSettingsMeta('overworld');
+Object.assign(overworld, overworldNoiseSettingsAdjustments(overworld));
overwriteWorldgenNoiseSettings('overworld', overworld);
+const largeBiomes = getWorldgenNoiseSettingsMeta('large_biomes');
+Object.assign(largeBiomes, overworldNoiseSettingsAdjustments(largeBiomes));
+overwriteWorldgenNoiseSettings('large_biomes', largeBiomes);
+
+const amplified = getWorldgenNoiseSettingsMeta('amplified');
+Object.assign(amplified, overworldNoiseSettingsAdjustments(amplified));
+overwriteWorldgenNoiseSettings('amplified', amplified);
+
// nether
const nether = getWorldgenNoiseSettingsMeta('nether');
Object.assign(nether, {
@@ -201,9 +212,16 @@ overwriteWorldgenStructure('igloo', igloo);
// ocean monument
let monument = getWorldgenStructureMeta('monument');
monument = jigsawConversion(monument, {
- start_pool: TemplatePool.EMPTY_FULL,
+ start_pool: 'vanilla_skyblock:ocean_monument',
start_height: JigsawStartHeight.BIASED_TO_BOTTOM,
});
+monument.spawn_overrides.monster.spawns[0].weight = 100;
+monument.spawn_overrides.monster.spawns.push({
+ maxCount: 1,
+ minCount: 1,
+ type: 'minecraft:elder_guardian',
+ weight: 1,
+});
overwriteWorldgenStructure('monument', monument);
// ocean ruin cold
@@ -263,7 +281,7 @@ for (const structure of shipwrecks) {
overwriteWorldgenStructure(structure, shipwreck);
}
-// stronhold
+// stronghold
let stronghold = getWorldgenStructureMeta('stronghold');
stronghold = jigsawConversion(stronghold, {
start_pool: 'vanilla_skyblock:stronghold',
@@ -276,6 +294,12 @@ const trailRuins = getWorldgenStructureMeta('trail_ruins');
delete trailRuins['project_start_to_heightmap'];
overwriteWorldgenStructure('trail_ruins', trailRuins);
+// village - desert
+const villageDesert = getWorldgenStructureMeta('village_desert');
+delete villageDesert['project_start_to_heightmap'];
+villageDesert.start_height = jigsawStartHeightBiasedToBottom;
+overwriteWorldgenStructure('village_desert', villageDesert);
+
/*
@@ -401,6 +425,11 @@ for (const village of villages) {
const villageTemplatePool = getMetaData(`worldgen/template_pool/${villageStartPool}`);
for (const templatePoolElement of villageTemplatePool.elements) {
const location = templatePoolElement.element.location.replace('minecraft:', '');
- replaceData('structure/empty_16.nbt', `structure/${location}.nbt`);
+
+ if (village === 'village_desert') {
+ replaceData('structure/village_desert.nbt', `structure/${location}.nbt`);
+ } else {
+ replaceData('structure/empty_16.nbt', `structure/${location}.nbt`);
+ }
}
}