ContentTweaker

ContentTweaker

27M Downloads

Can't reference items or blocks within item functions

superfluke opened this issue ยท 1 comments

commented

No errors on /ct syntax but trying to reference an item/block within a CoT function give a [PREINITIALIZATION][CLIENT][ERROR] customitems.zs:63: Could not resolve <minecraft : gold_block> error on world load. Makes it impossible to use functions like player.give within CoT items.

Test script:

var goldpls = VanillaFactory.createItem("givegold");
goldpls.maxStackSize = 1;
goldpls.itemRightClick = function(stack, world, player, hand) {
    player.give(<minecraft:gold_block>);
    return "Pass";
    };
goldpls.register();

Tested on CoT: ContentTweaker-1.12.2-4.3.0-Snapshot.60
Forge: 14.23.0.2522

commented

Moving this to hotfix type deal. Try using the itemUtils stuff as a workaround for now.