brachy84 / DevTech

Gregtech Community Edition addon
7 stars 3 forks source link

[BUG] Can't register Meta Item #9

Closed jude123412 closed 8 months ago

jude123412 commented 9 months ago

Describe the bug Well the bug in question is registering Meta Items. devtech won't register meta items with a .zs script.

Versions Forge: 14.23.5.2860 GTCEU: Version 2.7.4 CraftTweaker: Version 4.1.20.695

Setup Playing Solo, Any save will work the same

Steps To Reproduce have a .zs script with this script in it.

import mods.gregtech.MetaItem;

val test_meta_item = MetaItem.create(1, "test_meta_item");

Load the game with a script with this method in it and CT won't add any Meta Item with that name.

Expected behavior No script error will occur with this script installed even though when creating this scrip crafttweaker tells you the method to use this scripted when typed incorrectly. CraftTweaker even loads the script but nothing registers after This -> [INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: devtech\metaitem.zs} in the crafttweaker log.

Blocky106 commented 9 months ago

maybe try #loader gregtech

Blocky106 commented 9 months ago

also I think the examples are for gtce

jude123412 commented 8 months ago

@Blocky106 thank you for pointing out the #loader gregtech at the top, the script now works :D I missed the loader looking at the source code xD

loader gregtech

import mods.gregtech.MetaItem;

MetaItem.create(1, "mica_based_insulator_pulp");