-
Notifications
You must be signed in to change notification settings - Fork 324
Fix ore builder KJS errors in 1.21 #4424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ore builder KJS errors in 1.21 #4424
Conversation
…an't pass the not-yet-existing OreVeinDefinition into the layer pattern builder
…ause the normal way isn't initialized yet
|
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)
})
}) |
|
The |
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 |
Discussion on the Discord (https://discord.com/channels/701354865217110096/1089296351906504835/1458127621572268075) have found that is not relevant to this PR; so the |
…stores it for later
…dd a parameter manually specifying the registry to use
| import java.util.Optional; | ||
| import java.util.stream.Stream; | ||
|
|
||
| public interface SpecialHolderWrapper { |
There was a problem hiding this comment.
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'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Reabstraction
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve
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