Skip to content

Instantly share code, notes, and snippets.

@kindlich
Created January 14, 2018 09:37
Show Gist options
  • Select an option

  • Save kindlich/14de9bdab315fde8261388b57fde65c2 to your computer and use it in GitHub Desktop.

Select an option

Save kindlich/14de9bdab315fde8261388b57fde65c2 to your computer and use it in GitHub Desktop.
Function Variables
[PREINITIALIZATION][CLIENT][INFO] Loading scripts
[PREINITIALIZATION][CLIENT][INFO] Debug Preprocessor found in {[0:crafttweaker]: fun.zs}, enabling debugmode
[PREINITIALIZATION][CLIENT][INFO] Debug Preprocessor found in {[0:crafttweaker]: xdis.zs}, enabling debugmode
[PREINITIALIZATION][CLIENT][INFO] [contenttweaker | SIDE_CLIENT]: Skipping file {[999:crafttweaker]: fun.zs} as we are currently loading with a different loader
[PREINITIALIZATION][CLIENT][INFO] [contenttweaker | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: xdis.zs} as we are currently loading with a different loader
[INITIALIZATION][CLIENT][INFO] CraftTweaker: Building registry
[INITIALIZATION][CLIENT][INFO] CraftTweaker: Successfully built item registry
[INITIALIZATION][CLIENT][INFO] Loading scripts
[INITIALIZATION][CLIENT][INFO] Debug Preprocessor found in {[0:crafttweaker]: fun.zs}, enabling debugmode
[INITIALIZATION][CLIENT][INFO] Debug Preprocessor found in {[0:crafttweaker]: xdis.zs}, enabling debugmode
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[999:crafttweaker]: fun.zs}
[INITIALIZATION][CLIENT][INFO] if this is pritned functions might work!
[INITIALIZATION][CLIENT][INFO] testttt
[INITIALIZATION][CLIENT][INFO] Light Blue Wool
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: xdis.zs}
[INITIALIZATION][CLIENT][INFO] 12
#debug
#priority 999
import crafttweaker.item.IItemStack;
import crafttweaker.item.IItemDefinition;
val fu = function(test1 as string) as void {
print(test1);
return;
};
fu("if this is pritned functions might work!");
fu("testttt");
val more = function(meta as int, amount as int, definition as IItemDefinition) as IItemStack{
return definition.makeStack(meta) * amount;
};
print(more(3, 10, <item:minecraft:wool>.definition).displayName);
global globalFu as function(int, int)int = function(one as int, two as int) as int {
return one * two;
};
#debug
print(globalFu(3, 4));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment