Skip to content

Instantly share code, notes, and snippets.

View Unh0lyTigg's full-sized avatar

Robert Allen Unh0lyTigg

View GitHub Profile
finding with input: {minecraft:coal,40,coal} , {minecraft:sand,36,red_sand}
checking recipe input: {minecraft:coal,8,coal}
---- iiewtw: A (recipe stack) vs B (inventory stack)
---- iiewtw: delegatename: minecraft:coal vs minecraft:coal
---- iiewtw: metadata: 0 vs 0
---- iiewtw: count: 8 vs 40
---- iiewtw: tagdata: null vs null
-------- result true
-------- rc after = -32
---- iiewtw: A (recipe stack) vs B (inventory stack)
@Unh0lyTigg
Unh0lyTigg / OreDictionary.java
Last active April 23, 2017 23:17
Potential changes
/*
* Minecraft Forge
* Copyright (c) 2016.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
buildscript {
repositories {
jcenter()
maven {
name 'forge'
url 'http://files.minecraftforge.net/maven'
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
}
...
apply from: 'lwjgl3.gradle'
...
eclipse.classpath.file.withXml {
def node = it.asNode()
attachLwjglNightlyEclipse(node, '3.0.0', 'NydilikGame')
}
import java.nio.file.Files
import java.nio.file.Paths
def trymkdir(folder) {
def f = new File(project.projectDir, folder)
if (!f.exists()) {
f.mkdirs()
f.mkdir()
}
}
ClassNode node = createNode(basicClass);
boolean change = false;
for (MethodNode method : node.methods) {
if ("<init>".equals(method.name)) {
InsnList instructions = method.instructions;
AbstractInsnNode needle = instructions.getLast();
do {
needle = needle.getPrevious();
} while (needle.getOpcode() != RETURN);
MethodNode mn = new MethodNode();
LabelNode: -1 (F_NEW)
LineNumberNode: -1 (F_NEW): 511 / [unknown_label]
MethodInsnNode: 184 (INVOKESTATIC)
net.minecraft.client.renderer.GlStateManager.disableAlpha()V
LabelNode: -1 (F_NEW)
LineNumberNode: -1 (F_NEW): 512 / [unknown_label]
VarInsnNode: 25 (ALOAD)
this
VarInsnNode: 21 (ILOAD)
1
package xyz.unh0lytigg.jsoncrops.transformer.impl;
import java.util.*;
import java.util.concurrent.atomic.*;
import java.util.function.*;
import org.objectweb.asm.*;
import org.objectweb.asm.tree.*;
import xyz.unh0lytigg.jsoncrops.transformer.*;
[16:27:27] [main/INFO]: Extra: [--noCoreSearch, --tweakClass, xyz.unh0lytigg.jsoncrops.tweaker.JCTweaker]
[16:27:27] [main/INFO]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Robert/.gradle/caches/minecraft/assets, --assetIndex, 1.9, --accessToken{REDACTED}, --version, 1.9, --noCoreSearch, --tweakClass, xyz.unh0lytigg.jsoncrops.tweaker.JCTweaker]
[16:27:27] [main/INFO]: Loading tweak class name xyz.unh0lytigg.jsoncrops.tweaker.JCTweaker
[16:27:27] [main/INFO]: Using primary tweak class name xyz.unh0lytigg.jsoncrops.tweaker.JCTweaker
[16:27:27] [main/INFO]: Calling tweak class xyz.unh0lytigg.jsoncrops.tweaker.JCTweaker
Hello from JCTweaker
[16:27:27] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[16:27:27] [main/ERROR]: Unable to launch
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_60]