Skip to content

Instantly share code, notes, and snippets.

#loader contenttweaker
#priority 100
#debug
import crafttweaker.item.IItemStack;
import mods.contenttweaker.Random;
import scripts.lootTableTest.lootTableEntry.MyLootTableEntry;
zenClass MyLootTable {
#loader contenttweaker
import mods.contenttweaker.MaterialSystem;
import mods.mekatweaker.Gas;
import mods.mekatweaker.GasFactory;
import mods.mekatweaker.InfuserType;
//#######################
//### MEKANISM GASSES ###
package crafttweaker.api.tests.functional;
import crafttweaker.annotations.*;
import stanhebben.zenscript.annotations.*;
@ZenClass("crafttweaker.tests_functional.RecipeFilter")
@ZenRegister
@FunctionalInterface
public interface RecipeFilter<T> {
package de.dhbwka.java.exercise.datastructures;
public class KellerArray<T> {
private final int maxSize;
private final Object[] data;
private int position;
public KellerArray(int maxSize) {

Getting started with CrT:

So, you installed CraftTweaker, congratulations!

Now, the next time you start your game, a new folder will appear in your minecraft instance, called scripts.
Also, note that a new file has appeared called crafttweaker.log. This file will be important later on!

The scripts folder is the place where all the magic will happen. Initially it is empty, so no actions will take place.

[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: kragnoth_zenclass.zs}
[INITIALIZATION][CLIENT][INFO] Checking for diamond
[INITIALIZATION][CLIENT][INFO] Checking with <minecraft:diamond_helmet>: true
[INITIALIZATION][CLIENT][INFO] Checking with <minecraft:diamond_chestplate>: true
[INITIALIZATION][CLIENT][INFO] Checking with <minecraft:diamond_leggings>: true
[INITIALIZATION][CLIENT][INFO] Checking with <minecraft:diamond_boots>: true
[INITIALIZATION][CLIENT][INFO] Checking with <minecraft:golden_helmet>: false
[INITIALIZATION][CLIENT][INFO] Checking with <minecraft:golden_chestplate>: false
[INITIALIZATION][CLIENT][INFO] Checking with <minecraft:golden_leggings>: false
[INITIALIZATION][CLIENT][INFO] Checking with <minecraft:golden_boots>: false
val craftingItem = <immersiveengineering:tool>.transformNew(function(item){
if(!item.hasTag){
return item.withTag({Damage: 1});
}
val tag = item.tag;
if(!(tag has "Damage")){
return item.withTag(tag + {Damage: 1});
}
val newDamage = tag.Damage.asInt() + 1;
if(damage > 250) {
static T5_locations as int[][] = [
[ 9, 13, 21, 14, 10],
[15, 0, 1, 2, 16],
[22, 3, 4, 5, 23],
[17, 6, 7, 8, 18],
[11, 19, 24, 20, 12]];
function addBaseAltarRecipe(recipeLocation as string, output as IItemStack, inputs as IIngredient[][], starlight as int, craftingTickTime as int, additionalInputs as IIngredient[], constellation as string) as void {
import crafttweaker.item.IIngredient;
import crafttweaker.item.IItemStack;
import crafttweaker.block.IBlockState;
import crafttweaker.block.IBlockStateMatcher;
import crafttweaker.world.IBlockPos;
import crafttweaker.event.PlayerInteractBlockEvent;
import crafttweaker.player.IPlayer;
#debug
import crafttweaker.item.IItemStack;
import crafttweaker.item.IIngredient;
function FlattenIngredient(inputs as IItemStack[]) as IIngredient {
return FlattenIngredientAnyDamageParam(inputs, false);
}