summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-06-15 07:23:08 +1000
committermd_5 <git@md-5.net>2017-06-15 07:23:08 +1000
commit732911efbcead46eae3ef1f4aa628e997966db5e (patch)
treefbefe662fb1adfada9e58bec72abf0471a1a5894 /nms-patches
parentf7d14f184d386cb5b0dd604dd1fdcd683fe9e065 (diff)
downloadcraftbukkit-732911efbcead46eae3ef1f4aa628e997966db5e.tar
craftbukkit-732911efbcead46eae3ef1f4aa628e997966db5e.tar.gz
craftbukkit-732911efbcead46eae3ef1f4aa628e997966db5e.tar.lz
craftbukkit-732911efbcead46eae3ef1f4aa628e997966db5e.tar.xz
craftbukkit-732911efbcead46eae3ef1f4aa628e997966db5e.zip
SPIGOT-3337: Use special data value to indicate multiple recipe choices
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/ShapedRecipes.patch2
-rw-r--r--nms-patches/ShapelessRecipes.patch2
2 files changed, 2 insertions, 2 deletions
diff --git a/nms-patches/ShapedRecipes.patch b/nms-patches/ShapedRecipes.patch
index 55e0cb11..e5c8474d 100644
--- a/nms-patches/ShapedRecipes.patch
+++ b/nms-patches/ShapedRecipes.patch
@@ -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++;
+ }
diff --git a/nms-patches/ShapelessRecipes.patch b/nms-patches/ShapelessRecipes.patch
index bb54a3d7..d91e17c7 100644
--- a/nms-patches/ShapelessRecipes.patch
+++ b/nms-patches/ShapelessRecipes.patch
@@ -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;