Zen: Foundry ๐ŸŒ‹

Zen: Foundry ๐ŸŒ‹

233k Downloads

[1.12.2] Crash when using new CraftTweaker Moldstation method

MasterEnderman opened this issue ยท 6 comments

commented

Forge: 14.23.5.2838
Foundry: 1.7.10
Crash-Report: https://paste.dimdev.org/zutahohuru.mccrash

commented

Your script?

commented
#modloaded foundry
#priority 100

import crafttweaker.item.IItemStack;
import crafttweaker.item.IIngredient;
import crafttweaker.liquid.ILiquidDefinition;
import crafttweaker.liquid.ILiquidStack;
import crafttweaker.oredict.IOreDict;
import crafttweaker.oredict.IOreDictEntry;

import scripts.CraftTweaker.Functions.transformString;

import mods.foundry.MoldStation;

global mold as IItemStack[string] = {
    "ingot" : <foundry:mold:0>,
    "plate" : <foundry:mold:1>,
    "gear" : <foundry:mold:2>,
    "rod" : <foundry:mold:3>,
    "block" : <foundry:mold:4>,
    "slab" : <foundry:mold:5>,
    "stair" : <foundry:mold:6>,
    "nugget" : <foundry:mold:7>,
    "pickaxe" : <foundry:mold:8>,
    "axe" : <foundry:mold:9>,
    "sword" : <foundry:mold:10>,
    "shovel" : <foundry:mold:11>,
    "hoe" : <foundry:mold:12>,
    "shears" : <foundry:mold:13>,
    "helmet" : <foundry:mold:14>,
    "chestplate" : <foundry:mold:15>,
    "leggings" : <foundry:mold:16>,
    "boots" : <foundry:mold:17>,
    "sickle" : <foundry:mold:18>,
    "hammer" : <foundry:mold:19>,
    "excavator" : <foundry:mold:20>,
    "grindingball" : <foundry:mold:21>
};

var moldPattern as int[][string][IItemStack] = {
    mold["stair"] : {
        "old" : [
            0,0,0,4,4,4,
            0,0,0,4,4,4,
            0,0,0,4,4,4,
            4,4,4,4,4,4,
            4,4,4,4,4,4,
            4,4,4,4,4,4
        ]
    },
    mold["slab"] : {
        "old" : [
            0,0,0,0,0,0,
            0,0,0,0,0,0,
            0,0,0,0,0,0,
            4,4,4,4,4,4,
            4,4,4,4,4,4,
            4,4,4,4,4,4
        ]
    },
    mold["ingot"] : {
        "old" : [
            2,2,
            2,2,
            2,2,
            2,2
        ]
    },
    mold["plate"] : {
        "old" : [
            1,1,1,1,
            1,1,1,1,
            1,1,1,1,
            1,1,1,1
        ]
    },
    mold["gear"] : {
        "old" : [
            1,0,1,0,1,
            0,1,1,1,0,
            1,1,1,1,1,
            0,1,1,1,0,
            1,0,1,0,1
        ]
    },
    mold["rod"] : {
        "old" : [
            1,
            1,
            1,
            1,
            1,
            1
        ]
    },
    mold["block"] : {
        "old" : [
            4,4,4,4,4,4,
            4,4,4,4,4,4,
            4,4,4,4,4,4,
            4,4,4,4,4,4,
            4,4,4,4,4,4,
            4,4,4,4,4,4
        ]
    },
    mold["nugget"] : {
        "old" : [
            1,1,1,
            1,1,1,
            0,1,0 
        ]
    }
};

for mold, data in moldPattern {
    for key, pattern in data {
        if (key == "old") {
            print("Removed a Mold Recipe");
            MoldStation.removeRecipe(mold);
        } else {
            print("Added a Mold Recipe");
            MoldStation.addRecipe(mold, 6, 6, pattern);
        }
    }
}
commented

It nicely worked when I am using your script. Here is log:

[PREINITIALIZATION][CLIENT][INFO] Current loaders after merging: [[preinit]]
[PREINITIALIZATION][CLIENT][INFO] Loading scripts for loader with names [preinit]
[PREINITIALIZATION][CLIENT][INFO] [preinit | SIDE_CLIENT]: Skipping file {[100:crafttweaker]: test.zs} as we are currently loading with a different loader
[PREINITIALIZATION][CLIENT][INFO] Completed script loading in: 14ms
[INITIALIZATION][CLIENT][INFO] CraftTweaker: Building registry
[INITIALIZATION][CLIENT][INFO] CraftTweaker: Successfully built item registry
[INITIALIZATION][CLIENT][INFO] Current loaders after merging: [[preinit], [recipeevent | crafttweaker]]
[INITIALIZATION][CLIENT][INFO] Loading scripts for loader with names [crafttweaker | recipeevent]
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[100:crafttweaker]: test.zs}
[INITIALIZATION][CLIENT][INFO] Removed a Mold Recipe
[INITIALIZATION][CLIENT][INFO] Removed a Mold Recipe
[INITIALIZATION][CLIENT][INFO] Removed a Mold Recipe
[INITIALIZATION][CLIENT][INFO] Removed a Mold Recipe
[INITIALIZATION][CLIENT][INFO] Removed a Mold Recipe
[INITIALIZATION][CLIENT][INFO] Removed a Mold Recipe
[INITIALIZATION][CLIENT][INFO] Removed a Mold Recipe
[INITIALIZATION][CLIENT][INFO] Removed a Mold Recipe
[INITIALIZATION][CLIENT][INFO] Completed script loading in: 360ms
[POSTINITIALIZATION][CLIENT][INFO] Removing mold station recipe: ( 1, 6, [ 1, 1, 1, 1, 1, 1] ) -> <foundry:mold:3> * 1
[POSTINITIALIZATION][CLIENT][INFO] Removing mold station recipe: ( 3, 3, [ 1, 1, 1, 1, 1, 1, 0, 1, 0] ) -> <foundry:mold:7> * 1
[POSTINITIALIZATION][CLIENT][INFO] Removing mold station recipe: ( 6, 6, [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4] ) -> <foundry:mold:5> * 1
[POSTINITIALIZATION][CLIENT][INFO] Removing mold station recipe: ( 5, 5, [ 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1] ) -> <foundry:mold:2> * 1
[POSTINITIALIZATION][CLIENT][INFO] Removing mold station recipe: ( 2, 4, [ 2, 2, 2, 2, 2, 2, 2, 2] ) -> <foundry:mold:0> * 1
[POSTINITIALIZATION][CLIENT][INFO] Removing mold station recipe: ( 6, 6, [ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4] ) -> <foundry:mold:4> * 1
[POSTINITIALIZATION][CLIENT][INFO] Removing mold station recipe: ( 6, 6, [ 0, 0, 0, 4, 4, 4, 0, 0, 0, 4, 4, 4, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4] ) -> <foundry:mold:6> * 1
[POSTINITIALIZATION][CLIENT][INFO] Removing mold station recipe: ( 4, 4, [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] ) -> <foundry:mold:1> * 1
[SERVER_STARTED][CLIENT][INFO] Fixed the RecipeBook

commented

Still crashing with new version: https://paste.dimdev.org/dumafiziwe.mccrash
a bit strange that it still shows 1.7.10 in the log, even if i have the 1.7.11 installed

commented

Hmmm I have no idea about how to reproduce this bug.