[SPIGOT-5922] Smithing recipes not registering Created: 02/Jul/20  Updated: 02/Jul/20  Resolved: 02/Jul/20

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Shane Bee Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: recipe, smithing

Attachments: PNG File Screen Shot 2020-07-01 at 5.20.37 PM-1.png     PNG File Screen Shot 2020-07-01 at 5.23.49 PM.png     PNG File Screen Shot 2020-07-01 at 5.23.56 PM.png     File TesterPlugin-1.0.0.jar    
Version: git-Spigot-4d9262c-551e770
Plugin: just my tester plugin
Guidelines Read: Yes

 Description   

I noticed that smithing recipes are not registering.

Example code:

// This one just for verifying recipes are actually working
ShapedRecipe shape_test = new ShapedRecipe(new NamespacedKey(this, "shape_test"), new ItemStack(Material.DIAMOND_HOE));
shape_test.shape("111", "111", "111");
shape_test.setIngredient('1', Material.DIAMOND);
Bukkit.addRecipe(shape_test);

// Testing with ExactChoice ... not registering
SmithingRecipe smith_test = new SmithingRecipe(new NamespacedKey(this, "smith_test"),
        new ItemStack(Material.DIAMOND_CHESTPLATE),
        new RecipeChoice.ExactChoice(new ItemStack(Material.IRON_CHESTPLATE)),
        new RecipeChoice.ExactChoice(new ItemStack(Material.DIAMOND)));
Bukkit.addRecipe(smith_test);

// Testing with MaterialChoice .... not registering
SmithingRecipe smith_test_2 = new SmithingRecipe(new NamespacedKey(this, "smith_test_2"),
        new ItemStack(Material.DIAMOND_LEGGINGS),
        new RecipeChoice.MaterialChoice(Material.IRON_LEGGINGS),
        new RecipeChoice.MaterialChoice(Material.DIAMOND));
Bukkit.addRecipe(smith_test_2);

I did these two tester ones for this issue, and neither of the smithing recipes are registering. I also added a shaped recipe to verify other recipes were registering.
See pictures below, recipes for the two above are not registered.

 

I will include my tester plugin. 
Load plugin. Then using the command:

/recipe give <yourNameHere> testerplugin:

You should see all the registered recipes.



 Comments   
Comment by Shane Bee [ 02/Jul/20 ]

Thank you for the quick fix

Generated at Wed Dec 17 19:55:18 UTC 2025 using Jira 10.3.15#10030015-sha1:909cc43d292ca09e774c1a243d9819be3f2628cd.