Skip to content

Instantly share code, notes, and snippets.

#priority 1000
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.entity.AttributeOperation;
import crafttweaker.api.util.MCEquipmentSlotType;
public class AttributeBuilder {
var output as IItemStack;
var slot as MCEquipmentSlotType[];
public this(output as IItemStack, slot as MCEquipmentSlotType[]) {
package com.zook.devtechbotania.common.metatileentities;
import gregtech.api.capability.IControllable;
import gregtech.api.capability.impl.EnergyContainerHandler;
import gregtech.api.gui.ModularUI;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.MetaTileEntityHolder;
import gregtech.api.metatileentity.TieredMetaTileEntity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ITickable;
#loader gregtech
import mods.devtech.unification.IStoneType;
import mods.devtech.unification.IBlockStatePredicate;
import crafttweaker.block.IBlockState;
import mods.devtech.unification.IOrePrefix;
import mods.devtech.unification.IMaterialIconType;
import mods.devtech.unification.IMaterialPredicate;
var testOrePrefix = IOrePrefix.createOrePrefix("testOre", IMaterialIconType.get("ore"), 0, IMaterialPredicate.isDust & IMaterialPredicate.hasFlag("GENERATE_ORE"));
package com.zook.devtechlib.api.items;
import gregtech.api.items.metaitem.stats.IItemNameProvider;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
public class NameOverride implements IItemNameProvider {
private final String langKey;
public NameOverride(String langKey) {
[10:51:07.511][CONSTRUCT][CLIENT][INFO] Starting building internal Registries
[10:51:07.928][CONSTRUCT][CLIENT][INFO] The following mods have explicit CraftTweaker support:
'crafttweaker' at version '7.1.0.246'
'jeitweaker' at version '1.0.1.15'
[10:51:08.822][CONSTRUCT][CLIENT][INFO] Completed building internal Registries
[10:51:18.966][COMMON_SETUP][CLIENT][INFO] Started loading Scripts for Loader 'setupCommon'!
[10:51:20.558][COMMON_SETUP][CLIENT][INFO] Finished loading Scripts!
[10:51:55.264][DONE][CLIENT][INFO] Started loading Scripts for Loader 'crafttweaker'!
[10:51:55.345][DONE][CLIENT][INFO] Loading file: part.zs
[10:51:55.366][DONE][CLIENT][ERROR] Bad type on operand stack
{
"H": {
"name": "Hydrogen",
"protons": 1,
"neutrons": 0
},
"D": {
"name": "Deuterium",
"protons": 1,
"neutrons": 1
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package script;
public class Duad<A, B> {
private final Class<A> typeOfA;
private final Class<B> typeOfB;
public class BiConsumer<T, U> {
var biconsumer as function(t as T, u as U) as void;
this(biconsumer as function(t as T, u as U) as void) {
this.biconsumer = biconsumer;
}
public accept(t as T, u as U) as void {
var placeholder = biconsumer;
placeholder(t, u);
public class Predicate<T> {
var predicate as function(value as T) as bool;
this(predicate as function(value as T) as bool) {
this.predicate = predicate;
}
public test(value as T) as bool {
var placeholder = predicate;
return placeholder(value);
Exception in thread "main" java.lang.IllegalArgumentException
at org.openzen.zenscript.javabytecode.compiler.definitions.JavaMemberVisitor.visitMethod(JavaMemberVisitor.java:181)
at org.openzen.zenscript.javabytecode.compiler.definitions.JavaMemberVisitor.visitMethod(JavaMemberVisitor.java:24)
at org.openzen.zenscript.codemodel.member.MethodMember.accept(MethodMember.java:55)
at org.openzen.zenscript.javabytecode.compiler.definitions.JavaDefinitionVisitor.visitClass(JavaDefinitionVisitor.java:106)
at org.openzen.zenscript.javabytecode.compiler.definitions.JavaDefinitionVisitor.visitClass(JavaDefinitionVisitor.java:36)
at org.openzen.zenscript.codemodel.definition.ClassDefinition.accept(ClassDefinition.java:53)
at org.openzen.zenscript.javabytecode.JavaCompiler.compile(JavaCompiler.java:76)
at org.openzen.zencode.java.ScriptingEngine.createRunUnit(ScriptingEngine.java:139)
at org.openzen.zencode.java.ScriptingEngine.run(ScriptingEngine.java:147)