mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
SPIGOT-3337: Use special data value to indicate multiple recipe choices
This commit is contained in:
parent
f7d14f184d
commit
732911efbc
@ -79,7 +79,7 @@
|
||||
+ for (RecipeItemStack list : this.items) {
|
||||
+ if (list != null && list.choices.length > 0) {
|
||||
+ net.minecraft.server.ItemStack stack = list.choices[0];
|
||||
+ recipe.setIngredient(c, org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(stack.getItem()), stack.getData());
|
||||
+ recipe.setIngredient(c, org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(stack.getItem()), (list.choices.length) > 1 ? 32767 : stack.getData());
|
||||
+ }
|
||||
+ c++;
|
||||
+ }
|
||||
|
@ -37,7 +37,7 @@
|
||||
+ for (RecipeItemStack list : this.ingredients) {
|
||||
+ if (list != null) {
|
||||
+ net.minecraft.server.ItemStack stack = list.choices[0];
|
||||
+ recipe.addIngredient(org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(stack.getItem()), stack.getData());
|
||||
+ recipe.addIngredient(org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(stack.getItem()), (list.choices.length) > 1 ? 32767 : stack.getData());
|
||||
+ }
|
||||
+ }
|
||||
+ return recipe;
|
||||
|
Loading…
Reference in New Issue
Block a user