GregTechCEu / GregTech-Modern

GregTech CE Unofficial for modern versions
GNU Lesser General Public License v3.0
263 stars 152 forks source link

Can't make GT tools using KJS integration #1867

Closed Xefyr0 closed 2 weeks ago

Xefyr0 commented 2 weeks ago

Checked for existing issues

Tested 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

screret commented 2 weeks ago

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