Skip to content

Instantly share code, notes, and snippets.

@kindlich
kindlich / crafttweaker.log
Created January 17, 2018 18:42
More ZS funciton stuff
[PREINITIALIZATION][CLIENT][INFO] Loading scripts
[PREINITIALIZATION][CLIENT][INFO] [contenttweaker | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: fun.zs} as we are currently loading with a different loader
[PREINITIALIZATION][CLIENT][INFO] [contenttweaker | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: funCalling.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] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: fun.zs}
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: funCalling.zs}
[INITIALIZATION][CLIENT][INFO] I was called as 1 time this item: Iron Ingot
---- Minecraft Crash Report ----
WARNING: coremods are present:
FMLPlugin (elulib-0.1.11.jar)
Contact their authors BEFORE contacting forge
// Ouch. That hurt :(
Time: 1/20/18 4:57 PM
Description: Exception in server tick loop
@kindlich
kindlich / Skytest.class
Created January 21, 2018 14:58
Sky PartType
public class SkyTest implements Runnable {
public static void __script__() {
IPartType var1 = CTMaterialSystem.createPartType("crafting_tool", new ZenClass0());
IPartDataPiece var3 = CTMaterialSystem.createPartDataPiece("maxDamage", false);
var1.setData(new IPartDataPiece[]{var3});
IPart var5 = CTMaterialSystem.getPartBuilder().setName("saw").setPartType(var1).build();
IMaterial var7 = CTMaterialSystem.getMaterialBuilder().setName("Pyure Cobalt").setColor(18347).build();
IMaterial var9 = CTMaterialSystem.getMaterialBuilder().setName("Pyure Tin").setColor(10275286).build();
var7.registerPart(var5);
var9.registerPart(var5);
import crafttweaker.data.IData;
import crafttweaker.item.IItemStack;
val goldBlock=<minecraft:gold_block>;
val sideItems = {
efficiency: <minecraft:potion>.withTag({Potion: "minecraft:strong_swiftness"}),
unbreaking: <minecraft:potion>.withTag({Potion: "minecraft:strong_strength"})
} as IItemStack[string];
@kindlich
kindlich / teeto.zs
Last active February 25, 2018 20:23
import mods.modularmachinery.RecipePrimer;
import mods.modularmachinery.RecipeBuilder;
import crafttweaker.item.IItemStack;
import crafttweaker.item.IIngredient;
import crafttweaker.liquid.ILiquidStack;
import crafttweaker.oredict.IOreDictEntry;
import crafttweaker.data.IData;
/*
#loader contenttweaker
import mods.contenttweaker.VanillaFactory;
import mods.contenttweaker.PartType;
import mods.contenttweaker.MaterialSystem;
import mods.contenttweaker.Commands;
var egg = VanillaFactory.createItem("charmander_spawn_egg");
egg.maxStackSize = 64;
egg.itemRightClick = function(stack, world, player, hand) {
if (stack.tag has "entity") {
import crafttweaker.item.IIngredient;
import crafttweaker.recipes.IRecipeFunction;
val oreDict = <ore:myUniqueOreDict>;
//Simply So that I have an oreDict
oreDict.add(<minecraft:iron_ingot>, <minecraft:gold_ingot>, <minecraft:redstone>, <minecraft:grass>);
val recipeFunctionSingleItems as IRecipeFunction = function(out, ins, cInfo){
import crafttweaker.event.PlayerDeathDropsEvent;
import crafttweaker.event.PlayerFillBucketEvent;
import crafttweaker.event.PlayerOpenContainerEvent;
import crafttweaker.event.EntityLivingUseItemEvent.Finish;
import crafttweaker.event.EntityLivingFallEvent;
import crafttweaker.world.IBlockPos;
events.onPlayerDeathDrops(function(event as PlayerDeathDropsEvent) {
print("Items:");
#loader contenttweaker
//Note: Works fine when during CraftTweaker runtime as well!
val builder = mods.contenttweaker.enchantments.EnchantmentBuilder.create("kindlich_chant");
builder.applicableSlots = [mainHand, offhand, feet, legs, chest, head];
builder.setTypeAll();
builder.setRarityVeryRare();
builder.calcModifierDamage = function(thisEnch, level, damageSource){
return level;
};
import crafttweaker.data.IData;
import crafttweaker.item.IIngredient;
var backpack = <improvedbackpacks:backpack>;
var ironBackpacksIngredient as IIngredient =
<ironbackpacks:backpack>.withTag({packInfo: {upgrade: [], type: "ironbackpacks:basic", spec: "NONE"}}) |
<ironbackpacks:backpack>.withTag({packInfo: {upgrade: [], type: "ironbackpacks:iron", spec: "STORAGE"}}) |
<ironbackpacks:backpack>.withTag({packInfo: {upgrade: [], type: "ironbackpacks:gold", spec: "STORAGE"}}) |
<ironbackpacks:backpack>.withTag({packInfo: {upgrade: [], type: "ironbackpacks:diamond", spec: "STORAGE"}});