Skip to content

Conversation

@jurrejelle
Copy link
Contributor

What

Fix the ore vein issues and allows us to actually create oreveins

Implementation Details

Also fixes the cape crash, imports the OS variable and does something(?) with the cape

Outcome

we can make oreveins again in kjs

@jurrejelle jurrejelle requested a review from a team as a code owner January 5, 2026 18:48
@jurrejelle jurrejelle added 1.21 type: bugfix General bug fixes Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. labels Jan 5, 2026
@jurrejelle jurrejelle changed the title Sc/fix ore builder error Fix ore builder KJS errors in 1.21 Jan 5, 2026
@jurrejelle jurrejelle mentioned this pull request Jan 5, 2026
@screret
Copy link
Contributor

screret commented Jan 5, 2026

example script:

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

@Reabstraction
Copy link
Contributor

The @SuppressWarnings("unused") lines in this PR should be removed; as they make zero sense

@screret
Copy link
Contributor

screret commented Jan 6, 2026

The @SuppressWarnings("unused") lines in this PR should be removed; as they make zero sense

most of the methods in those classes are unused in java code and the warnings annoyed me, so I suppressed them

@Reabstraction
Copy link
Contributor

The @SuppressWarnings("unused") lines in this PR should be removed; as they make zero sense

most of the methods in those classes are unused in java code and the warnings annoyed me, so I suppressed them

If they are unused; then you should explicitly add an @SupressWarnings("unused") // Should be used from JavaScript to each method that is like that

@Reabstraction
Copy link
Contributor

The @SuppressWarnings("unused") lines in this PR should be removed; as they make zero sense

most of the methods in those classes are unused in java code and the warnings annoyed me, so I suppressed them

If they are unused; then you should explicitly add an @SupressWarnings("unused") // Should be used from JavaScript to each method that is like that

Discussion on the Discord (https://discord.com/channels/701354865217110096/1089296351906504835/1458127621572268075) have found that is not relevant to this PR; so the @SupressWarnings("unused") are a non-issue

@jurrejelle jurrejelle mentioned this pull request Jan 6, 2026
import java.util.Optional;
import java.util.stream.Stream;

public interface SpecialHolderWrapper {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a note that most of this is taken from KJS'?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@Reabstraction Reabstraction left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve

@jurrejelle jurrejelle merged commit 7bbfeeb into GregTechCEu:1.21 Jan 7, 2026
4 of 6 checks passed
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. type: bugfix General bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants