Skip to content

Instantly share code, notes, and snippets.

@kindlich
Created January 13, 2018 14:20
Show Gist options
  • Save kindlich/620cb543761ef6878b44b3ab5c93ea54 to your computer and use it in GitHub Desktop.
Save kindlich/620cb543761ef6878b44b3ab5c93ea54 to your computer and use it in GitHub Desktop.
ZS functions
[PREINITIALIZATION][CLIENT][INFO] Loading scripts
[PREINITIALIZATION][CLIENT][INFO] Debug Preprocessor found in {[0:crafttweaker]: fun.zs}, enabling debugmode
[PREINITIALIZATION][CLIENT][INFO] [contenttweaker | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: fun.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] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: fun.zs}
[INITIALIZATION][CLIENT][INFO] if this is pritned functions might work!
[INITIALIZATION][CLIENT][INFO] testttt
[INITIALIZATION][CLIENT][INFO] Light Blue Wool
#debug
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment