CraftBook 3

CraftBook 3

139k Downloads

Craftbook error custom crafting lore

LadyCailinBot opened this issue · 9 comments

commented

CRAFTBOOK-2962 - Reported by e3p3s3334

When I try and use custom crafting to craft items with lore for item lore stats it creates an error. When i use other lores however it get no errors. Here is the error report:
[15:46:06] [Server thread/ERROR]: [CraftBook] An error occured generating ingredients for recipe: junk10
[15:46:06] [Server thread/ERROR]: [CraftBook] java.lang.NumberFormatException: For input string: "|§bCrit Damage: §212§a"
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.lang.Double.parseDouble(Unknown Source)
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.getItems(RecipeManager.java:375)
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.load(RecipeManager.java:254)
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.(RecipeManager.java:228)
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.(RecipeManager.java:123)
at com.sk89q.craftbook.mech.crafting.RecipeManager.load(RecipeManager.java:63)
at com.sk89q.craftbook.mech.crafting.RecipeManager.(RecipeManager.java:34)
at com.sk89q.craftbook.mech.crafting.CustomCrafting.enable(CustomCrafting.java:59)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.setupCraftBook(CraftBookPlugin.java:500)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.onEnable(CraftBookPlugin.java:311)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:250)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:350)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:389)
at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugin(CraftServer.java:439)
at org.bukkit.craftbukkit.v1_7_R1.CraftServer.enablePlugins(CraftServer.java:375)
at net.minecraft.server.v1_7_R1.MinecraftServer.m(MinecraftServer.java:342)
at net.minecraft.server.v1_7_R1.MinecraftServer.g(MinecraftServer.java:319)
at net.minecraft.server.v1_7_R1.MinecraftServer.a(MinecraftServer.java:275)
at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.java:175)
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:424)
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)

I get same probelm when using it for an ingredient. And here is the config:

junk10:
    type: Shapeless
    ingredients:
        'DIAMOND_SWORD|§d§lSlaying Thrustblade||§bWeapon Speed: §cSlow|§bDamage: §a+§268§2-§293|§bCrit Chance: §24§a%|§bCrit Damage: §212§a%|§eReflect: §26§a%|§cIgnition: §27§a%|§5Harming: §23§a%||§6Durability: 350/350||§3Level: 1|§3Bound to ExCrobic ': 1
        'ICE ': 1
    results:
        'LONG_GRASS:2|§9Please wait |§aItem §awill §aappear §ain §ainvetory §asoon ': 1

Is there something I shouldn't be including in my lore?

commented

Comment by me4502

Firstly, you need to put a \ before any % I believe! and replace any section signs with &

commented

Comment by e3p3s3334

again i get the same error:

[22:46:45] [Server thread/ERROR]: [CraftBook] An error occured generating ingredients for recipe: junk102
[22:46:45] [Server thread/ERROR]: [CraftBook] java.lang.NumberFormatException: For input string: "|&bCrit Damage: &212&a"
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.lang.Double.parseDouble(Unknown Source)
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.getItems(RecipeManager.java:375)
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.load(RecipeManager.java:259)
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.(RecipeManager.java:228)
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.(RecipeManager.java:123)
at com.sk89q.craftbook.mech.crafting.RecipeManager.load(RecipeManager.java:63)
at com.sk89q.craftbook.mech.crafting.RecipeManager.(RecipeManager.java:34)
at com.sk89q.craftbook.mech.crafting.CustomCrafting.enable(CustomCrafting.java:59)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.setupCraftBook(CraftBookPlugin.java:500)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.reloadConfiguration(CraftBookPlugin.java:1000)
at com.sk89q.craftbook.bukkit.commands.TopLevelCommands$Commands.reload(TopLevelCommands.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sk89q.minecraft.util.commands.CommandsManager.invokeMethod(CommandsManager.java:533)
at com.sk89q.minecraft.util.commands.CommandsManager.executeMethod(CommandsManager.java:520)
at com.sk89q.minecraft.util.commands.CommandsManager.executeMethod(CommandsManager.java:475)
at com.sk89q.minecraft.util.commands.CommandsManager.execute(CommandsManager.java:409)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.onCommand(CraftBookPlugin.java:693)
at com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:52)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:175)
at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:683)
at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchServerCommand(CraftServer.java:670)
at net.minecraft.server.v1_7_R1.DedicatedServer.aw(DedicatedServer.java:286)
at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:251)
at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545)
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457)
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)

[22:46:45] [Server thread/ERROR]: [CraftBook] com.sk89q.craftbook.mech.crafting.InvalidCraftingException: Result is invalid in recipe: junk102
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.load(RecipeManager.java:263)
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.(RecipeManager.java:228)
at com.sk89q.craftbook.mech.crafting.RecipeManager$Recipe.(RecipeManager.java:123)
at com.sk89q.craftbook.mech.crafting.RecipeManager.load(RecipeManager.java:63)
at com.sk89q.craftbook.mech.crafting.RecipeManager.(RecipeManager.java:34)
at com.sk89q.craftbook.mech.crafting.CustomCrafting.enable(CustomCrafting.java:59)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.setupCraftBook(CraftBookPlugin.java:500)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.reloadConfiguration(CraftBookPlugin.java:1000)
at com.sk89q.craftbook.bukkit.commands.TopLevelCommands$Commands.reload(TopLevelCommands.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sk89q.minecraft.util.commands.CommandsManager.invokeMethod(CommandsManager.java:533)
at com.sk89q.minecraft.util.commands.CommandsManager.executeMethod(CommandsManager.java:520)
at com.sk89q.minecraft.util.commands.CommandsManager.executeMethod(CommandsManager.java:475)
at com.sk89q.minecraft.util.commands.CommandsManager.execute(CommandsManager.java:409)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.onCommand(CraftBookPlugin.java:693)
at com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:52)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:175)
at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:683)
at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchServerCommand(CraftServer.java:670)
at net.minecraft.server.v1_7_R1.DedicatedServer.aw(DedicatedServer.java:286)
at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:251)
at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545)
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457)
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)

[22:46:45] [Server thread/INFO]: [CraftBook] Registered 3 custom recipes!
[22:46:45] [Server thread/INFO]: [CraftBook] 1 cauldron recipe(s) loaded
[22:46:45] [Server thread/INFO]: [CraftBook] Enumerating chunks for self-triggered components...
[22:46:45] [Server thread/INFO]: [CraftBook] 512 chunk(s) for 4 world(s) processed (1ms elapsed)
[22:46:46] [Server thread/INFO]: [CraftBook] CraftBook v3.8.7 is the latest version available, and the updatability of it is: NO_UPDATE. You currently have version CraftBook v3.8.7 installed.
[22:46:46] [Server thread/INFO]: The CraftBook config has been reloaded.

Config:

junk102:
    type: Shapeless
    ingredients:
        'FLINT_AND_STEEL ': 1
        'DIAMOND_SWORD ': 1
    results:
        'DIAMOND_SWORD|&d&lSlaying Thrustblade||&bWeapon Speed: &cSlow|&bDamage: &a+&268&2-&293|&bCrit Chance: &24&a\%|&bCrit Damage: &212&a\%|&eReflect: &26&a\%|&cIgnition: &27&a\%|&5Harming: &23&a\%||&6Durability: 350/350||&3Level: 1 ': 1
commented

Comment by me4502

Hrm, it appears \ doesn't fix %s.. Is it possible to not use the percent sign?

commented

Comment by e3p3s3334

Its possible to not use the percent sign, it just means I cant use the lore that requires it. I did try without % and all it crafts is a normal diamond sword. Thankfully I can with custom crafting use the upon crafting do a command feature in order to have console give them the item as well as a garbage item in order to get the command.

commented

Comment by me4502

Yeah, when I recode custom crafting I believe it will support percent signs.

commented

Comment by e3p3s3334

Yeah that would be great

commented

Comment by e3p3s3334

I found a fix for this issue. It wasn't craftbook that was the problem in the end but ils. ils was setting it so every crafted armour, tool, or weapon crafted had a durability. This would cause the items to not be crafted when they should have. Found this when I tried crafting different tools and still had this problem. THank you for trying to help though.

commented

Comment by me4502

Wait, so that was causing the percentage sign errors?

commented

Comment by e3p3s3334

The percentages signs were what was causing the errors to occur, and I am assuming causing the crafting recipe to no longer work once server is reloaded. Sorry I was being a bit nieve and not reloading server to check.