mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
Update to 1.14
This commit is contained in:
committed by
BillyGalbreath
parent
a4bfd94c63
commit
b8fed8aaf2
@@ -1,4 +1,4 @@
|
||||
From efc21635e384f64394f2b9c50b73bd235f200f1c Mon Sep 17 00:00:00 2001
|
||||
From 50e421da6a6620d15e29fb476577b0ff445b0c65 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
|
||||
@@ -8,24 +8,24 @@ Subject: [PATCH] PlayerFeedAnimalEvent
|
||||
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 31ca1f80..26c43ac6 100644
|
||||
index dbce8a866..8a4594654 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityAnimal.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityAnimal.java
|
||||
@@ -99,6 +99,7 @@ public abstract class EntityAnimal extends EntityAgeable implements IAnimal {
|
||||
@@ -110,6 +110,7 @@ public abstract class EntityAnimal extends EntityAgeable {
|
||||
return 1 + this.world.random.nextInt(3);
|
||||
}
|
||||
|
||||
+ public boolean isBreedingItem(ItemStack itemstack) { return f(itemstack); } // Purpur - OBFHELPER
|
||||
public boolean f(ItemStack itemstack) {
|
||||
+ public boolean isBreedingItem(ItemStack itemstack) { return i(itemstack); } // Purpur - OBFHELPER
|
||||
public boolean i(ItemStack itemstack) {
|
||||
return itemstack.getItem() == Items.WHEAT;
|
||||
}
|
||||
@@ -106,7 +107,7 @@ public abstract class EntityAnimal extends EntityAgeable implements IAnimal {
|
||||
@@ -118,7 +119,7 @@ public abstract class EntityAnimal extends EntityAgeable {
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
|
||||
- if (this.f(itemstack)) {
|
||||
- if (this.i(itemstack)) {
|
||||
+ if (this.isBreedingItem(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.dD()) {
|
||||
if (this.getAge() == 0 && this.ea()) {
|
||||
this.a(entityhuman, itemstack);
|
||||
this.f(entityhuman);
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user