mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 9fe63a16 Update to 1.14.4 (#2333)
34 lines
1.5 KiB
Diff
34 lines
1.5 KiB
Diff
From 18594b78ebeec10cb1e526a1a7d61fe03688209a Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Fri, 3 May 2019 23:39:38 -0500
|
|
Subject: [PATCH] PlayerFeedAnimalEvent
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/EntityAnimal.java | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityAnimal.java b/src/main/java/net/minecraft/server/EntityAnimal.java
|
|
index 3e627ea08b..7b3d4fbd95 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityAnimal.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityAnimal.java
|
|
@@ -103,6 +103,7 @@ public abstract class EntityAnimal extends EntityAgeable {
|
|
return 1 + this.world.random.nextInt(3);
|
|
}
|
|
|
|
+ public boolean isBreedingItem(ItemStack itemstack) { return i(itemstack); } // Purpur - OBFHELPER
|
|
public boolean i(ItemStack itemstack) {
|
|
return itemstack.getItem() == Items.WHEAT;
|
|
}
|
|
@@ -111,7 +112,7 @@ public abstract class EntityAnimal extends EntityAgeable {
|
|
public boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
|
ItemStack itemstack = entityhuman.b(enumhand);
|
|
|
|
- if (this.i(itemstack)) {
|
|
+ if (this.i(itemstack) && new net.pl3x.purpur.event.PlayerFeedAnimalEvent((org.bukkit.entity.Animals) getBukkitEntity(), (org.bukkit.entity.Player) entityhuman.getBukkitEntity(), itemstack.asBukkitCopy()).callEvent()) { // Purpur
|
|
if (this.getAge() == 0 && this.ea()) {
|
|
this.a(entityhuman, itemstack);
|
|
this.f(entityhuman);
|
|
--
|
|
2.20.1
|
|
|