GregTechCEu / GregTech-Modern

GregTech CE Unofficial for modern versions
GNU Lesser General Public License v3.0
241 stars 132 forks source link

(KubeJS) vein.biomes requires every biome in a dimension #1561

Open Astral-Haze opened 2 weeks ago

Astral-Haze commented 2 weeks ago

Checked for existing issues

Tested latest version

GregTech CEu Version

v1.3.1

Recipe Viewer Installed

None

Environment

Singleplayer

Cross-Mod Interaction

Unsure

Other Installed Mods

Architectury, KubeJS, Rhino

Expected Behavior

vein.biomes() should set which biomes a vein can generate in, assuming the layer and dimension(s) allow it to

Actual Behavior

vein.biomes() being set results in a vein not spawning exceptions:

minecraft:is_overworld, #minecraft:is_nether, or #minecraft:is_end, a tag including or identical to one or more of the previous tags(not tested with overworld but tested with end and nether):

Behaves normally A tag of #minecraft:is_nether plus minecraft:taiga will result in biomes only generating in #minecraft:is_nether, and not in taigas

Steps to Reproduce

Use vein.biomes in GTCEuServerEvents.oreVeins with a tag, biome, or list of biomes Generate a world and use:

Example of veins generating:

GTCEuServerEvents.oreVeins(event => {
    event.add("bee:sulfur_brimstone", vein => {
        vein.weight(6400)
        vein.clusterSize(40)
        vein.density(0.25)
        vein.discardChanceOnAirExposure(0)
        vein.layer("stone")
        vein.dimensions("minecraft:overworld")
        vein.biomes("#minecraft:is_overworld")
        vein.heightRangeUniform(-60, 320)
        vein.layeredVeinGenerator(generator => generator
            .buildLayerPattern(pattern => pattern
            .layer(l => l.weight(3).mat(GTMaterials.Sulfur).size(2, 4))
            .layer(l => l.weight(2).mat(GTMaterials.Diamond).size(1, 1))
            .layer(l => l.weight(1).block(() => Block.getBlock('minecraft:lava')).size(1, 1))
            )
        )
    })
})

Examples of veins not generating:

GTCEuServerEvents.oreVeins(event => {
    event.add("bee:sulfur_brimstone", vein => {
        vein.weight(6400)
        vein.clusterSize(40)
        vein.density(0.25)
        vein.discardChanceOnAirExposure(0)
        vein.layer("stone")
        vein.dimensions("minecraft:overworld")
        vein.biomes("minecraft:forest")
        vein.heightRangeUniform(-60, 320)
        vein.layeredVeinGenerator(generator => generator
            .buildLayerPattern(pattern => pattern
            .layer(l => l.weight(3).mat(GTMaterials.Sulfur).size(2, 4))
            .layer(l => l.weight(2).mat(GTMaterials.Diamond).size(1, 1))
            .layer(l => l.weight(1).block(() => Block.getBlock('minecraft:lava')).size(1, 1))
            )
        )
    })
})
GTCEuServerEvents.oreVeins(event => {
    event.add("bee:sulfur_brimstone", vein => {
        vein.weight(6400)
        vein.clusterSize(40)
        vein.density(0.25)
        vein.discardChanceOnAirExposure(0)
        vein.layer("stone")
        vein.dimensions("minecraft:overworld")
        vein.biomes("#forge:is_cold")
        vein.heightRangeUniform(-60, 320)
        vein.layeredVeinGenerator(generator => generator
            .buildLayerPattern(pattern => pattern
            .layer(l => l.weight(3).mat(GTMaterials.Sulfur).size(2, 4))
            .layer(l => l.weight(2).mat(GTMaterials.Diamond).size(1, 1))
            .layer(l => l.weight(1).block(() => Block.getBlock('minecraft:lava')).size(1, 1))
            )
        )
    })
})

Additional Information

https://gregtechceu.github.io/gtceu-modern-docs/Modpacks/Ore-Generation/01-Customizing-Veins/ In the "Creating a new biome tag for your ore vein" dropdown, this page has "ServerEvents.tags('biome'," which will result in a crash if used with creating/modifying an ore vein, instead needing "ServerEvents.tags('worldgen/biome'." I am unsure if this is directly related but will mention it just in case it is

Astral-Haze commented 2 weeks ago

This is on Minecraft 1.20.1+NeoForge 47.1.106

screret commented 1 day ago

you can't mix a tag and a single entry.

Astral-Haze commented 1 day ago

if you're talking about there being two examples of the same vein, one with a tag and one with a biome, i only had one version at a time also testing instead with vein.biomes("minecraft:beach", "minecraft:stony_shore", "minecraft:ocean") seems to make a vein spawn in any biome, or at least extraneously in minecraft:forest, minecraft:jagged_peaks, and minecraft:mushroom_fields image image

Astral-Haze commented 1 day ago

oh and to be clear it spawning in the air here is intentional just to demonstrate