CraftBook 3

CraftBook 3

139k Downloads

Custom Recipes Breaks after restart

LadyCailinBot opened this issue · 29 comments

commented

CRAFTBOOK-2903 - Reported by Alex.Gajewski

Here is the config of custom-recipes.yml

CraftBook Custom Recipes. CraftBook Version: 3.8-SNAPSHOT:3621-20a92c8,master

For more information on setting up custom recipes, see the wiki:

http://wiki.sk89q.com/wiki/CraftBook/Custom_crafting

crafting-recipes:
AlmaceSword:
type: Shaped
ingredients:
'IRON_INGOT|§6Almace Blade|§4Blade for crafting Almace Sword.|§2Type: Crafting Material ': a
'WOOD_BUTTON|§6Almace Hilt|§4Hilt for crafting Almace Sword.|§2Type: Crafting Material ': b
'LEVER|§6Almace Grip|§4Grip for crafting Almace Sword.|§2Type: Crafting Material ': c
shape:
- ' a'
- ' b'
- ' c'
results:
? 'DIAMOND_SWORD;KNOCKBACK:1;DAMAGE_ALL:2|§f§9Almace|&bDamage: 0|§bCrit
Chance: 0|§aLife Steal: 0|§cIgnition: 1000|&9Slow: 0|§6Speed: 0|PvP
Dmg Modifier: +0|||§3Level: 0 '
: 1

The problem is that the recipe works fine until the server is restarted. After the restart if you put the items in order how it's described it won't work but if you just put lever at the top of crafting bench it will craft the sword.

http://minecraftmalta.com/uploads/AAAImages/1%20(1).png
http://minecraftmalta.com/uploads/AAAImages/1%20(2).png
http://minecraftmalta.com/uploads/AAAImages/1%20(3).png

Any idea why the recipe breaks after restart? Note that I made the recipe via in game. Also I am running on latest Bukkit build of this plugin.

commented

Comment by me4502

Please pastebin the recipe file. That recipe looks awfully corrupt the way it is

commented

Comment by Alex.Gajewski

Here you go.

http://pastebin.com/9bbV5NeZ

commented

Comment by me4502

Firstly remove all the Â's, secondly remove the question mark in results, and put the :1 on the end of the line before it. Also. Remove the spaces in the shape section, as that is requiring it to be in the center or far right column.

commented

Comment by Alex.Gajewski

Alright so did what you told me and at least now it isn't giving the sword just by putting the lever on top but the whole recipe ain't working either. Tried as well removing the '' from the shape but same no success.

http://pastebin.com/NK63PXFJ

commented

Comment by me4502

If you move the :1 at the end onto the end of the line before it, does it work?
Once you've done that, type in /cb report -p and link the URL here

commented

Comment by Alex.Gajewski

Nope didn't work and here is the link http://pastebin.com/jQGQDddX

Also just noticed that I got this error in console.

[CraftBook] Failed to initialize mechanic: CustomCrafting
CONSOLE: Input length = 1
CONSOLE: java.nio.charset.MalformedInputException: Input length = 1

commented

Comment by me4502

Please check your startup log to see if there any errors about custom crafting. According to that no recipe existed, which I presume is due to a YAML error.

commented

Comment by Alex.Gajewski

Just edited the comment and this was the error.

[CraftBook] Failed to initialize mechanic: CustomCrafting
5:10:28 AM CONSOLE: Input length = 1
5:10:28 AM CONSOLE: java.nio.charset.MalformedInputException: Input length = 1

commented

Comment by me4502

Is there anything more to the error?

commented

Comment by Alex.Gajewski

This is all of it I presume.

5:10:28 AM CraftBook: Enabling CraftBook v3.8-SNAPSHOT:3621-20a92c8,master
5:10:28 AM CraftBook: Loading persistant data from YAML!
5:10:28 AM CONSOLE: WARN]: [CraftBook] Failed to initialize mechanic: CustomCrafting
5:10:28 AM CONSOLE: Input length = 1
5:10:28 AM CONSOLE: java.nio.charset.MalformedInputException: Input length = 1
5:10:28 AM CONSOLE: Source) ~[?:1.7.0_51]
5:10:28 AM CONSOLE: Source) ~[?:1.7.0_51]
5:10:28 AM CONSOLE: Source) ~[?:1.7.0_51]
5:10:28 AM CONSOLE: Source) ~[?:1.7.0_51]
5:10:28 AM CONSOLE: Source) ~[?:1.7.0_51]
5:10:28 AM CraftBook: Enumerating chunks for self-triggered components...
5:10:28 AM CONSOLE: WARN]: [WorldEdit] No compatible nms block class found.
5:10:28 AM CraftBook: 1875 chunk(s) for 3 world(s) processed (82ms elapsed)
5:10:30 AM CraftBook: CraftBook v3.8.2 is the latest version available, and the updatability of it is: NO_UPDATE. You currently have version CraftBook v3.8.2 installed.

