Crafting recipes not working with certain blocks

Published by raziel23x on
Status
Fixed
Issue description

I was trying to add a simple recipe to turn a block of quartz back into quartz but when i test the recipe with both Block of Quartz and any block of quartz option and make the recipe and test it when i put the block of quartz in the crafting grid to turn it back into quartz nothing happens

any block of quartz generates this

 

{
  "group": "land_of_the_lost",
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "tag": "forge:ores/quartz"
    }
  ],
  "result": {
    "item": "minecraft:quartz",
    "count": 4
  }
}

 

the block of quartz generates this one

{
  "group": "land_of_the_lost",
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "tag": "forge:ores/quartz"
    }
  ],
  "result": {
    "item": "minecraft:quartz",
    "count": 4
  }
}

 

is the json that is generated when i did the recipe

but cannot turn the block of quartz back into quartz at all no matter how i tried it

 

what it should look like is

 

{
  "group": "land_of_the_lost",
 "type": "minecraft:crafting_shapeless",
    "ingredients": [
        {
            "item": "minecraft:quartz_block"
        }
    ],
    "result": {
        "item": "minecraft:quartz",
        "count": 4
    }
}

as this works

 

I have not tested many recipe conversions back but not sure why this one is not playing nicely if i find any more crafting recipes that are borked i will add them to this issue

Issue comments

Take a peek at the console tab, don't be afraid to use it:

32:09.57 [Server thread/INFO] [minecraft/MinecraftServer]: Found new data pack vanilla, loading it automatically
32:09.57 [Server thread/INFO] [minecraft/SimpleReloadableResourceManager]: Reloading ResourceManager: Default, forge-1.14.4-28.2.3_mapped_snapshot_20190719-1.14.3-recomp.jar, main
1;31:09.59 [Server thread/ERROR] [minecraft/RecipeManager]: Parsing error loading recipe land_of_the_lost:enhanced_diamond_recipe
com.google.gson.JsonSyntaxException: Unknown item 'land_of_the_lost:enchanced_diamond'
   at net.minecraft.item.crafting.ShapedRecipe.lambda$deserializeItem$0(ShapedRecipe.java:280) ~[?:?] {re:classloading}
   at java.util.Optional.orElseThrow(Optional.java:290) ~[?:1.8.0_232] {}
   at net.minecraft.item.crafting.ShapedRecipe.deserializeItem(ShapedRecipe.java:279) ~[?:?] {re:classloading}
   at net.minecraft.item.crafting.CookingRecipeSerializer.read(CookingRecipeSerializer.java:27) ~[?:?] {re:classloading}
   at net.minecraft.item.crafting.CookingRecipeSerializer.read(CookingRecipeSerializer.java:11) ~[?:?] {re:class

Based on the workspace state, it seems you have some recipes that are not associated with mod elements and not under control of MCreator. Go to <workspace dir>\src\main\resources\data\land_of_the_lost\recipes and remove these recipe json file there.

as you can see i am not getting any errors

I uploaded a more updated project zip

I have opened your workspace and errors are still there, errors are printed once one of the world is loaded. There are some more recipes, such as:

  • enhanced_diamond_helmet_recipe

  • enhanced_diamond_recipe

It seems you renamed them to names like enhanced_diamondhelmetrecipe but old ones remained.

still does not explain why the code is generating the recipe as 

{
  "group": "land_of_the_lost",
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "tag": "forge:ores/quartz"
    }
  ],
  "result": {
    "item": "minecraft:quartz",
    "count": 4
  }
}

when i told it to do the quartz block

i have to manully edit it to use

{
  "group": "land_of_the_lost",
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "item": "minecraft:quartz_block"
    }
  ],
  "result": {
    "item": "minecraft:quartz",
    "count": 4
  }
}

which is the correct recipe as there is not tags in vanilla quartz blocks

 

once i tell it to use the ore directory or tag system there is no option too go back to none tags as it seems once i set it to use tags i have to delete the recipe and create a new one to not use tags or ore directory

 

so in order to go back to not using the ore directory or tags i have to delete and recreate the recipe files.....

Corrections it does 

{
  "group": "land_of_the_lost",
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "tag": "forge:ores/quartz"
    }
  ],
  "result": {
    "item": "minecraft:quartz",
    "count": 4
  }
}

 

regardless to if i choose to use ore directory/tag or not

 

so i have to manually edit it to point to 

{
  "group": "land_of_the_lost",
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "item": "minecraft:quartz_block"
    }
  ],
  "result": {
    "item": "minecraft:quartz",
    "count": 4
  }
}

and lock the code

You have selected Blocks.QUARTZ_BLOCK which means any quartz block. Quartz block is missing from the list, we will add it in 2020.2.

still missing in latest snapshot  which is MCreator EAP 2020.2 b12518 Windows 64bit so will wait until full release then will report back if it is still not fixed

but for some strange reason it will work with quartz ore....  so instead of the blocks that you craft it will just give you 4 quartzs from the ore if you place them in the crafting grid

Select Blocks.QUARTZ_BLOCK#0, not Blocks.QUARTZ_BLOCK.

Blocks.QUARTZ_BLOCK is a selector for ANY block which will, in turn, use tags. Use Blocks.QUARTZ_BLOCK#0 to specify a specific type, ordinary quartz block.

Oh, sorry, I meant Blocks.QUARTZ_BLOCK#3 which points no normal quartz. Blocks.QUARTZ_BLOCK#0 points to smooth for legacy reasons as I could not just replace #0 (that would break existing setups and mods), so I added #3 that points to the normal one.

how will i make it point to any of the blocks minus the ore as that is what i was looking to do

Specify each recipe separately, for each type you allow.

The alternative is registering custom recipe factory and defining your recipe format, but this is something you will have to figure out on your own with Java, of course.

I did not have to do that with the different color wool to make string..............

any of the blocks minus the ore as that is what i was looking to do

And how exactly did you exclude just one type of wool, like you want to do now with nether quartz?

i want to be able to make the quartz back to the original form from the block form you made from the 4 quartz to turn it back to its original form

so i used any block like i did with the any wool option but any block for quart points you only to the ore block which  should stay separate from the blocks forms