ModTweaker

ModTweaker

88M Downloads

Missing 'name' parameter in line 182 of modtweaker2.mods.exnihilo.mods.handler.Hammer results in script failure when no recipe found.

rallias opened this issue ยท 0 comments

commented

Line 182 of modtweaker2.mods.exnihilo.mods.handler.Hammer has 3 '%s' items listed, but only two parameters. When this line is reached (for example, when I try to remove a hammer recipe for exnihilo:_dust), the script fails, returning the following error:

ERROR: Error executing retardscraft3.zs: Format specifier '%s'
java.util.MissingFormatArgumentException: Format specifier '%s'
        at java.util.Formatter.format(Formatter.java:2519)
        at java.util.Formatter.format(Formatter.java:2455)
        at java.lang.String.format(String.java:2940)
        at modtweaker2.mods.exnihilo.handlers.Hammer.removeRecipe(Hammer.java:182)
        at Retardscraft3.__script__(retardscraft3.zs:51)
        at __ZenMain__.run(retardscraft3.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.MinecraftServer.func_71217_p(MinecraftServer.java:547)
        at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
        at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

The fix for this (which I tested) is to add 'name, ' before 'input.toString(),' on line 182 of minetweaker2.mods.exnihilo.mods.handler.Hammer .