From f242b3b9e2d62cc2263e9e9288c9feb9613e8132 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 22 Aug 2019 20:51:35 -0400 Subject: Update --- .classpath | 66 +- .project | 20 +- build.gradle | 3 +- minecraft/assets/config/CodeChickenCore.cfg | 18 + minecraft/assets/config/CodeChickenLib.cfg | 1 + minecraft/assets/logs/latest.log | 720 +++++++++++++++++++-- .../jewelrycraft/CreativeTabLiquids.java | 6 +- .../darkknight/jewelrycraft/JewelrycraftMod.java | 8 +- .../jewelrycraft/api/ModifierEffects.java | 6 +- .../jewelrycraft/config/ConfigHandler.java | 15 +- .../darkknight/jewelrycraft/curses/CurseList.java | 5 +- .../jewelrycraft/item/ItemBaseJewelry.java | 85 ++- .../jewelrycraft/recipes/CraftingRecipes.java | 5 + .../darkknight/jewelrycraft/util/JewelryNBT.java | 216 +++++-- .../jewelrycraft/util/JewelrycraftUtil.java | 29 +- .../jewelrycraft/worldGen/village/JCTrades.java | 1 + 16 files changed, 1027 insertions(+), 177 deletions(-) mode change 100755 => 100644 minecraft/assets/logs/latest.log diff --git a/.classpath b/.classpath index d37a610..ed05a1d 100755 --- a/.classpath +++ b/.classpath @@ -12,6 +12,70 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project index f0966fd..64dc3ac 100755 --- a/.project +++ b/.project @@ -1,23 +1,21 @@ - Jewlerycraft + jewlerycraft Project Jewelrycraft created by Buildship. - - + + + org.eclipse.buildship.core.gradleprojectnature + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectbuilder - - + org.eclipse.jdt.core.javabuilder - - + - - org.eclipse.buildship.core.gradleprojectnature - org.eclipse.jdt.core.javanature - + diff --git a/build.gradle b/build.gradle index 12682ac..3d031a3 100755 --- a/build.gradle +++ b/build.gradle @@ -55,12 +55,13 @@ repositories { } dependencies { + compile fileTree(dir: 'lib', include: '*.jar') compile "com.pahimar.ee3:EquivalentExchange3:${project.mcVersion}-${project.ee3Version}:dev" // compile "fiskfille.alpaca:alpaca:${project.mcVersion}-${project.alpacaVersion}:dev" } minecraft { - version = "1.7.10-10.13.3.1428-1.7.10" + version = "1.7.10-10.13.4.1614-1.7.10" runDir = "minecraft/assets" // replacing stuff in the source diff --git a/minecraft/assets/config/CodeChickenCore.cfg b/minecraft/assets/config/CodeChickenCore.cfg index 98426c4..34fd4eb 100755 --- a/minecraft/assets/config/CodeChickenCore.cfg +++ b/minecraft/assets/config/CodeChickenCore.cfg @@ -1,3 +1,21 @@ #CodeChickenCore configuration file. #set to true to completely deobfuscate mcp names +dev.deobfuscate=true +#Enabling this setting will make all minecraft classes public at runtime in MCP just as they are in modloader. +#You should ONLY use this when you are testing with a mod that relies on runtime publicity and doesn't include access transformers. +#Such mods are doing the wrong thing and should be fixed. +dev.runtimePublic=false + +#Various tweaks that can be applied to game mechanics. +tweaks +{ + #If set to true and doFireTick is disabled in the game rules, fire will still dissipate if it's not over a fire source + doFireTickOut=true + #If set to true, creepers will not destroy landscape. (A version of mobGriefing setting just for creepers) + environmentallyFriendlyCreepers=false + #If set to true two adjacent water source blocks will not generate a third. + finiteWater=false + #If set to false, leaves will only replace air when growing + softLeafReplace=false +} diff --git a/minecraft/assets/config/CodeChickenLib.cfg b/minecraft/assets/config/CodeChickenLib.cfg index 2ae9b87..13ecbe4 100755 --- a/minecraft/assets/config/CodeChickenLib.cfg +++ b/minecraft/assets/config/CodeChickenLib.cfg @@ -1,3 +1,4 @@ #CodeChickenLib development configuration file. #Path to directory holding packaged.srg, fields.csv and methods.csv for mcp remapping +mappingDir=/Users/bjculkin/Desktop/mcp908/conf diff --git a/minecraft/assets/logs/latest.log b/minecraft/assets/logs/latest.log old mode 100755 new mode 100644 index 878a427..4b4775b --- a/minecraft/assets/logs/latest.log +++ b/minecraft/assets/logs/latest.log @@ -1,45 +1,675 @@ -[22:26:05] [main/INFO]: Extra: [] -[22:26:05] [main/INFO]: Found and added coremod: codechicken.nei.asm.NEICorePlugin -[22:26:05] [main/INFO]: Found and added coremod: codechicken.core.launch.CodeChickenCorePlugin -[22:26:05] [main/INFO]: Running with arguments: [--userProperties, {}, --assetsDir, /Users/ben/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] -[22:26:05] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker -[22:26:05] [main/INFO]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker -[22:26:05] [main/INFO]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker -[22:26:05] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker -[22:26:05] [main/INFO]: Forge Mod Loader version 7.99.9.1428 for Minecraft 1.7.10 loading -[22:26:05] [main/INFO]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_05, running on Mac OS X:x86_64:10.12, installed at /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre -[22:26:05] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation -[22:26:05] [main/INFO]: Found a command line coremod : codechicken.nei.asm.NEICorePlugin -[22:26:05] [main/WARN]: The coremod codechicken.nei.asm.NEICorePlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft -[22:26:05] [main/INFO]: Found a command line coremod : codechicken.core.launch.CodeChickenCorePlugin -[22:26:05] [main/WARN]: The coremod codechicken.core.launch.CodeChickenCorePlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft -[22:26:05] [main/INFO]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker -[22:26:05] [main/INFO]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin -[22:26:05] [main/INFO]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin -[22:26:05] [main/INFO]: Injecting location in coremod codechicken.core.asm.MCPDeobfuscationTransformer.LoadPlugin -[22:26:05] [main/INFO]: Injecting location in coremod codechicken.nei.asm.NEICorePlugin -[22:26:05] [main/INFO]: Injecting location in coremod codechicken.core.launch.CodeChickenCorePlugin -[22:26:05] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker -[22:26:05] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker -[22:26:05] [main/INFO]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker -[22:26:05] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker -[22:26:05] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker -[22:26:05] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper -[22:26:05] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! -[22:26:06] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing -[22:26:06] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper -[22:26:06] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.lang.ExceptionInInitializerError -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at codechicken.core.asm.MCPDeobfuscationTransformer.load(MCPDeobfuscationTransformer.java:118) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at codechicken.core.asm.MCPDeobfuscationTransformer$LoadPlugin.injectData(MCPDeobfuscationTransformer.java:57) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper.injectIntoClassLoader(CoreModManager.java:112) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:115) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at GradleStart.main(Unknown Source) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: Caused by: java.lang.RuntimeException: Failed to select mappings directory, set it manually in the config -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at codechicken.lib.asm.ObfMapping$MCPRemapper.getConfFiles(ObfMapping.java:107) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at codechicken.lib.asm.ObfMapping$MCPRemapper.(ObfMapping.java:162) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at codechicken.lib.asm.ObfMapping.loadMCPRemapper(ObfMapping.java:205) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at codechicken.lib.asm.ObfMapping.(ObfMapping.java:217) -[22:26:27] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: ... 7 more +[17:42:01] [main/INFO]: Extra: [] +[17:42:01] [main/INFO]: Found and added coremod: codechicken.nei.asm.NEICorePlugin +[17:42:01] [main/INFO]: Found and added coremod: codechicken.core.launch.CodeChickenCorePlugin +[17:42:01] [main/INFO]: Running with arguments: [--userProperties, {}, --assetsDir, /Users/bjculkin/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] +[17:42:01] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker +[17:42:01] [main/INFO]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker +[17:42:01] [main/INFO]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker +[17:42:01] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker +[17:42:01] [main/INFO]: Forge Mod Loader version 7.99.40.1614 for Minecraft 1.7.10 loading +[17:42:01] [main/INFO]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_121, running on Mac OS X:x86_64:10.12.6, installed at /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre +[17:42:01] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation +[17:42:01] [main/INFO]: Found a command line coremod : codechicken.nei.asm.NEICorePlugin +[17:42:01] [main/WARN]: The coremod codechicken.nei.asm.NEICorePlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft +[17:42:01] [main/INFO]: Found a command line coremod : codechicken.core.launch.CodeChickenCorePlugin +[17:42:01] [main/WARN]: The coremod codechicken.core.launch.CodeChickenCorePlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft +[17:42:01] [main/INFO]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker +[17:42:01] [main/INFO]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin +[17:42:01] [main/INFO]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin +[17:42:01] [main/INFO]: Injecting location in coremod codechicken.core.asm.MCPDeobfuscationTransformer.LoadPlugin +[17:42:01] [main/INFO]: Injecting location in coremod codechicken.nei.asm.NEICorePlugin +[17:42:01] [main/INFO]: Injecting location in coremod codechicken.core.launch.CodeChickenCorePlugin +[17:42:01] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker +[17:42:01] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker +[17:42:01] [main/INFO]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker +[17:42:01] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker +[17:42:01] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker +[17:42:01] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper +[17:42:01] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! +[17:42:02] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing +[17:42:02] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper +[17:42:02] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper +[17:42:02] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper +[17:42:02] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper +[17:42:02] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker +[17:42:03] [main/INFO]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker +[17:42:03] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker +[17:42:03] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker +[17:42:03] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main} +[17:42:03] [main/ERROR]: Unable to launch +java.lang.reflect.InvocationTargetException + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121] + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121] + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121] + at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] + at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] + at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] + at GradleStart.main(Unknown Source) [start/:?] +Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/gui/inventory/GuiInventory + at net.minecraft.client.main.Main.main(SourceFile:72) ~[Main.class:?] + ... 8 more +Caused by: java.lang.ClassNotFoundException: net.minecraft.client.gui.inventory.GuiInventory + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at net.minecraft.client.main.Main.main(SourceFile:72) ~[Main.class:?] + ... 8 more +Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/InventoryEffectRenderer + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at net.minecraft.client.main.Main.main(SourceFile:72) ~[Main.class:?] + ... 8 more +Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.InventoryEffectRenderer + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at net.minecraft.client.main.Main.main(SourceFile:72) ~[Main.class:?] + ... 8 more +Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/gui/inventory/GuiContainer + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at net.minecraft.client.main.Main.main(SourceFile:72) ~[Main.class:?] + ... 8 more +Caused by: java.lang.ClassNotFoundException: net.minecraft.client.gui.inventory.GuiContainer + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at net.minecraft.client.main.Main.main(SourceFile:72) ~[Main.class:?] + ... 8 more +Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Error transforming method: [net/minecraft/client/gui/inventory/GuiContainer.drawScreen(IIF)V] + at codechicken.nei.asm.NEITransformer.transform(NEITransformer.java:238) ~[NotEnoughItems-1.7.10-1.0.3.56-dev.jar:?] + at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at net.minecraft.client.main.Main.main(SourceFile:72) ~[Main.class:?] + ... 8 more +Caused by: java.lang.RuntimeException: Error transforming method: [net/minecraft/client/gui/inventory/GuiContainer.drawScreen(IIF)V] + at codechicken.lib.asm.ModularASMTransformer$MethodTransformer.transform(ModularASMTransformer.java:90) ~[CodeChickenLib-1.7.10-1.1.1.104-dev.jar:?] + at codechicken.lib.asm.ModularASMTransformer$ClassNodeTransformerList.transform(ModularASMTransformer.java:36) ~[CodeChickenLib-1.7.10-1.1.1.104-dev.jar:?] + at codechicken.lib.asm.ModularASMTransformer.transform(ModularASMTransformer.java:283) ~[CodeChickenLib-1.7.10-1.1.1.104-dev.jar:?] + at codechicken.nei.asm.NEITransformer.transform(NEITransformer.java:236) ~[NotEnoughItems-1.7.10-1.0.3.56-dev.jar:?] + at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at net.minecraft.client.main.Main.main(SourceFile:72) ~[Main.class:?] + ... 8 more +Caused by: java.lang.RuntimeException: Needle not found in Haystack: + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.manager : Lcodechicken/nei/guihook/GuiContainerManager; + INVOKEVIRTUAL codechicken/nei/guihook/GuiContainerManager.preDraw ()V + L0 + LINENUMBER 75 L0 + ALOAD 0 + INVOKEVIRTUAL net/minecraft/client/gui/inventory/GuiContainer.drawDefaultBackground ()V + L1 + LINENUMBER 76 L1 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.guiLeft : I + ISTORE 4 + L2 + LINENUMBER 77 L2 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.guiTop : I + ISTORE 5 + L3 + LINENUMBER 78 L3 + ALOAD 0 + FLOAD 3 + ILOAD 1 + ILOAD 2 + INVOKEVIRTUAL net/minecraft/client/gui/inventory/GuiContainer.drawGuiContainerBackgroundLayer (FII)V + L4 + LINENUMBER 79 L4 + LDC 32826 + INVOKESTATIC org/lwjgl/opengl/GL11.glDisable (I)V + L5 + LINENUMBER 80 L5 + INVOKESTATIC net/minecraft/client/renderer/RenderHelper.disableStandardItemLighting ()V + L6 + LINENUMBER 81 L6 + SIPUSH 2896 + INVOKESTATIC org/lwjgl/opengl/GL11.glDisable (I)V + L7 + LINENUMBER 82 L7 + SIPUSH 2929 + INVOKESTATIC org/lwjgl/opengl/GL11.glDisable (I)V + L8 + LINENUMBER 83 L8 + ALOAD 0 + ILOAD 1 + ILOAD 2 + FLOAD 3 + INVOKESPECIAL net/minecraft/client/gui/GuiScreen.drawScreen (IIF)V + L9 + LINENUMBER 84 L9 + INVOKESTATIC net/minecraft/client/renderer/RenderHelper.enableGUIStandardItemLighting ()V + L10 + LINENUMBER 85 L10 + INVOKESTATIC org/lwjgl/opengl/GL11.glPushMatrix ()V + L11 + LINENUMBER 86 L11 + ILOAD 4 + I2F + ILOAD 5 + I2F + FCONST_0 + INVOKESTATIC org/lwjgl/opengl/GL11.glTranslatef (FFF)V + L12 + LINENUMBER 87 L12 + FCONST_1 + FCONST_1 + FCONST_1 + FCONST_1 + INVOKESTATIC org/lwjgl/opengl/GL11.glColor4f (FFFF)V + L13 + LINENUMBER 88 L13 + LDC 32826 + INVOKESTATIC org/lwjgl/opengl/GL11.glEnable (I)V + L14 + LINENUMBER 89 L14 + ALOAD 0 + ACONST_NULL + PUTFIELD net/minecraft/client/gui/inventory/GuiContainer.theSlot : Lnet/minecraft/inventory/Slot; + L15 + LINENUMBER 90 L15 + SIPUSH 240 + ISTORE 6 + L16 + LINENUMBER 91 L16 + SIPUSH 240 + ISTORE 7 + L17 + LINENUMBER 92 L17 + GETSTATIC net/minecraft/client/renderer/OpenGlHelper.lightmapTexUnit : I + ILOAD 6 + I2F + FCONST_1 + FDIV + ILOAD 7 + I2F + FCONST_1 + FDIV + INVOKESTATIC net/minecraft/client/renderer/OpenGlHelper.setLightmapTextureCoords (IFF)V + L18 + LINENUMBER 93 L18 + FCONST_1 + FCONST_1 + FCONST_1 + FCONST_1 + INVOKESTATIC org/lwjgl/opengl/GL11.glColor4f (FFFF)V + L19 + LINENUMBER 96 L19 + ICONST_0 + ISTORE 8 + L20 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I I] [] + ILOAD 8 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.inventorySlots : Lnet/minecraft/inventory/Container; + GETFIELD net/minecraft/inventory/Container.inventorySlots : Ljava/util/List; + INVOKEINTERFACE java/util/List.size ()I + IF_ICMPGE L21 + L22 + LINENUMBER 98 L22 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.inventorySlots : Lnet/minecraft/inventory/Container; + GETFIELD net/minecraft/inventory/Container.inventorySlots : Ljava/util/List; + ILOAD 8 + INVOKEINTERFACE java/util/List.get (I)Ljava/lang/Object; + CHECKCAST net/minecraft/inventory/Slot + ASTORE 9 + L23 + LINENUMBER 99 L23 + ALOAD 0 + ALOAD 9 + INVOKESPECIAL net/minecraft/client/gui/inventory/GuiContainer.func_146977_a (Lnet/minecraft/inventory/Slot;)V + L24 + LINENUMBER 101 L24 + ALOAD 0 + ALOAD 9 + ILOAD 1 + ILOAD 2 + INVOKESPECIAL net/minecraft/client/gui/inventory/GuiContainer.isMouseOverSlot (Lnet/minecraft/inventory/Slot;II)Z + IFEQ L25 + ALOAD 9 + INVOKEVIRTUAL net/minecraft/inventory/Slot.func_111238_b ()Z + IFEQ L25 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.manager : Lcodechicken/nei/guihook/GuiContainerManager; + ILOAD 1 + ILOAD 2 + INVOKEVIRTUAL codechicken/nei/guihook/GuiContainerManager.objectUnderMouse (II)Z + IFNE L25 + L26 + LINENUMBER 103 L26 + ALOAD 0 + ALOAD 9 + PUTFIELD net/minecraft/client/gui/inventory/GuiContainer.theSlot : Lnet/minecraft/inventory/Slot; + L27 + LINENUMBER 104 L27 + SIPUSH 2896 + INVOKESTATIC org/lwjgl/opengl/GL11.glDisable (I)V + L28 + LINENUMBER 105 L28 + SIPUSH 2929 + INVOKESTATIC org/lwjgl/opengl/GL11.glDisable (I)V + L29 + LINENUMBER 106 L29 + ALOAD 9 + GETFIELD net/minecraft/inventory/Slot.xDisplayPosition : I + ISTORE 10 + L30 + LINENUMBER 107 L30 + ALOAD 9 + GETFIELD net/minecraft/inventory/Slot.yDisplayPosition : I + ISTORE 11 + L31 + LINENUMBER 108 L31 + ICONST_1 + ICONST_1 + ICONST_1 + ICONST_0 + INVOKESTATIC org/lwjgl/opengl/GL11.glColorMask (ZZZZ)V + L32 + LINENUMBER 109 L32 + ALOAD 0 + ILOAD 10 + ILOAD 11 + ILOAD 10 + BIPUSH 16 + IADD + ILOAD 11 + BIPUSH 16 + IADD + LDC -2130706433 + LDC -2130706433 + INVOKEVIRTUAL net/minecraft/client/gui/inventory/GuiContainer.drawGradientRect (IIIIII)V + L33 + LINENUMBER 110 L33 + ICONST_1 + ICONST_1 + ICONST_1 + ICONST_1 + INVOKESTATIC org/lwjgl/opengl/GL11.glColorMask (ZZZZ)V + L34 + LINENUMBER 111 L34 + SIPUSH 2896 + INVOKESTATIC org/lwjgl/opengl/GL11.glEnable (I)V + L35 + LINENUMBER 112 L35 + SIPUSH 2929 + INVOKESTATIC org/lwjgl/opengl/GL11.glEnable (I)V + L25 + LINENUMBER 96 L25 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I I] [] + IINC 8 1 + GOTO L20 + L21 + LINENUMBER 118 L21 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I] [] + SIPUSH 2896 + INVOKESTATIC org/lwjgl/opengl/GL11.glDisable (I)V + L36 + LINENUMBER 119 L36 + ALOAD 0 + ILOAD 1 + ILOAD 2 + INVOKEVIRTUAL net/minecraft/client/gui/inventory/GuiContainer.drawGuiContainerForegroundLayer (II)V + L37 + LINENUMBER 120 L37 + SIPUSH 2896 + INVOKESTATIC org/lwjgl/opengl/GL11.glEnable (I)V + L38 + LINENUMBER 121 L38 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.mc : Lnet/minecraft/client/Minecraft; + GETFIELD net/minecraft/client/Minecraft.thePlayer : Lnet/minecraft/client/entity/EntityClientPlayerMP; + GETFIELD net/minecraft/client/entity/EntityClientPlayerMP.inventory : Lnet/minecraft/entity/player/InventoryPlayer; + ASTORE 8 + L39 + LINENUMBER 122 L39 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.draggedStack : Lnet/minecraft/item/ItemStack; + IFNONNULL L40 + ALOAD 8 + INVOKEVIRTUAL net/minecraft/entity/player/InventoryPlayer.getItemStack ()Lnet/minecraft/item/ItemStack; + GOTO L41 + L40 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I net/minecraft/entity/player/InventoryPlayer] [] + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.draggedStack : Lnet/minecraft/item/ItemStack; + L41 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I net/minecraft/entity/player/InventoryPlayer] [net/minecraft/item/ItemStack] + ASTORE 9 + L42 + LINENUMBER 124 L42 + ALOAD 9 + IFNULL L43 + L44 + LINENUMBER 126 L44 + BIPUSH 8 + ISTORE 10 + L45 + LINENUMBER 127 L45 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.draggedStack : Lnet/minecraft/item/ItemStack; + IFNONNULL L46 + BIPUSH 8 + GOTO L47 + L46 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I net/minecraft/entity/player/InventoryPlayer net/minecraft/item/ItemStack I] [] + BIPUSH 16 + L47 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I net/minecraft/entity/player/InventoryPlayer net/minecraft/item/ItemStack I] [I] + ISTORE 11 + L48 + LINENUMBER 128 L48 + ACONST_NULL + ASTORE 12 + L49 + LINENUMBER 130 L49 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.draggedStack : Lnet/minecraft/item/ItemStack; + IFNULL L50 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.isRightMouseClick : Z + IFEQ L50 + L51 + LINENUMBER 132 L51 + ALOAD 9 + INVOKEVIRTUAL net/minecraft/item/ItemStack.copy ()Lnet/minecraft/item/ItemStack; + ASTORE 9 + L52 + LINENUMBER 133 L52 + ALOAD 9 + ALOAD 9 + GETFIELD net/minecraft/item/ItemStack.stackSize : I + I2F + FCONST_2 + FDIV + INVOKESTATIC net/minecraft/util/MathHelper.ceiling_float_int (F)I + PUTFIELD net/minecraft/item/ItemStack.stackSize : I + GOTO L53 + L50 + LINENUMBER 135 L50 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I net/minecraft/entity/player/InventoryPlayer net/minecraft/item/ItemStack I I java/lang/String] [] + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.field_147007_t : Z + IFEQ L53 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.field_147008_s : Ljava/util/Set; + INVOKEINTERFACE java/util/Set.size ()I + ICONST_1 + IF_ICMPLE L53 + L54 + LINENUMBER 137 L54 + ALOAD 9 + INVOKEVIRTUAL net/minecraft/item/ItemStack.copy ()Lnet/minecraft/item/ItemStack; + ASTORE 9 + L55 + LINENUMBER 138 L55 + ALOAD 9 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.field_146996_I : I + PUTFIELD net/minecraft/item/ItemStack.stackSize : I + L56 + LINENUMBER 140 L56 + ALOAD 9 + GETFIELD net/minecraft/item/ItemStack.stackSize : I + IFNE L53 + L57 + LINENUMBER 142 L57 + NEW java/lang/StringBuilder + DUP + INVOKESPECIAL java/lang/StringBuilder. ()V + LDC "" + INVOKEVIRTUAL java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; + GETSTATIC net/minecraft/util/EnumChatFormatting.YELLOW : Lnet/minecraft/util/EnumChatFormatting; + INVOKEVIRTUAL java/lang/StringBuilder.append (Ljava/lang/Object;)Ljava/lang/StringBuilder; + LDC "0" + INVOKEVIRTUAL java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; + INVOKEVIRTUAL java/lang/StringBuilder.toString ()Ljava/lang/String; + ASTORE 12 + L53 + LINENUMBER 146 L53 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I net/minecraft/entity/player/InventoryPlayer net/minecraft/item/ItemStack I I java/lang/String] [] + ALOAD 0 + ALOAD 9 + ILOAD 1 + ILOAD 4 + ISUB + ILOAD 10 + ISUB + ILOAD 2 + ILOAD 5 + ISUB + ILOAD 11 + ISUB + ALOAD 12 + INVOKESPECIAL net/minecraft/client/gui/inventory/GuiContainer.drawItemStack (Lnet/minecraft/item/ItemStack;IILjava/lang/String;)V + L43 + LINENUMBER 149 L43 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I net/minecraft/entity/player/InventoryPlayer net/minecraft/item/ItemStack] [] + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.returningStack : Lnet/minecraft/item/ItemStack; + IFNULL L58 + L59 + LINENUMBER 151 L59 + INVOKESTATIC net/minecraft/client/Minecraft.getSystemTime ()J + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.returningStackTime : J + LSUB + L2F + LDC 100.0 + FDIV + FSTORE 10 + L60 + LINENUMBER 153 L60 + FLOAD 10 + FCONST_1 + FCMPL + IFLT L61 + L62 + LINENUMBER 155 L62 + FCONST_1 + FSTORE 10 + L63 + LINENUMBER 156 L63 + ALOAD 0 + ACONST_NULL + PUTFIELD net/minecraft/client/gui/inventory/GuiContainer.returningStack : Lnet/minecraft/item/ItemStack; + L61 + LINENUMBER 159 L61 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I net/minecraft/entity/player/InventoryPlayer net/minecraft/item/ItemStack F] [] + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.returningStackDestSlot : Lnet/minecraft/inventory/Slot; + GETFIELD net/minecraft/inventory/Slot.xDisplayPosition : I + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.field_147011_y : I + ISUB + ISTORE 11 + L64 + LINENUMBER 160 L64 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.returningStackDestSlot : Lnet/minecraft/inventory/Slot; + GETFIELD net/minecraft/inventory/Slot.yDisplayPosition : I + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.field_147010_z : I + ISUB + ISTORE 12 + L65 + LINENUMBER 161 L65 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.field_147011_y : I + ILOAD 11 + I2F + FLOAD 10 + FMUL + F2I + IADD + ISTORE 13 + L66 + LINENUMBER 162 L66 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.field_147010_z : I + ILOAD 12 + I2F + FLOAD 10 + FMUL + F2I + IADD + ISTORE 14 + L67 + LINENUMBER 163 L67 + ALOAD 0 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.returningStack : Lnet/minecraft/item/ItemStack; + ILOAD 13 + ILOAD 14 + ACONST_NULL + CHECKCAST java/lang/String + INVOKESPECIAL net/minecraft/client/gui/inventory/GuiContainer.drawItemStack (Lnet/minecraft/item/ItemStack;IILjava/lang/String;)V + L58 + LINENUMBER 166 L58 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I net/minecraft/entity/player/InventoryPlayer net/minecraft/item/ItemStack] [] + INVOKESTATIC org/lwjgl/opengl/GL11.glPopMatrix ()V + L68 + LINENUMBER 168 L68 + ALOAD 8 + INVOKEVIRTUAL net/minecraft/entity/player/InventoryPlayer.getItemStack ()Lnet/minecraft/item/ItemStack; + IFNONNULL L69 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.theSlot : Lnet/minecraft/inventory/Slot; + IFNULL L69 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.theSlot : Lnet/minecraft/inventory/Slot; + INVOKEVIRTUAL net/minecraft/inventory/Slot.getHasStack ()Z + IFEQ L69 + L70 + LINENUMBER 170 L70 + ALOAD 0 + GETFIELD net/minecraft/client/gui/inventory/GuiContainer.theSlot : Lnet/minecraft/inventory/Slot; + INVOKEVIRTUAL net/minecraft/inventory/Slot.getStack ()Lnet/minecraft/item/ItemStack; + ASTORE 10 + L71 + LINENUMBER 171 L71 + ALOAD 0 + ALOAD 10 + ILOAD 1 + ILOAD 2 + INVOKEVIRTUAL net/minecraft/client/gui/inventory/GuiContainer.renderToolTip (Lnet/minecraft/item/ItemStack;II)V + L69 + LINENUMBER 174 L69 + FRAME FULL [net/minecraft/client/gui/inventory/GuiContainer I I F I I I I net/minecraft/entity/player/InventoryPlayer net/minecraft/item/ItemStack] [] + SIPUSH 2896 + INVOKESTATIC org/lwjgl/opengl/GL11.glEnable (I)V + L72 + LINENUMBER 175 L72 + SIPUSH 2929 + INVOKESTATIC org/lwjgl/opengl/GL11.glEnable (I)V + L73 + LINENUMBER 176 L73 + INVOKESTATIC net/minecraft/client/renderer/RenderHelper.enableStandardItemLighting ()V + L74 + LINENUMBER 177 L74 + RETURN + L75 + + + INVOKEVIRTUAL net/minecraft/client/gui/inventory/GuiContainer.func_146979_b (II)V + SIPUSH 2896 + INVOKESTATIC org/lwjgl/opengl/GL11.glEnable (I)V + + at codechicken.lib.asm.InsnComparator.findN(InsnComparator.java:181) ~[CodeChickenLib-1.7.10-1.1.1.104-dev.jar:?] + at codechicken.lib.asm.InsnComparator.findN(InsnComparator.java:187) ~[CodeChickenLib-1.7.10-1.1.1.104-dev.jar:?] + at codechicken.lib.asm.ModularASMTransformer$MethodInjector.transform(ModularASMTransformer.java:199) ~[CodeChickenLib-1.7.10-1.1.1.104-dev.jar:?] + at codechicken.lib.asm.ModularASMTransformer$MethodTransformer.transform(ModularASMTransformer.java:88) ~[CodeChickenLib-1.7.10-1.1.1.104-dev.jar:?] + at codechicken.lib.asm.ModularASMTransformer$ClassNodeTransformerList.transform(ModularASMTransformer.java:36) ~[CodeChickenLib-1.7.10-1.1.1.104-dev.jar:?] + at codechicken.lib.asm.ModularASMTransformer.transform(ModularASMTransformer.java:283) ~[CodeChickenLib-1.7.10-1.1.1.104-dev.jar:?] + at codechicken.nei.asm.NEITransformer.transform(NEITransformer.java:236) ~[NotEnoughItems-1.7.10-1.0.3.56-dev.jar:?] + at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_121] + at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_121] + at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_121] + at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] + at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_121] + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_121] + at net.minecraft.client.main.Main.main(SourceFile:72) ~[Main.class:?] + ... 8 more +[17:42:03] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: cpw.mods.fml.relauncher.FMLSecurityManager$ExitTrappedException +[17:42:03] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at cpw.mods.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:25) +[17:42:03] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at java.lang.SecurityManager.checkExit(SecurityManager.java:761) +[17:42:03] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at java.lang.Runtime.exit(Runtime.java:107) +[17:42:03] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at java.lang.System.exit(System.java:971) +[17:42:03] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:138) +[17:42:03] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28) +[17:42:03] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) +[17:42:03] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: at GradleStart.main(Unknown Source) diff --git a/src/main/java/darkknight/jewelrycraft/CreativeTabLiquids.java b/src/main/java/darkknight/jewelrycraft/CreativeTabLiquids.java index d3f0739..5d0cec9 100755 --- a/src/main/java/darkknight/jewelrycraft/CreativeTabLiquids.java +++ b/src/main/java/darkknight/jewelrycraft/CreativeTabLiquids.java @@ -6,6 +6,7 @@ import darkknight.jewelrycraft.item.ItemList; import darkknight.jewelrycraft.util.JewelrycraftUtil; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; /** * The Class CreativeTabLiquids. @@ -40,7 +41,8 @@ public class CreativeTabLiquids extends CreativeTabs { */ @Override public void displayAllReleventItems(List list) { - for (int i = 0; i < JewelrycraftUtil.objects.size(); i++) - list.add(ItemList.bucket.getModifiedItemStack(JewelrycraftUtil.objects.get(i))); + for (ItemStack is : JewelrycraftUtil.objects) { + list.add(ItemList.bucket.getModifiedItemStack(is)); + } } } diff --git a/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java b/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java index 802724f..bd652fd 100755 --- a/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java +++ b/src/main/java/darkknight/jewelrycraft/JewelrycraftMod.java @@ -150,6 +150,12 @@ public class JewelrycraftMod { @SubscribeEvent public void oredictRegistered(OreRegisterEvent orev) { + if (orev.Name.startsWith("gem")) { + if (!JewelrycraftUtil.gem.contains(orev.Ore)) { + JewelrycraftUtil.gem.add(orev.Ore); + } + } + if (orev.Name.startsWith("ingot") || orev.Name.startsWith("alloy")) { if (!JewelrycraftUtil.metal.contains(orev.Ore)) { JewelrycraftUtil.metal.add(orev.Ore); @@ -158,7 +164,7 @@ public class JewelrycraftMod { if (orev.Name.startsWith("ore")) { if (!JewelrycraftUtil.ores.contains(orev.Ore)) { - JewelrycraftUtil.metal.add(orev.Ore); + JewelrycraftUtil.ores.add(orev.Ore); } ItemStack ingot = FurnaceRecipes.smelting().getSmeltingResult(orev.Ore); diff --git a/src/main/java/darkknight/jewelrycraft/api/ModifierEffects.java b/src/main/java/darkknight/jewelrycraft/api/ModifierEffects.java index 7b89b8c..b3c832c 100755 --- a/src/main/java/darkknight/jewelrycraft/api/ModifierEffects.java +++ b/src/main/java/darkknight/jewelrycraft/api/ModifierEffects.java @@ -13,6 +13,7 @@ import net.minecraftforge.event.entity.player.PlayerEvent; public class ModifierEffects { protected ItemStack modifier; protected Random rand = new Random(); + protected static ArrayList effects = new ArrayList<>(); /** @@ -21,7 +22,10 @@ public class ModifierEffects { */ public ModifierEffects(ItemStack modifier) { this.modifier = modifier; - effects.add(this); + + if (modifier != null) { + effects.add(this); + } } /** diff --git a/src/main/java/darkknight/jewelrycraft/config/ConfigHandler.java b/src/main/java/darkknight/jewelrycraft/config/ConfigHandler.java index 16cee81..5d7cfcf 100755 --- a/src/main/java/darkknight/jewelrycraft/config/ConfigHandler.java +++ b/src/main/java/darkknight/jewelrycraft/config/ConfigHandler.java @@ -13,24 +13,32 @@ public class ConfigHandler { public static int INGOT_COOLING_TIME; public static int INGOT_MELTING_TIME; + public static int GEM_PLACEMENT_TIME; + public static int RITUAL_TIME; + public static int HEART_DESPAWN_TIME; public static boolean GENERATE_VILLAGE_NETHERSTAR; public static boolean CAN_FURNACE_GENERATE_INGOTS; + public static int MAX_VILLAGE_JEWELERS; public static int JEWELER_WEIGHT; + public static int INGOT_CHEST_MIN; public static int INGOT_CHEST_MAX; public static int INGOT_CHEST_MAX_STACK; + public static int GEM_CHEST_MIN; public static int GEM_CHEST_MAX; + public static int FURNACE_MIN_INGOT_STACK; public static int FURNACE_MAX_INGOT_STACK; public static int MAX_BLACK_HEARTS_PICKUP; public static int MAX_BLUE_HEARTS_PICKUP; + public static boolean CAN_BLUE_HEARTS_SPAWN; public static boolean CAN_BLACK_HEARTS_SPAWN; public static boolean CAN_HOLY_HEARTS_SPAWN; @@ -38,10 +46,13 @@ public class ConfigHandler { public static boolean CRYSTAL_GLOW; public static boolean CRYSTAL_PARTICLES; + public static boolean HEARTS_DESPAWN; + public static boolean JEWELRY_INFO; public static boolean CURSES_ENABLED = true; + public static boolean CURSE_ROTTEN_HEART = true; public static boolean CURSE_FLAMING_SOUL = true; public static boolean CURSE_GREED = true; @@ -55,13 +66,15 @@ public class ConfigHandler { public static boolean CURSE_DEATHS_TOUCH = true; public static boolean CURSE_DOUBLE_DOWN = true; public static boolean CURSE_INCREDIBLE_DEVOTION = true; - public static float DEVOTION_FACTOR = 10.0f; public static boolean CURSE_MONEY_EQUALS_POWER = true; public static boolean CURSE_SCION_OF_HELL = true; + public static float DEVOTION_FACTOR = 10.0f; + public static boolean ENABLE_WORLD_GEN = true; public static boolean ORE_GEN = true; public static boolean CRYSTAL_GEN = true; + public static boolean STRUCTURES[] = { true, true, true, true, true, true }; public static int STRUCTURES_SPAWN_CHANCE[] = { 6, 5, 7, 10, 6, 10 }; diff --git a/src/main/java/darkknight/jewelrycraft/curses/CurseList.java b/src/main/java/darkknight/jewelrycraft/curses/CurseList.java index 249528a..f123863 100755 --- a/src/main/java/darkknight/jewelrycraft/curses/CurseList.java +++ b/src/main/java/darkknight/jewelrycraft/curses/CurseList.java @@ -23,9 +23,10 @@ public class CurseList { public static Curse scionOfHell; public static Curse moneyEqualsPower; public static Curse doubleDown; - public static Curse sacredOath; // Not yet implemented + public static Curse sacredOath; + // None at the moment :) public static void preInit(FMLPreInitializationEvent e) { @@ -60,6 +61,6 @@ public class CurseList { incredibleDevotion = new CurseIncredibleDevotion(Variables.MODNAME + ":" + "Incredible Devotion", 20, CURSE_TEXPACK); - sacredOath = new CurseSacredOath(Variables.MODNAME + ":" + "Sacred Oath", 21, CURSE_TEXPACK); + //sacredOath = new CurseSacredOath(Variables.MODNAME + ":" + "Sacred Oath", 21, CURSE_TEXPACK); } } diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java b/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java index da0315f..13e8546 100755 --- a/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java +++ b/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java @@ -6,6 +6,7 @@ import java.util.List; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import darkknight.jewelrycraft.JewelrycraftMod; +import darkknight.jewelrycraft.api.IJewelryItem; import darkknight.jewelrycraft.api.ModifierEffects; import darkknight.jewelrycraft.config.ConfigHandler; import darkknight.jewelrycraft.util.JewelryNBT; @@ -20,10 +21,13 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.event.entity.player.PlayerEvent; +@SuppressWarnings({ "rawtypes", "unchecked" }) public abstract class ItemBaseJewelry extends Item { public ItemBaseJewelry() { super(); + setMaxStackSize(1); + setCreativeTab(JewelrycraftMod.jewelrycraft); } @@ -54,10 +58,16 @@ public abstract class ItemBaseJewelry extends Item { */ @Override public String getItemStackDisplayName(ItemStack stack) { - if (JewelryNBT.ingot(stack) != null && Item.getIdFromItem(JewelryNBT.ingot(stack).getItem()) > 0) - return JewelryNBT.ingot(stack).getDisplayName().replace("Ingot", " ").trim() + " " - + ("" + StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim(); - return ("" + StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim(); + String itemName = ("" + StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")) + .trim(); + + if (JewelryNBT.ingot(stack) != null && Item.getIdFromItem(JewelryNBT.ingot(stack).getItem()) > 0) { + String ingotName = JewelryNBT.ingot(stack).getDisplayName().replace("Ingot", " ").trim(); + + return ingotName + " " + itemName; + } + + return itemName; } /** @@ -72,10 +82,12 @@ public abstract class ItemBaseJewelry extends Item { public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) { if (stack.hasTagCompound() && ConfigHandler.JEWELRY_INFO) { ItemStack ingot = JewelryNBT.ingot(stack); + if (ingot != null && Item.getIdFromItem(JewelryNBT.ingot(stack).getItem()) > 0) { - list.add(StatCollector.translateToLocal("info." + Variables.MODID + ".metal") + ": " - + EnumChatFormatting.YELLOW + ingot.getDisplayName() - .replace(StatCollector.translateToLocal("info." + Variables.MODID + ".ingot"), " ")); + String metalInfo = StatCollector.translateToLocal("info." + Variables.MODID + ".metal"); + String ingotInfo = StatCollector.translateToLocal("info." + Variables.MODID + ".ingot"); + + list.add(metalInfo + ": " + EnumChatFormatting.YELLOW + ingot.getDisplayName().replace(ingotInfo, " ")); } ItemStack gem = JewelryNBT.gem(stack); @@ -87,11 +99,14 @@ public abstract class ItemBaseJewelry extends Item { ArrayList modifier = JewelryNBT.modifier(stack); - if (!modifier.isEmpty()) + if (!modifier.isEmpty()) { list.add(StatCollector.translateToLocal("info." + Variables.MODID + ".modifiers") + ": "); - for (int i = 0; i < modifier.size(); i++) + } + + for (int i = 0; i < modifier.size(); i++) { list.add(EnumChatFormatting.DARK_PURPLE + modifier.get(i).getDisplayName() + " x" + modifier.get(i).stackSize); + } } } @@ -100,9 +115,11 @@ public abstract class ItemBaseJewelry extends Item { * @param player */ public void action(ItemStack item, EntityPlayer player) { - for (ModifierEffects mod : ModifierEffects.getEffects()) - if (JewelryNBT.doesModifierExist(item, mod.getModifier())) + for (ModifierEffects mod : ModifierEffects.getEffects()) { + if (JewelryNBT.doesModifierExist(item, mod.getModifier())) { mod.action(item, player, this); + } + } } /** @@ -112,9 +129,12 @@ public abstract class ItemBaseJewelry extends Item { * @return */ public boolean onPlayerAttackedCacellable(ItemStack item, EntityPlayer player, DamageSource source, float amount) { - for (ModifierEffects mod : ModifierEffects.getEffects()) - if (JewelryNBT.doesModifierExist(item, mod.getModifier())) + for (ModifierEffects mod : ModifierEffects.getEffects()) { + if (JewelryNBT.doesModifierExist(item, mod.getModifier())) { return mod.onPlayerAttackedCancellable(item, player, source, this, amount); + } + } + return false; } @@ -125,9 +145,12 @@ public abstract class ItemBaseJewelry extends Item { * @return */ public boolean onEntityAttackedCacellable(ItemStack item, EntityPlayer player, Entity target, float amount) { - for (ModifierEffects mod : ModifierEffects.getEffects()) - if (JewelryNBT.doesModifierExist(item, mod.getModifier())) + for (ModifierEffects mod : ModifierEffects.getEffects()) { + if (JewelryNBT.doesModifierExist(item, mod.getModifier())) { return mod.onEntityAttackedCancellable(item, player, target, this, amount); + } + } + return false; } @@ -150,32 +173,42 @@ public abstract class ItemBaseJewelry extends Item { * @return */ public void onEntityAttacked(ItemStack item, EntityPlayer player, Entity target, float amount) { - for (ModifierEffects mod : ModifierEffects.getEffects()) - if (JewelryNBT.doesModifierExist(item, mod.getModifier())) + for (ModifierEffects mod : ModifierEffects.getEffects()) { + if (JewelryNBT.doesModifierExist(item, mod.getModifier())) { mod.onEntityAttacked(item, player, target, this, amount); + } + } } public void onPlayerDead(ItemStack item, EntityPlayer player, DamageSource source) { - for (ModifierEffects mod : ModifierEffects.getEffects()) - if (JewelryNBT.doesModifierExist(item, mod.getModifier())) + for (ModifierEffects mod : ModifierEffects.getEffects()) { + if (JewelryNBT.doesModifierExist(item, mod.getModifier())) { mod.onPlayerDead(item, player, source, this); + } + } } public void onPlayerRespawn(ItemStack item, PlayerEvent.Clone event) { - for (ModifierEffects mod : ModifierEffects.getEffects()) - if (JewelryNBT.doesModifierExist(item, mod.getModifier())) + for (ModifierEffects mod : ModifierEffects.getEffects()) { + if (JewelryNBT.doesModifierExist(item, mod.getModifier())) { mod.onPlayerRespawn(item, event, this); + } + } } public void onJewelryEquipped(ItemStack item) { - for (ModifierEffects mod : ModifierEffects.getEffects()) - if (JewelryNBT.doesModifierExist(item, mod.getModifier())) + for (ModifierEffects mod : ModifierEffects.getEffects()) { + if (JewelryNBT.doesModifierExist(item, mod.getModifier())) { mod.onJewelryEquipped(item, this); + } + } } public void onJewelryUnequipped(ItemStack item) { - for (ModifierEffects mod : ModifierEffects.getEffects()) - if (JewelryNBT.doesModifierExist(item, mod.getModifier())) + for (ModifierEffects mod : ModifierEffects.getEffects()) { + if (JewelryNBT.doesModifierExist(item, mod.getModifier())) { mod.onJewelryUnequipped(item, this); + } + } } -} +} \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/recipes/CraftingRecipes.java b/src/main/java/darkknight/jewelrycraft/recipes/CraftingRecipes.java index f47e48e..2d7b2a1 100755 --- a/src/main/java/darkknight/jewelrycraft/recipes/CraftingRecipes.java +++ b/src/main/java/darkknight/jewelrycraft/recipes/CraftingRecipes.java @@ -20,10 +20,12 @@ public class CraftingRecipes { // Items GameRegistry.addRecipe(new ItemStack(ItemList.thiefGloves), "x x", "yxy", "yxy", 'x', ItemList.shadowIngot, 'y', new ItemStack(Blocks.wool, 1, 15)); + // Disable ingot molds for balance reasons // GameRegistry.addRecipe(new // ItemStack(ItemList.clayMolds, 1, 0), // "xx", 'x', Items.clay_ball); + GameRegistry.addRecipe(new ItemStack(ItemList.clayMolds, 1, 1), " x ", "x x", " x ", 'x', Items.clay_ball); GameRegistry.addRecipe(new ItemStack(ItemList.clayMolds, 1, 2), "x x", "x x", " x ", 'x', Items.clay_ball); GameRegistry.addRecipe(new ItemStack(ItemList.clayMolds, 1, 3), "xxx", "x x", "xxx", 'x', Items.clay_ball); @@ -44,6 +46,7 @@ public class CraftingRecipes { new Object[] { new ItemStack(Items.book), new ItemStack(ItemList.molds, 1, 3) }); GameRegistry.addShapelessRecipe(new ItemStack(ItemList.guide), new Object[] { new ItemStack(Items.book), new ItemStack(ItemList.molds, 1, 4) }); + // Blocks GameRegistry.addRecipe( new ShapedOreRecipe(new ItemStack(BlockList.molder), "x x", "xxx", 'x', Blocks.cobblestone)); @@ -55,6 +58,7 @@ public class CraftingRecipes { Items.iron_ingot, 'y', Blocks.emerald_block)); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockList.shadowBlock, 1), "xxx", "xxx", "xxx", 'x', ItemList.shadowIngot)); + // Smelting GameRegistry.addSmelting(BlockList.shadowOre, new ItemStack(ItemList.shadowIngot), 1.5f); GameRegistry.addSmelting(new ItemStack(ItemList.clayMolds, 1, 0), new ItemStack(ItemList.molds, 1, 0), @@ -67,6 +71,7 @@ public class CraftingRecipes { 0.2F); GameRegistry.addSmelting(new ItemStack(ItemList.clayMolds, 1, 4), new ItemStack(ItemList.molds, 1, 4), 0.2F); + isInitialized = true; } } diff --git a/src/main/java/darkknight/jewelrycraft/util/JewelryNBT.java b/src/main/java/darkknight/jewelrycraft/util/JewelryNBT.java index 3d42750..17090ab 100755 --- a/src/main/java/darkknight/jewelrycraft/util/JewelryNBT.java +++ b/src/main/java/darkknight/jewelrycraft/util/JewelryNBT.java @@ -11,12 +11,14 @@ public class JewelryNBT { public static void addItem(ItemStack item, ItemStack target) { if (target != null) { NBTTagCompound itemStackData; - if (item.hasTagCompound()) + + if (item.hasTagCompound()) { itemStackData = item.getTagCompound(); - else { + } else { itemStackData = new NBTTagCompound(); item.setTagCompound(itemStackData); } + NBTTagCompound targetNBT = new NBTTagCompound(); target.writeToNBT(targetNBT); itemStackData.setTag("target", targetNBT); @@ -31,12 +33,14 @@ public class JewelryNBT { */ public static void addMetal(ItemStack item, ItemStack metal) { NBTTagCompound itemStackData; - if (item.hasTagCompound()) + + if (item.hasTagCompound()) { itemStackData = item.getTagCompound(); - else { + } else { itemStackData = new NBTTagCompound(); item.setTagCompound(itemStackData); } + if (metal != null) { NBTTagCompound ingotNBT = new NBTTagCompound(); metal.writeToNBT(ingotNBT); @@ -53,12 +57,14 @@ public class JewelryNBT { public static void addGem(ItemStack item, ItemStack gem) { if (gem != null) { NBTTagCompound itemStackData; - if (item.hasTagCompound()) + + if (item.hasTagCompound()) { itemStackData = item.getTagCompound(); - else { + } else { itemStackData = new NBTTagCompound(); item.setTagCompound(itemStackData); } + NBTTagCompound gemNBT = new NBTTagCompound(); gem.writeToNBT(gemNBT); itemStackData.setTag("gem", gemNBT); @@ -74,17 +80,20 @@ public class JewelryNBT { public static void addModifiers(ItemStack item, ArrayList modifier) { if (modifier != null) { NBTTagCompound itemStackData; - if (item.hasTagCompound()) + + if (item.hasTagCompound()) { itemStackData = item.getTagCompound(); - else { + } else { itemStackData = new NBTTagCompound(); item.setTagCompound(itemStackData); } + for (int i = 0; i < modifier.size(); i++) { NBTTagCompound modifierNBT = new NBTTagCompound(); modifier.get(i).writeToNBT(modifierNBT); itemStackData.setTag("modifier" + i, modifierNBT); } + itemStackData.setInteger("modifierSize", modifier.size()); } } @@ -95,12 +104,14 @@ public class JewelryNBT { */ public static void addIngotColor(ItemStack item, int color) { NBTTagCompound itemStackData; - if (item.hasTagCompound()) + + if (item.hasTagCompound()) { itemStackData = item.getTagCompound(); - else { + } else { itemStackData = new NBTTagCompound(); item.setTagCompound(itemStackData); } + itemStackData.setInteger("ingotColor", color); } @@ -111,12 +122,14 @@ public class JewelryNBT { */ public static void addGemColor(ItemStack item, int color) { NBTTagCompound itemStackData; - if (item.hasTagCompound()) + + if (item.hasTagCompound()) { itemStackData = item.getTagCompound(); - else { + } else { itemStackData = new NBTTagCompound(); item.setTagCompound(itemStackData); } + itemStackData.setInteger("gemColor", color); } @@ -128,14 +141,18 @@ public class JewelryNBT { */ public static boolean hasTag(ItemStack item, String tag) { NBTTagCompound itemStackData; - if (item.hasTagCompound()) + + if (item.hasTagCompound()) { itemStackData = item.getTagCompound(); - else { + } else { itemStackData = new NBTTagCompound(); item.setTagCompound(itemStackData); } - if (itemStackData.hasKey(tag)) + + if (itemStackData.hasKey(tag)) { return true; + } + return false; } @@ -145,9 +162,14 @@ public class JewelryNBT { * @return */ public static boolean isGemX(ItemStack stack, ItemStack gem) { - if (gem(stack) != null && gem(stack).getItem() == gem.getItem() - && gem(stack).getItemDamage() == gem.getItemDamage()) - return true; + if (gem(stack) != null) { + if (gem(stack).getItem() == gem.getItem()) { + if (gem(stack).getItemDamage() == gem.getItemDamage()) { + return true; + } + } + } + return false; } @@ -159,28 +181,40 @@ public class JewelryNBT { public static boolean doesModifierExist(ItemStack stack, ItemStack modifier) { if (modifier(stack) != null) { ArrayList list = modifier(stack); - for (int i = 0; i < list.size(); i++) - if (list.get(i).getItem() == modifier.getItem() - && list.get(i).getItemDamage() == modifier.getItemDamage()) - return true; + + for (int i = 0; i < list.size(); i++) { + if (list.get(i).getItem() == modifier.getItem()) { + if (list.get(i).getItemDamage() == modifier.getItemDamage()) { + return true; + } + } + } } + return false; } public static int modifierSize(ItemStack stack, ItemStack modifier) { if (modifier(stack) != null) { ArrayList list = modifier(stack); - for (int i = 0; i < list.size(); i++) - if (list.get(i).getItem() == modifier.getItem() - && list.get(i).getItemDamage() == modifier.getItemDamage()) - return list.get(i).stackSize; + + for (int i = 0; i < list.size(); i++) { + if (list.get(i).getItem() == modifier.getItem()) { + if (list.get(i).getItemDamage() == modifier.getItemDamage()) { + return list.get(i).stackSize; + } + } + } } + return -1; } public static int numberOfModifiers(ItemStack stack) { - if (modifier(stack) != null) + if (modifier(stack) != null) { return modifier(stack).size(); + } + return -1; } @@ -190,21 +224,34 @@ public class JewelryNBT { * @return */ public static boolean isIngotX(ItemStack stack, ItemStack ingot) { - if (ingot(stack) != null && ingot(stack).getItem() == ingot.getItem() - && ingot(stack).getItemDamage() == ingot.getItemDamage()) - return true; + if (ingot(stack) != null) { + if (ingot(stack).getItem() == ingot.getItem()) { + if (ingot(stack).getItemDamage() == ingot.getItemDamage()) + return true; + } + } + return false; } // TODO Return components based on NBT public static ItemStack item(ItemStack stack) { - if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() - && stack.getTagCompound().hasKey("target")) { - NBTTagCompound itemNBT = (NBTTagCompound) stack.getTagCompound().getTag("target"); - ItemStack target = new ItemStack(Item.getItemById(0), 0, 0); - target.readFromNBT(itemNBT); - return target; + if (stack != null) { + if (stack != new ItemStack(Item.getItemById(0), 0, 0)) { + if (stack.hasTagCompound()) { + if (stack.getTagCompound().hasKey("target")) { + NBTTagCompound itemNBT = (NBTTagCompound) stack.getTagCompound().getTag("target"); + + ItemStack target = new ItemStack(Item.getItemById(0), 0, 0); + + target.readFromNBT(itemNBT); + + return target; + } + } + } } + return null; } @@ -213,13 +260,20 @@ public class JewelryNBT { * @return */ public static ItemStack gem(ItemStack stack) { - if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() - && stack.getTagCompound().hasKey("gem")) { - NBTTagCompound jewelNBT = (NBTTagCompound) stack.getTagCompound().getTag("gem"); - ItemStack gem = new ItemStack(Item.getItemById(0), 0, 0); - gem.readFromNBT(jewelNBT); - return gem; + if (stack != null) { + if (stack != new ItemStack(Item.getItemById(0), 0, 0)) { + if (stack.hasTagCompound() && stack.getTagCompound().hasKey("gem")) { + NBTTagCompound jewelNBT = (NBTTagCompound) stack.getTagCompound().getTag("gem"); + + ItemStack gem = new ItemStack(Item.getItemById(0), 0, 0); + + gem.readFromNBT(jewelNBT); + + return gem; + } + } } + return null; } @@ -228,17 +282,28 @@ public class JewelryNBT { * @return */ public static ArrayList modifier(ItemStack stack) { - if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound()) { - int size = stack.getTagCompound().getInteger("modifierSize"); - ArrayList list = new ArrayList<>(); - for (int i = 0; i < size; i++) { - ItemStack modifier = new ItemStack(Item.getItemById(0), 0, 0); - NBTTagCompound modifierNBT = (NBTTagCompound) stack.getTagCompound().getTag("modifier" + i); - modifier.readFromNBT(modifierNBT); - list.add(modifier); + if (stack != null) { + if (stack != new ItemStack(Item.getItemById(0), 0, 0)) { + if (stack.hasTagCompound()) { + int size = stack.getTagCompound().getInteger("modifierSize"); + + ArrayList list = new ArrayList<>(); + + for (int i = 0; i < size; i++) { + ItemStack modifier = new ItemStack(Item.getItemById(0), 0, 0); + + NBTTagCompound modifierNBT = (NBTTagCompound) stack.getTagCompound().getTag("modifier" + i); + + modifier.readFromNBT(modifierNBT); + + list.add(modifier); + } + + return list; + } } - return list; } + return null; } @@ -247,13 +312,22 @@ public class JewelryNBT { * @return */ public static ItemStack ingot(ItemStack stack) { - if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() - && stack.getTagCompound().hasKey("ingot")) { - NBTTagCompound ingotNBT = (NBTTagCompound) stack.getTagCompound().getTag("ingot"); - ItemStack ingot = new ItemStack(Item.getItemById(0), 0, 0); - ingot.readFromNBT(ingotNBT); - return ingot; + if (stack != null) { + if (stack != new ItemStack(Item.getItemById(0), 0, 0)) { + if (stack.hasTagCompound()) { + if (stack.getTagCompound().hasKey("ingot")) { + NBTTagCompound ingotNBT = (NBTTagCompound) stack.getTagCompound().getTag("ingot"); + + ItemStack ingot = new ItemStack(Item.getItemById(0), 0, 0); + + ingot.readFromNBT(ingotNBT); + + return ingot; + } + } + } } + return null; } @@ -262,9 +336,16 @@ public class JewelryNBT { * @return */ public static int ingotColor(ItemStack stack) { - if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() - && stack.getTagCompound().hasKey("ingotColor")) - return stack.getTagCompound().getInteger("ingotColor"); + if (stack != null) { + if (stack != new ItemStack(Item.getItemById(0), 0, 0)) { + if (stack.hasTagCompound()) { + if (stack.getTagCompound().hasKey("ingotColor")) { + return stack.getTagCompound().getInteger("ingotColor"); + } + } + } + } + return 16777215; } @@ -274,10 +355,15 @@ public class JewelryNBT { * @return */ public static int gemColor(ItemStack stack) { - if (stack != null && stack != new ItemStack(Item.getItemById(0), 0, 0) && stack.hasTagCompound() - && stack.getTagCompound().hasKey("gemColor")) - return stack.getTagCompound().getInteger("gemColor"); + if (stack != null) { + if (stack != new ItemStack(Item.getItemById(0), 0, 0)) { + if (stack.hasTagCompound()) { + if (stack.getTagCompound().hasKey("gemColor")) + return stack.getTagCompound().getInteger("gemColor"); + } + } + } + return 16777215; } - -} +} \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java b/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java index 80dfdf1..cdcdd12 100755 --- a/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java +++ b/src/main/java/darkknight/jewelrycraft/util/JewelrycraftUtil.java @@ -1,10 +1,7 @@ package darkknight.jewelrycraft.util; import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Random; +import java.util.*; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; @@ -106,10 +103,6 @@ public class JewelrycraftUtil { } } - private static boolean itemHasSubtypes(Object item) { - return ((Item) item).getHasSubtypes() && FMLCommonHandler.instance().getSide() == Side.CLIENT; - } - @SideOnly(Side.CLIENT) public static void generateColors() { @@ -180,17 +173,6 @@ public class JewelrycraftUtil { .getIcon(0, item.getItemDamage()).getIconName().equals("soul_sand"); } - /* - * @SideOnly(Side.CLIENT) public static int getMostCommonColour(Map map) { List - * list = new LinkedList(map.entrySet()); Collections.sort(list, new - * Comparator() { public int compare(Object o1, Object o2) { return - * ((Comparable) ((Map.Entry) o1).getValue()) .compareTo(((Map.Entry) - * o2).getValue()); } }); Map.Entry me = (Map.Entry) list.get(list.size() - 1); - * for (int i = 0; i < list.size(); i++) { float alpha = Float - * .valueOf(list.get(i).toString().split("=")[1]); if (alpha < 180) me = - * (Map.Entry) list.get(i); } int rgb = (Integer) me.getKey(); return rgb; } - */ - @SideOnly(Side.CLIENT) public static boolean isGray(int[] rgbArr) { int rgbSum = rgbArr[0] + rgbArr[1] + rgbArr[2]; @@ -224,8 +206,13 @@ public class JewelrycraftUtil { public static void addCursePoints(EntityPlayer player, int points) { NBTTagCompound playerInfo = PlayerUtils.getModPlayerPersistTag(player, Variables.MODID); - playerInfo.setInteger("cursePoints", - playerInfo.hasKey("cursePoints") ? (playerInfo.getInteger("cursePoints") + points) : points); + int cursePoints; + if (playerInfo.hasKey("cursePoints")) + cursePoints = (playerInfo.getInteger("cursePoints") + points); + else + cursePoints = points; + + playerInfo.setInteger("cursePoints", cursePoints); playerInfo.setBoolean("playerCursePointsChanged", true); } diff --git a/src/main/java/darkknight/jewelrycraft/worldGen/village/JCTrades.java b/src/main/java/darkknight/jewelrycraft/worldGen/village/JCTrades.java index f23dee6..eef3a99 100755 --- a/src/main/java/darkknight/jewelrycraft/worldGen/village/JCTrades.java +++ b/src/main/java/darkknight/jewelrycraft/worldGen/village/JCTrades.java @@ -134,6 +134,7 @@ public class JCTrades implements IVillageTradeHandler { ingredient2 = new ItemStack(Blocks.emerald_block, 2 + randValue); } } + recipeList.addToListWithCheck(new MerchantRecipe(ingredient, ingredient2, result)); } } -- cgit v1.2.3