#worldgen.add - dont work with atm:mining dim

38 messages · Page 1 of 1 (latest)

noble fulcrum
#

Hey, my friend want to add ores into the mining dimension from atm (only the mod not the modpack).
Its difficulty to finds out how to add them correct.
In other modpacks for 1.18.2 this script works completely, also in other dimensions.
Is this atm related or is the script actually wrong.
Thx for read and wasting your time for me7545minecraftheart

onEvent('worldgen.add', event => {
  event.addOre((ore) => {
    ore.id = "kubejs:gold_block" // optional
    ore.biomes = "allthemodium:mining"
    ore.addTarget('minecraft:stone', 'minecraft:gold_block')
    ore.addTarget('minecraft:deepslate', 'minecraft:gold_block')
    ore.size(50)     // ores per cluster
    ore.count([1,3])     // clusters per chunk, can also be a range eg ore.count(15,20)
    ore.worldgenLayer = "underground_ores"
    ore.triangleHeight(-63, 70)
    ore.chance = 200
  })
})
prime pondBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

placid heron
#

I feel like the ore.worldgenLayer = "underground_ores" is the issue here

#

I could be wrong tho.

noble fulcrum
#

okay so I should use a other methode

placid heron
#

Having a look at ATM8 (1.19)

    event.addOre((ore) => {
        ore.id = "kubejs:mining_uraninite";
        ore.biomes = ["allthemodium:mining"];
        ore.addTarget("minecraft:stone", "powah:uraninite_ore");
        ore.addTarget("minecraft:deepslate", "powah:deepslate_uraninite_ore");
        ore.size(4);
        ore.count(6);
        ore.squared();
        ore.uniformHeight(64, 254);
    });
#

Biomes is an array too

#

So you wanna make it an array.

#

Actualyl that's probably the real issue xD

#

Not sure why you'd need to specify "underground_ores" tho

noble fulcrum
#

is this optional?

placid heron
#

Not sure about 1.18

#

Could be..

pale notch
#
onEvent('worldgen.add', event => {
  
    event.addOre((ore) => {
    ore.id = "kubejs:mining_thermal_apatite"
    ore.biomes = ['allthemodium:mining']
    ore.addTarget('minecraft:stone', 'thermal:apatite_ore')
    ore.addTarget('minecraft:deepslate', 'thermal:deepslate_apatite_ore')
    ore.size(7)
    ore.count([4,12])
    ore.squared()
    ore.triangleHeight(-34, 60)
  })
#

this is the atm7 worldgen

placid heron
#

Yeah the worldgenlayer is useless. as you specify height differently andthe biomes is an array of biomes

pale notch
#

i will look if it works

placid heron
#

Arrays in JS ```js
let array = [];

Always use [] brackets.
#
let array = ["biome1", "biome2"];
noble fulcrum
#

okay, thx you I will try

pale notch
#

"allthemodium:mining" is the dim and the biome the mining dim has only that one dim

#

nothing

placid heron
#

i'd assume it'd be something like this:

onEvent("worldgen.add", (event) => {
    event.addOre((ore) => {
        ore.id = "kubejs:gold_block";
        ore.biomes = ["allthemodium:mining"];
        ore.addTarget("minecraft:stone", "minecraft:gold_block");
        ore.addTarget("minecraft:deepslate", "minecraft:gold_block");
        ore.size(50);
        ore.count([1, 3]);
        ore.triangleHeight(-63, 70);
        ore.chance(200);
    });
});
pale notch
#

i will try

placid heron
#

chance is a method that takes an input similar to size.

#

It's also a "1 in N" where N is the number you give as an input so 200 would produce a 1 in 200 chance for it to try spawning.

#

You can make it lower than one to increase it significantly.

pale notch
#

still nothing i try to put the chance lower

placid heron
#

1 in 200 is a really low chance

#

I'd say put it to 1 just to test it works properly

pale notch
#

its on one

noble fulcrum
#

seems to be weird maybe a issue from atm sides

placid heron
#

Is there any errors?

#

logs > kubejs > startup.txt

plush kettle
#

count is not an array, your first post the comments had the right example

#

just like triangleheight, you're passing two numbers, not an array of numbers

pale notch
#

its the version of the mod

prime pondBOT
#

@noble fulcrum Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!