commented

Comment by me4502

Apparently that error means you have characters that your OS can't handle in the file.
I'm assuming it'd be §, try replacing all of them with a &.

commented

Comment by Alex.Gajewski

Changed them but now a different error.

5:22:50 AM CraftBook: Enabling CraftBook v3.8-SNAPSHOT:3621-20a92c8,master
5:22:50 AM CraftBook: Loading persistant data from YAML!
5:22:50 AM CONSOLE: WARN]: [CraftBook] Failed to initialize mechanic: CustomCrafting
5:22:50 AM CONSOLE: mapping values are not allowed here; in 'reader', line 43, column 48:
5:22:50 AM CONSOLE: ... Dmg Modifier: +0|||&3Level: 0 ': 1
5:22:50 AM CONSOLE: ^
5:22:52 AM CraftBook: Enumerating chunks for self-triggered components...
5:22:52 AM CONSOLE: WARN]: [WorldEdit] No compatible nms block class found.
5:22:52 AM CraftBook: 1875 chunk(s) for 3 world(s) processed (57ms elapsed)
5:22:52 AM CraftBook: CraftBook v3.8.2 is the latest version available, and the updatability of it is: NO_UPDATE. You currently have version CraftBook v3.8.2 installed.

commented

Comment by me4502

Put it all back on one line, instead of multiple lines.

The result that is.

commented

Comment by Alex.Gajewski

In fact just did that now and it does fix the error and loads 4 items but the recipe still not working.

5:32:23 AM CraftBook: Enabling CraftBook v3.8-SNAPSHOT:3621-20a92c8,master
5:32:23 AM CraftBook: Loading persistant data from YAML!
5:32:23 AM CraftBook: Registered 4 custom recipes!
5:32:23 AM CraftBook: Enumerating chunks for self-triggered components...
5:32:23 AM CONSOLE: WARN]: [WorldEdit] No compatible nms block class found.
5:32:23 AM CraftBook: 1875 chunk(s) for 3 world(s) processed (53ms elapsed)
5:32:23 AM CraftBook: CraftBook v3.8.2 is the latest version available, and the updatability of it is: NO_UPDATE. You currently have version CraftBook v3.8.2 installed.

Just in case. http://pastebin.com/r6MZkdHZ

commented

Comment by Alex.Gajewski

Alright thanks for the help anyway. Made my own plugin that handles all the crafting well. :)

commented

Comment by me4502

What is the recipe now? It seems to see it as only a lever.

commented

Comment by me4502

If possible, are you able to make the recipe using the configuration, instead of the ingame editor? The ingame editor is severely bugged due to the heavily outdated version of SnakeYAML packaged with bukkit. Until that is fixed I can't really make it all that stable.

commented

Comment by Alex.Gajewski

It suppose to be same as before.

http://pastebin.com/sgyTMe5Y

commented

Comment by Alex.Gajewski

I will try to do it from configuration since we have already the custom items created in game but we need to make a way to craft them.

commented

Comment by me4502

If you've already added these items as CommandItems, instead of making the item again, you can just write the CommandItem name.

commented

Comment by Alex.Gajewski

The items where created by using a different plugin and not CommandItem.

commented

Comment by me4502

Oh

commented

Comment by Alex.Gajewski

Although as long as the lore and names stay the same the items will work properly with the other plugins. Will check a bit more myself about this later on got to nap now. Will update you on the progress if I fixed it somehow maybe.

Will try to do them manually and maybe using the CommandItem for the materials.

commented

Comment by Alex.Gajewski

Also you think the recipe might not work due to the ingredient item or the result item?

commented

Comment by me4502

Uh, well it could actually be bukkit. 1.7 Bukkit has a few bugs with recipe ingredients, which stops this sort of thing working under some certain circumstances.

commented

Comment by Alex.Gajewski

Is there a possibility from you to fix it somehow or maybe do some work around? Like for example you make a command to save the item in your hand to a file and then be able to use it in recipes?

commented

Comment by me4502

Uh, it's not possible to work around. Bukkit doesn't properly alert the plugin.

commented

Comment by Alex.Gajewski

So that means even if items would be saved correctly the problem of crafting is coming from bukkit right?

commented

Comment by me4502

Yes, and the reason items aren't being saved correctly, is they use a very old version of SnakeYAML which has a lot of bugs.