mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Expose Animals#isBreedingItem(ItemStack)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
From da7bd1e9e1fec941548c8ee4694263d5db60384a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 3 May 2019 23:45:45 -0500
|
||||
Subject: [PATCH] Expose Animals#isBreedingItem(ItemStack)
|
||||
|
||||
---
|
||||
.../java/org/bukkit/craftbukkit/entity/CraftAnimals.java | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java
|
||||
index 2478b934..5431d65a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java
|
||||
@@ -30,4 +30,11 @@ public class CraftAnimals extends CraftAgeable implements Animals {
|
||||
public void setBreedCause(UUID uuid) {
|
||||
getHandle().breedCause = uuid;
|
||||
}
|
||||
+
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public boolean isBreedingItem(org.bukkit.inventory.ItemStack itemstack) {
|
||||
+ return getHandle().isBreedingItem(net.minecraft.server.ItemStack.fromBukkitCopy(itemstack == null ? new org.bukkit.inventory.ItemStack(org.bukkit.Material.AIR) : itemstack));
|
||||
+ }
|
||||
+ // Purpur end
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
||||
Reference in New Issue
Block a user