GregTechCEu Modern

GregTechCEu Modern

6M Downloads

Register coil by using kubejs will cause recipes of assembly line and other custom machines lose

MrLaCar opened this issue ยท 8 comments

commented

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

1.20.1-1.2.1

Recipe Viewer Installed

EMI

Environment

Singleplayer

Cross-Mod Interaction

No

Other Installed Mods

No mod interactions
delete other mods only remain gtceu, emi still have problem

Expected Behavior

recipes of assembly line and custom machines should still loading

Actual Behavior

When adding custom coils cause recipes of assembly line and custom machines disappear

Steps to Reproduce

delete relative custom coil file and enter game repices loaded again but adding the files back still cause recipes not loaded

Additional Information

No response

commented

your code is wrong, change the coilMaterial call to use a supplier.

commented

no need to delete it, just do .coilMaterial(() => GTMaterials.get("material_id_here"))

commented

sorry my bad, it work normally now when I delete .coilMaterial

commented

okay, I'm ot sure what dose GTMaterials.get("material_id_here")) do and dose it affect the coil anything here

commented

could you send your current code?

commented

the material is used for the tooltip btw

commented

okay sure
StartupEvents.registry('block', event => {
event.create('stellar_alloy_coil_block', 'gtceu:coil')
.temperature(12302)
.level(16)
.energyDiscount(16)
.tier(8)
.texture('kubejs:block/coils/stellar_alloy_coil_block')
.coilMaterial(() => GTMaterials.get("stellar_alloy"))
.hardness(6)
.requiresTool(true)
.material('metal')
.tagBlock("forge:mineable/wrench")
.noValidSpawns(true)
})
It work now

commented

yes like that ๐Ÿ‘