Skip to content

Conversation

@jurrejelle
Copy link
Contributor

@jurrejelle jurrejelle commented Jan 2, 2026

trying to fix oreveins so they work for KJS

Currently using

ServerEvents.registry('gtceu:ore_vein', event => {
    event.create('kubejs:redstone')
        .layer(GTWorldGenLayers.STONE)
        .weight(60)
        .clusterSize(50)
        .density(0.55)
        .discardChanceOnAirExposure(1)
        .heightRangeUniform(16, 128)
        .layeredVeinGenerator(generator => {
            generator.withLayerPattern(pattern => {
                pattern.layer(l => l.weight(3).mat(GTMaterials.Redstone).size(2, 4))
                pattern.layer(l => l.weight(2).mat(GTMaterials.Barite).size(1, 3))
                pattern.layer(l => l.weight(3).mat(GTMaterials.Trona).size(1, 3))
            })
        })
        .surfaceIndicatorGenerator(indicator => {
            indicator.surfaceRock(GTMaterials.Redstone)
            indicator.density(0.2)
            indicator.radius(4)
        })
})

When running, it currently still gives a
[Render thread/ERROR] [KubeJS Server/]: server_scripts:BrokenStuff.js#20: Failed to register object 'kubejs:redstone' of registry 'gtceu:ore_vein'! - java.lang.NullPointerException

God why did we move away from having custom events. Everything isn't initialized yet in SeverEvents.registry() and a bunch of stuff that runs post-registry hasn't run yet either >:(

Also why is KubeJS error logging so bad what od you mean "NullPointerException lol go figure it out" :(

@jurrejelle jurrejelle requested a review from a team as a code owner January 2, 2026 10:33
@jurrejelle jurrejelle marked this pull request as draft January 2, 2026 10:33
@github-actions github-actions bot added the 1.21 label Jan 2, 2026
@jurrejelle jurrejelle added type: bugfix General bug fixes Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. labels Jan 2, 2026
@github-actions github-actions bot added the Tests: Passed Game Tests have passed on this PR label Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.21 Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. Tests: Passed Game Tests have passed on this PR type: bugfix General bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants