SPIGOT-1674: Enable crafting of tipped arrows.

This commit is contained in:
md_5 2016-03-03 16:35:51 +11:00
parent ed8cef0edb
commit 92439bb231
2 changed files with 9 additions and 14 deletions

View File

@ -17,15 +17,6 @@
public static CraftingManager getInstance() {
return CraftingManager.a;
@@ -32,7 +38,7 @@
this.recipes.add(new RecipeMapExtend());
this.recipes.add(new RecipeFireworks());
this.recipes.add(new RecipeRepair());
- this.recipes.add(new RecipeTippedArrow());
+ // this.recipes.add(new RecipeTippedArrow());
(new RecipesBanner()).a(this);
(new RecipiesShield()).a(this);
this.registerShapedRecipe(new ItemStack(Items.PAPER, 3), new Object[] { "###", Character.valueOf('#'), Items.REEDS});
@@ -176,7 +182,12 @@
this.registerShapedRecipe(new ItemStack(Blocks.HOPPER), new Object[] { "I I", "ICI", " I ", Character.valueOf('I'), Items.IRON_INGOT, Character.valueOf('C'), Blocks.CHEST});
this.registerShapedRecipe(new ItemStack(Items.ARMOR_STAND, 1), new Object[] { "///", " / ", "/_/", Character.valueOf('/'), Items.STICK, Character.valueOf('_'), new ItemStack(Blocks.STONE_SLAB, 1, BlockDoubleStepAbstract.EnumStoneSlabVariant.STONE.a())});

View File

@ -1,18 +1,22 @@
--- a/net/minecraft/server/RecipeTippedArrow.java
+++ b/net/minecraft/server/RecipeTippedArrow.java
@@ -2,11 +2,15 @@
@@ -2,11 +2,19 @@
import java.util.Collection;
-class RecipeTippedArrow implements IRecipe {
+class RecipeTippedArrow extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
+class RecipeTippedArrow extends ShapedRecipes implements IRecipe { // CraftBukkit
private static final ItemStack[] a = new ItemStack[9];
- RecipeTippedArrow() {}
+ // CraftBukkit start - Delegate to new parent class with bogus info
+ public RecipeTippedArrow() {
+ super(new ItemStack(Items.TIPPED_ARROW, 0, -1), java.util.Arrays.asList(new ItemStack(Items.ARROW, 8, 0), new ItemStack(Items.LINGERING_POTION, 0, 0)));
+ // CraftBukkit start
+ RecipeTippedArrow() {
+ super(3, 3, new ItemStack[]{
+ new ItemStack(Items.ARROW, 0), new ItemStack(Items.ARROW, 0), new ItemStack(Items.ARROW, 0),
+ new ItemStack(Items.ARROW, 0), new ItemStack(Items.LINGERING_POTION, 0), new ItemStack(Items.ARROW, 0),
+ new ItemStack(Items.ARROW, 0), new ItemStack(Items.ARROW, 0), new ItemStack(Items.ARROW, 0)
+ }, new ItemStack(Items.TIPPED_ARROW, 8));
+ }
+ // CraftBukkit end