Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 13:00:06 +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.
Dieser Commit ist enthalten in:
Ursprung
188a71ad5b
Commit
c2bae0bebb
@ -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() {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren