CraftBook 3

CraftBook 3

139k Downloads

reload error with custom recipes with § in name (color code)

LadyCailinBot opened this issue · 8 comments

commented

CRAFTBOOK-2880 - Reported by Xentax5

Hi, I use rpgitem plugin for creating special items, but it dont suppor recipes with rpgitems.
Than, I must use craftbook custom recipes with name to create it, but items from rpgitem have colored name.
For example... I have sword lvl 1 and swrod lvl 2 i want to craft lvl 2 from lvl 1. Lvl 1 is named §0§0§0§0§0§0§6§b§9§lSword lvl 1 (this "§0§0§0§0§0§0§6§b§9§l" is from anvil if i use Ctrl+C).
But if i put §0§0§0§0§0§0§6§b§9§lSword lvl 1 in ingredienties. At reload it says error unacceptable character '�' (0xFFFD) special characters are not allowed.

What can I do ? I use minecraft 1.5.2 and craftbook version 3.6.9

Full error:

15:04:06 [INFO] Xentax5 issued server command: /craftbook reload
15:04:08 [INFO] [CraftBook] CraftBook v3.8b5 is the latest version available, and the updatability of it is: NO_UPDATE. You currently have version 3.6.9 installed.
15:04:08 [INFO] 1 cauldron recipe(s) loaded
15:04:08 [SEVERE] [CraftBook] unacceptable character '�' (0xFFFD) special characters are not allowed
in "", position 927
at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:98)
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:191)
at org.yaml.snakeyaml.reader.StreamReader.(StreamReader.java:63)
at org.yaml.snakeyaml.Yaml.load(Yaml.java:423)
at com.sk89q.util.yaml.YAMLProcessor.load(YAMLProcessor.java:112)
at com.sk89q.craftbook.mech.crafting.RecipeManager.load(RecipeManager.java:45)
at com.sk89q.craftbook.mech.crafting.RecipeManager.(RecipeManager.java:32)
at com.sk89q.craftbook.mech.crafting.CustomCrafting.(CustomCrafting.java:55)
at com.sk89q.craftbook.bukkit.MechanicalCore.registerEvents(MechanicalCore.java:159)
at com.sk89q.craftbook.bukkit.MechanicalCore.enable(MechanicalCore.java:83)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.startComponents(CraftBookPlugin.java:468)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.reloadConfiguration(CraftBookPlugin.java:850)
at com.sk89q.craftbook.bukkit.commands.TopLevelCommands$Commands.reload(TopLevelCommands.java:54)
at sun.reflect.GeneratedMethodAccessor145.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:508)
at com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:52)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:189)
at org.bukkit.craftbukkit.v1_5_R3.CraftServer.dispatchCommand(CraftServer.java:523)
at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(PlayerConnection.java:971)
at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:889)
at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:846)
at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44)
at net.minecraft.server.v1_5_R3.NetworkManager.b(NetworkManager.java:292)
at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java:115)
at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35)
at net.minecraft.server.v1_5_R3.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:581)
at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:226)
at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:477)
at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:410)
at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)

PS: I cant change project type from CommandBook to CraftBook... it says "Only developers can change that field, sorry.

commented

Comment by me4502

YAML files don't support characters like that. Use a & instead.

commented

Comment by Xentax5

OK, but character "&" is not translate to colored item name... it displays normal white with & inside its name.
That is too problem.

commented

Comment by me4502

Wait a sec, section sign works. You had a tab in the file

commented

Comment by Xentax5

OK, "&" works for names, but if I have §0§0§0§0§0§0§6§b§9§lSword lvl 1 from RPGitems and I put &0&0&0&0&0&0&6&b&9&lSword lvl 1 to ingredients it dont work. But if i create recipe, maybe furnace.. from 1 wood -> &0&0&0&0&0&0&6&b&9&lSword lvl 1 and this used to recipe it works. Why ? How can i repair this ?
And too, if lore in config of craftbook is empty it means, item dont have lore or lore is ignored like if item dont have set name ?

commented

Comment by Xentax5

Oh see, new problem :D If i create it from rpgitems it is §0§0§0§0§0§0§6§b§9§lSword lvl 1 BUT if it created by recipe from craftbook it is §r§0§0§0§0§0§0§6§b§9§lSword lvl 1 and this works, even I have in config &0&0&0&0&0&0&6&b&9&lSword lvl 1 ... I dont now, but this is possible problem.

commented

Comment by me4502

If custom crafting items don't have lore, it isn't set to have lore.

commented

Comment by Xentax5

hmmm ok, but I think this isnt important.

commented

Comment by me4502

Hmm?