GregTechCEu Modern

GregTechCEu Modern

6M Downloads

Can't make GT tools using KJS integration

Xefyr0 opened this issue ยท 1 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.4.0

Minecraft Version

1.20.1

Recipe Viewer Installed

EMI

Environment

Singleplayer

Cross-Mod Interaction

Yes

Other Installed Mods

Gregtech, EMI, and KubeJS (And dependencies)
Also confirmed to occur on Monifactory.

Expected Behavior

KubeJS integration enables the creation of tools for materials added also via KJS

Actual Behavior

Script loaded with no errors, yet tools were not craftable or visible in EMI.

Steps to Reproduce

  1. Create instance with EMI, KJS, and GTCEU and their dependencies.
  2. Put the following code into startup_scripts
    GTCEuStartupEvents.registry('gtceu:material', event => { event.create('test_material') .ingot() .components('1x andesite', '1x iron') .color(0x839689).iconSet(GTMaterialIconSet.DULL) .flags(GTMaterialFlags.GENERATE_PLATE, GTMaterialFlags.GENERATE_GEAR, GTMaterialFlags.GENERATE_SMALL_GEAR) .toolStats(ToolProperty.Builder.of(9, 10, 640, 2) .ignoreCraftingTools() .unbreakable() .enchantment('minecraft:fortune', 2) .magnetic() .build()) })
  3. Observe that no custom tools were created

Additional Information

No response

commented

try ToolProperty.Builder['of(float,float,int,int)'](9, 10, 640, 2)
idk why it now requires that, it didn't before, but whatever