From c2bae0bebb6e036514653514e558abfe2f4bba76 Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Wed, 14 Nov 2012 13:27:45 -0600 Subject: [PATCH] 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. --- src/main/java/net/minecraft/server/EntitySheep.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java index 1d8a94bb28..5ad86c0db1 100644 --- a/src/main/java/net/minecraft/server/EntitySheep.java +++ b/src/main/java/net/minecraft/server/EntitySheep.java @@ -32,6 +32,7 @@ public class EntitySheep extends EntityAnimal { this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); this.e.setItem(0, 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() {