mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
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:
parent
188a71ad5b
commit
c2bae0bebb
1 changed files with 1 additions and 0 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue