KubeJS

KubeJS

61M Downloads

The 'square' function on ores is not working.

ChiefArug opened this issue ยท 3 comments

commented

versions:
KubeJS - 1605.3.18-build.144
Rhino - 1605.1.4-build.63
Architectury - 1.23.33
Forge - 36.2.6

When making an ore you can have the ore.squared property true or false. It is recommended to be true or you end up with very little variation in ores.

Setting it to true however does nothing. The ores still end up stacked neatly in columns, like shown below
image
As a note I am doing world gen stuff with datapacks, however this happens even in dimensions that I have not modified.

The code I am using:

event.addOre(ore => {
        ore.block = 'minecraft:iron_ore' // Block ID (Use [] syntax for properties)
        ore.spawnsIn.blacklist = false // Inverts spawn whitelist
        ore.spawnsIn.values = [ // List of valid block IDs or tags that the ore can spawn in
          '#minecraft:base_stone_overworld' // Default behavior - ores spawn in all stone types
        ]
        
        ore.biomes.blacklist = true // Inverts biome whitelist
        ore.biomes.values = [ // Biomes this ore can spawn in
        ]
        
        ore.clusterMinSize = 1 // Min blocks per cluster (currently ignored, will be implemented later, it's always 1)
        ore.clusterMaxSize = 9 // Max blocks per cluster
        ore.clusterCount = 25 // Clusters per chunk
        ore.minHeight = 5 // Min Y ore spawns in
        ore.maxHeight = 64 // Max Y ore spawns in
        ore.squared = true // Adds random value to X and Z between 0 and 16. Recommended to be true
        // ore.chance = 4 // Spawns the ore every ~4 chunks. You usually combine this with clusterCount = 1 for rare ores
      })```
commented

The issue is order-of-operations here, I fixed this in my indev PR that unfortunately never went anywhere, but this should be as simple as a one line fix @LatvianModder

commented

Any updates on this?

commented

Seeing as I've reworked the worldgen event completely in 1.18 and it now works properly, I'm going to close this issue. 1.16 is just... not worth backporting that whole mess to, sorry :P