ModTweaker

ModTweaker

88M Downloads

[Error] addRepairMaterial [TConstruct]

MoreThanHidden opened this issue ยท 4 comments

commented

Modtweaker: ModTweaker2-0.9.4.jar
Tinkers Construct: TConstruct-1.7.10-1.8.8.jar

Script Content:
mods.tconstruct.Tweaks.addRepairMaterial(gregtech:gt.metaitem.01:11085, "Shiny", 2);

MineTweaker Log:

ERROR: [ModTweaker2] Exception getting constructor of tconstruct.library.crafting.PatternBuilder$ItemKey
java.lang.NoSuchMethodException: tconstruct.library.crafting.PatternBuilder$ItemKey.<init>(net.minecraft.item.ItemStack, int, int, java.lang.String)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.getDeclaredConstructor(Unknown Source)
    at modtweaker2.helpers.ReflectionHelper.getConstructor(ReflectionHelper.java:53)
    at modtweaker2.mods.tconstruct.TConstructHelper.getItemKey(TConstructHelper.java:75)
    at modtweaker2.mods.tconstruct.handlers.TiCTweaks.addRepairMaterial(TiCTweaks.java:69)
    at TConstruct.__script__(TConstruct.zs:113)
    at __ZenMain__.run(TConstruct.zs)
    at minetweaker.runtime.MTTweaker.load(MTTweaker.java:163)
    at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:656)
    at minetweaker.MineTweakerImplementationAPI$1.execute(MineTweakerImplementationAPI.java:83)
    at minetweaker.MineTweakerImplementationAPI$19.execute(MineTweakerImplementationAPI.java:642)
    at minetweaker.mc1710.server.MCServer$MCCommand.func_71515_b(MCServer.java:124)
    at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:94)
    at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:739)
    at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:718)
    at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:37)
    at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:9)
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212)
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659)
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:396)
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)
ERROR: Error executing TConstruct.zs: null
java.lang.NullPointerException
    at modtweaker2.helpers.ReflectionHelper.getInstance(ReflectionHelper.java:18)
    at modtweaker2.mods.tconstruct.TConstructHelper.getItemKey(TConstructHelper.java:75)
    at modtweaker2.mods.tconstruct.handlers.TiCTweaks.addRepairMaterial(TiCTweaks.java:69)
    at TConstruct.__script__(TConstruct.zs:113)
    at __ZenMain__.run(TConstruct.zs)
    at minetweaker.runtime.MTTweaker.load(MTTweaker.java:163)
    at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:656)
    at minetweaker.MineTweakerImplementationAPI$1.execute(MineTweakerImplementationAPI.java:83)
    at minetweaker.MineTweakerImplementationAPI$19.execute(MineTweakerImplementationAPI.java:642)
    at minetweaker.mc1710.server.MCServer$MCCommand.func_71515_b(MCServer.java:124)
    at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:94)
    at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:739)
    at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:718)
    at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:37)
    at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:9)
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212)
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659)
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:396)
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)
commented

This feature has never worked, and I will never get it to work. We can't use reflection to make a new ItemKey, and we can't just call new ItemKey. this 'feature' will be removed next update.

commented

Nope, i fixed it.

commented

Ah, didn't read this before I had fixed myself last night.

commented

Didb't even know that it can be solved like that.