Skip to content
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

Provide a way to set a custom formula for a material at the point of definition in kubejs. #2515

Open
tomprince opened this issue Dec 8, 2024 · 0 comments · May be fixed by #2594
Open

Provide a way to set a custom formula for a material at the point of definition in kubejs. #2515

tomprince opened this issue Dec 8, 2024 · 0 comments · May be fixed by #2594
Labels
type: feature New feature or request

Comments

@tomprince
Copy link
Contributor

tomprince commented Dec 8, 2024

Cross-mod Integration

No response

Feature Description

This is currently possible to do, but it appears to require hooking into two different events:

GTCEuStartupEvents.registry('gtceu:material', event => {
      event.create('ammonium_hexachloroplatinate')
          .dust()
          .color(0xfef0c2).iconSet('metallic')
          .flags(GTMaterialFlags.DISABLE_DECOMPOSITION)
          .components('2x nitrogen', '8x hydrogen', 'platinum', '6x chlorine')
}

GTCEuStartupEvents.materialModification(() => {
      GTMaterials.get('ammonium_hexachloroplatinate').setFormula('(NH4)2PtCl6');
})

It would be nice if there was a way to do this that didn't require doing things into two places.

@tomprince tomprince added the type: feature New feature or request label Dec 8, 2024
@tomprince tomprince linked a pull request Dec 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant