mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 22:43:14 +01:00
SPIGOT-7924: Registering a ShapelessRecipe throws an IndexOutOfBoundsException
By: md_5 <git@md-5.net>
This commit is contained in:
parent
1236b98371
commit
0821d18951
1 changed files with 2 additions and 2 deletions
|
@ -41,8 +41,8 @@ public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe
|
|||
public void addToCraftingManager() {
|
||||
List<org.bukkit.inventory.RecipeChoice> ingred = this.getChoiceList();
|
||||
List<RecipeItemStack> data = new ArrayList<>(ingred.size());
|
||||
for (int i = 0; i < ingred.size(); i++) {
|
||||
data.set(i, toNMS(ingred.get(i), true));
|
||||
for (org.bukkit.inventory.RecipeChoice i : ingred) {
|
||||
data.add(toNMS(i, true));
|
||||
}
|
||||
|
||||
MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new ShapelessRecipes(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), CraftItemStack.asNMSCopy(this.getResult()), data)));
|
||||
|
|
Loading…
Reference in a new issue