Skip to content

Commit

Permalink
Custom Generator Dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
HirziDevs committed Jun 22, 2024
1 parent c4f1cee commit 01a70ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ config.enableCustomGenerator = false

config.customGenerator = [
{
dimension: ["minecraft:overworld", "minecraft:nether", "minecraft:the_end"],
left_block: ["minecraft:stone"],
right_block: ["minecraft:dripstone_block"],
under_block: [],
Expand All @@ -159,6 +160,7 @@ config.customGenerator = [
mobs: []
},
{
dimension: ["minecraft:overworld", "minecraft:nether", "minecraft:the_end"],
left_block: ["minecraft:flowing_water", "minecraft:water", "WATERLOGGED"],
right_block: ["minecraft:flowing_lava", "minecraft:lava"],
under_block: ["minecraft:netherite_block"],
Expand All @@ -179,6 +181,7 @@ config.customGenerator = [
mobs: []
},
{
dimension: ["minecraft:overworld", "minecraft:nether", "minecraft:the_end"],
left_block: ["minecraft:flowing_water", "minecraft:water", "WATERLOGGED"],
right_block: ["minecraft:flowing_lava", "minecraft:lava"],
under_block: ["minecraft:grass_block"],
Expand Down
4 changes: 4 additions & 0 deletions scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ function Generator(generatorBlock, gamemode, tool) {
!config.customGenerator[customGeneratorID].tools.includes(tool.type.id)
) return;

if (isCustomGenerator && config.customGenerator[customGeneratorID].dimension?.length > 0 &&
!config.customGenerator[customGeneratorID].dimension.includes(dimension.id)
) return;

if (blocks.length > 0) {
let blockChances = 0;
let selectedBlock = blocks[0].chance;
Expand Down

0 comments on commit 01a70ad

Please sign in to comment.