Getting recipe already created error #291


Closed
  • whatflavour created this issue Sep 21, 2017

    1. What steps will reproduce the problem ?

     

    Not sure. I have created "upgrade" recipes since we have tiers of items on our server. They vary in enchantment levels from tier to tier.

     

     

    2. Do you have an error log of what happened ?

     

    https://hastebin.com/ilociyeziq.sql

     

    3. What is the expected output ? What do you see instead ?

     

    Was not expecting any errors. The "upgrade" recipes i have for the chestpieces work just fine, not sure why these are any different. 

     

     

    4. What version of RecipeManager and CraftBukkit are you using ?

     

    RM v2.13

    PaperSpigot 1.11.2

     

    5. Did you use "rmreload" or "reload" commands in that server session ? If so, specify which.

     

    rmreload 

     

    6. Provide additional information if appliable.

     

     

     

     

  • Ryan_plays_mediocrely posted a comment Sep 21, 2017

    You can't have two recipes which use the same ingredients. Minecraft doesn't know about all the extra flags that RecipeManager is adding, so it can only tell the difference based on ingredients. RecipeManager's solution is to combine the recipes together using @individualresults and chaining the results after each other so that it acts as a single recipe to Minecraft, but leverages the conditions for multiple results.

     

    Try something like this:

    COMBINE
    @individualresults // Use this when you have multiple distinct results
    @permissions upgradechest1
    311 + 145
    = 100% 311:0:1
    @ingredientcondition 311 | lore &2DrugRun Uncommon Kit
    @ingredientcondition 145 | name &7&lTotem of Upgrading &a✪✪✪✪✪✪ | enchant DURABILITY 10
    @itemname &9Strong Rare Chestplate &a✪✪✪
    @enchantitem PROTECTION_ENVIRONMENTAL 3
    @enchantitem PROTECTION_FIRE 1
    @enchantitem PROTECTION_EXPLOSIONS 1
    @enchantitem DURABILITY 3
    @itemlore &2DrugRun Rare Kit
    = 100% 311:0:1
    @ingredientcondition 311 | lore &2DrugRun Rare Kit
    @ingredientcondition 145 | name &7&lTotem of Upgrading &a✪✪✪✪✪✪ | enchant DURABILITY 10
    @itemname &9Tough Epic Chestplate &a✪✪✪✪
    @enchantitem PROTECTION_ENVIRONMENTAL 4
    @enchantitem PROTECTION_FIRE 3
    @enchantitem PROTECTION_EXPLOSIONS 3
    @enchantitem PROTECTION_PROJECTILE 3
    @enchantitem DURABILITY 5
    @itemlore &2DrugRun Epic Kit

     You should be able to chain as many recipes as you want in this way.

  • whatflavour posted a comment Sep 21, 2017

    I'll try this and let you know. Thanks for the info

  • whatflavour posted a comment Sep 21, 2017

    Alright so here is one of my files (For boot upgrades). I followed the @individualresults to the best of my knowledge.

     

    So the first result works as intended, but the ones after that dont seem to work. Here is the file:

     

    https://hastebin.com/agipuyebom.coffeescript

     

     

     

    The items im using in the crafting table match the ones in the recipe, i've checked and checked again. 


    Edited Sep 21, 2017
  • Ryan_plays_mediocrely posted a comment Sep 22, 2017

    Try removing the 100% in the = lines. That could be causing it to mistake it for a chance recipe.

  • whatflavour posted a comment Sep 22, 2017

    I tested the following:

     

    - Have all results have 100%

    - Have no results have 100%

    - Have 1 result have 100%

     

    Here is the recipe: https://hastebin.com/agunowokoc.coffeescript

     

    None of them worked. Still not achieving desired goal :(

  • whatflavour posted a comment Sep 22, 2017

    Currently, the only workaround is is making each of these files into separate files and have them as CRAFT with @override and have the item in the recipe be in a different position than the previous tier. 

     

  • whatflavour posted a comment Sep 24, 2017

    hello?

  • Ryan_plays_mediocrely posted a comment Sep 24, 2017

    These work correctly for me, although the ✪✪✪✪✪✪ get converted to question marks, which I assume is due to file encoding. Make sure that the user who is trying this has the "upgradeaxe" permission and that the name/lore conditions match EXACTLY.  If they're being created by another plugin, try placing the items into the leftmost 3x3 slots in your inventory (as well as some item on the selected hotbar) and use /rmcreaterecipe to get an output of them. Please post that output as well as screenshots/video of the items if possible.

     

    If this still doesn't work for you, please post what is happening at this point. Are you getting any errors or messages? Do any of the recipes work?

  • whatflavour posted a comment Sep 26, 2017

    I have OP and all RM permissions. So I did some specific testing, and these are my results:

    1.) I grabbed a diamond_axe & anvil, put them in the leftmost 3x3 of my inventory and did /rmcreaterecipe.

    This is the file that was produced: https://hastebin.com/opufivobew.rb 

     

    2.) Now, i copied the COMBINE recipe, to the correct file (making sure there was nothing else in the file).

    Here is the file i copy/pasted the combine recipe to: https://hastebin.com/fofodoyalo.rb  (/plugins/RecipeManager/recipes/UPGRADE_axe.txt)

     

    3.) I saved the file and did /rmreload. Here is my console output: https://hastebin.com/sibosihiqa.sql

    There are no errors with regards to the file above. 

     

    4.) Using the same exact items that i used in step 1 (the exact items i used /rmcreaterecipe with), i put those items into a workbench, and got no result. 

     

     

     

    I am really not sure what i am doing wrong. I did not switch the items out, i used the same ones that i created the recipe with. I did not use a command crafting bench (/craft), i used the crafting bench block and right clicked. I tried in creative and survival both. I took a look back at your comment and you said "Make sure that the user who is trying this has the "upgradeaxe" permission".

     

    5.) I went back to the recipe and edited it so it has the permission.

    Here is the file with the permission flag: https://hastebin.com/ebuxifazoh.rb (/plugins/RecipeManager/recipes/UPGRADE_axe.txt)

     

    5.5) Reloaded RM. Console output is exactly the same as step 3. 

     

    6.) I went ahead and gave myself 'recipemanager.*' permission as well as the permission upgradeaxe.

    You can see the permissions here: http://prntscr.com/gq2lul

     

    6.5) Reloaded PEX & RM. Console output is exactly the same as step 3. 

     

    7.) I tried to craft, and yet again it yielded no result. So now i looked at the file and changed all the § to &. Still no result

    Here is the file: https://hastebin.com/cobedetite.rb

     

     

    7.5) Reloaded RM. Console output is exactly the same as step 3. 

     

    8.) Lastly, I removed a majority of the checks from the file, (kept only the ones that HAVE to be there).

    Here is the file: https://hastebin.com/odisiyuwuf.coffeescript    (/plugins/RecipeManager/recipes/UPGRADE_axe.txt)

     

     

    Throughout all of these tests, I used the same exact items as i used when i did /rmcreaterecipe

    I am not sure what else i can tell you or other information to give you. 

  • Ryan_plays_mediocrely posted a comment Sep 26, 2017

    I'll try to dig into this more tonight. I've just got a few questions that might help narrow it down:

     

    Does the recipe work without the recipe name condition check? I suspect this has to do with special characters not matching (the stars).

     

    Is your server on windows or linux?

     

    What file encoding are you using for your recipe files? (Ansi, UTF-8, etc.)

     

    If the stars are the issue, I have a couple ideas on how to improve this. Otherwise, you seem to be doing everything correctly so there might be more digging involved.

  • whatflavour posted a comment Sep 26, 2017

    Does the recipe work without the recipe name condition check? I suspect this has to do with special characters not matching (the stars).

     

     

     Using the file from /rmcreaterecipe I  copied both of the ingredient condition lines. I removed the name checks and did the lore/enchant check for the anvil, and lore check for the diamond_axe. Here is this file: https://hastebin.com/omewahuyew.scala

    The recipe does not work with the name checks removed. 

     

    Is your server on windows or linux?

     

    Our server is running linux. Ubuntu 16  with latest java.

     

    What file encoding are you using for your recipe files? (Ansi, UTF-8, etc.)

     

    the .txt file encoding is UTF-8. All files that contain those stars (crates, factions, essentials, etc) are all in UTF-8 as well. Stars become question marks if they are not in UTF-8. 

     

     

  • whatflavour posted a comment Sep 26, 2017

    I did another quick test and removed the lore check from the anvil. Here is the file: https://hastebin.com/fepovuyoke.nginx

     

    there is still no result. 

  • Ryan_plays_mediocrely posted a comment Sep 27, 2017

    I'm starting to think more than one issue is going on here... I believe that since you are on linux, you need to use the § instead of & (But I honestly am not sure if this is consistent and they theoretically should act the same).

     

    With your latest file (https://hastebin.com/fepovuyoke.nginx), can you try replacing those characters and see if it works?

     

    If that doesn't work, can you try removing flags in the recipe until something does work? Perhaps we can narrow it down to confirm if it is the ingredientcondition or if for some reason one of the other flags is causing trouble.

  • whatflavour posted a comment Sep 28, 2017

    If you look at step 7 in my testing post above, you'll see that i tried the character swap ( § -> &). Our other files (such as crates, which /gives custom items with the stars) are all using & symbol and are on UTF-8 encoding.

     

    I will test tonight the following:

    - basic recipe (daxe + anvil only)

    - daxe + anvil, output axe with enchants

    - daxe + anvil, ingredientcondition for anvil lore only

    - daxe + anvil, ingredientcondition for daxe lore only

    - daxe + anvil, ingcond for both daxe + anvil

     

     

    What i am not understanding is how the items i used when running /rmcreaterecipe, dont work for the actual recipe when loaded onto an acitve recipe file. 

     

     

  • whatflavour posted a comment Sep 30, 2017

     

    Okay, here are the results of my testing. All files use the & symbol and are in UTF-8 encoding

     

     

    Test 1: https://hastebin.com/jetehetili.nginx

    - Removed all @ingredientcondition checks

    - Removed all ✪ symbols

    Test was successful and output the axe in the file. 

    Axe used: http://prntscr.com/grssqi

    Anvil used: http://prntscr.com/grssu2

     

    Test 2: https://hastebin.com/jakahobuwu.nginx 

    - Added ✪ symbol to output axe

    Test was successful and output the axe with the ✪

    Axe used: http://prntscr.com/grssqi

    Anvil used: http://prntscr.com/grssu2

     

    Test 3: https://hastebin.com/ecikijewog.nginx

    - Added lore check to diamond axe.

    Test failed and outputs nothing

    Axe used: https://prnt.sc/grstpl

    Anvil used: http://prntscr.com/grssu2

     

     

    Test 4: https://hastebin.com/iyigovabus.nginx

    - Removed lore check on axe

    - Added lore check to anvil

    Test failed and did not output anything

    Axe used:  http://prntscr.com/grssqi

    Anvil used: http://prntscr.com/grt2ih

     

    Test 5: https://hastebin.com/wupiwasufo.nginx

    - Removed lore check on axe

    - Added enchant check to anvil

    Test was successful and produced axe

    Axe used: http://prntscr.com/grt3uc

    Anvil used: http://prntscr.com/grt3wn

     

    Test 6: https://hastebin.com/dopovifebo.nginx

    - Added lore check to axe

    Test failed and produced nothing

    Axe used:  http://prntscr.com/grt4v3

    Anvil used: http://prntscr.com/grt515

     

     

    Kind of tired of testing. Seeing that the lore is causing issues and not the stars, i assumed that the plugin i was using to assign lores could be at fault, i decided to give the items with good old /give. Here are the results.

     

    Using /give flavour 279 1 lore&2DrugRun_Uncommon_Kit

     

    Test 6: https://hastebin.com/dopovifebo.nginx

    - No changes made to axe recipe

    Test was successful and produced the axe

    Axe used: http://prntscr.com/grt5p4

    Anvil used: http://prntscr.com/grt515

     

    Good, one problem solved. let's get to the bigger picture. 

     

    Test 7: https://hastebin.com/dopovifebo.nginx

    - Added multiple results

    - Added @individualresults

    Test Results:

    - Result 1 (Uncommon + Anvil -> Rare) was successful

      - Axe used: http://prntscr.com/grt9x8

      - Anvil used: http://prntscr.com/grt9qa

    - Result 2 (Rare + Anvil -> Epic) was a success

      - Axe used: http://prntscr.com/grtari (This was the axe produced by result1)

      - Anvil used: http://prntscr.com/grt9qa

    - Result 3 (Epic + Anvil -> Legendary) was a success

      - Axe used: http://prntscr.com/grtbch

      - Anvil used: http://prntscr.com/grt9qa

    - Result 4 (Legendary + Anvil -> Wicked) was a success

      - Axe used: http://prntscr.com/grtbfu

      - Anvil used: http://prntscr.com/grt9qa

     

    Ultimately, the plan of this whole system was to be able to use the axe and anvil to create a better axe, and use the better axe with another anvil, to create an even better axe, and then put that system in place with all diamond armor/tools/weps. 

     

    Ultimate conclusion was that the plugin i was using for names and lores was doing some funky stuff whenever i did the lore command, so i took the command we use in our crates plugin, and gave me the items with that give command, and worked with the recipe. Anyways, thanks for your time. 

     

  • Ryan_plays_mediocrely closed issue Nov 14, 2017

To post a comment, please login or register a new account.