Add crafting result slot for sheep breeding. Fixes BUKKIT-2926

Sheep now use the crafting system when breeding to determine what color
their baby should be. This triggers an event but the event wants the
crafting inventory to have a result slot which sheep do not have. This
event could be useful for plugins to control the output of sheep breeding
so instead of disabling it we add a result slot so the event fires without
issue.
This commit is contained in:
Travis Watkins 2012-11-14 13:27:45 -06:00
parent 188a71ad5b
commit c2bae0bebb

View file

@ -32,6 +32,7 @@ public class EntitySheep extends EntityAnimal {
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
this.e.setItem(0, new ItemStack(Item.INK_SACK, 1, 0)); this.e.setItem(0, new ItemStack(Item.INK_SACK, 1, 0));
this.e.setItem(1, new ItemStack(Item.INK_SACK, 1, 0)); this.e.setItem(1, new ItemStack(Item.INK_SACK, 1, 0));
this.e.resultInventory = new InventoryCraftResult(); // CraftBukkit - add result slot for event
} }
protected boolean be() { protected boolean be() {