mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 11:22:01 +01:00
#622: Add methods to check if item is the breed item for an entity
By: Nathat23 <nathat890@outlook.com>
This commit is contained in:
parent
f798154234
commit
e1c30137fb
@ -1,6 +1,9 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import java.util.UUID;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
@ -50,4 +53,24 @@ public interface Animals extends Breedable {
|
||||
* @param ticks the love mode ticks. Must be positive
|
||||
*/
|
||||
void setLoveModeTicks(int ticks);
|
||||
|
||||
/**
|
||||
* Check if the provided ItemStack is the correct item used for breeding
|
||||
* this entity.
|
||||
*
|
||||
* @param stack ItemStack to check.
|
||||
* @return if the provided ItemStack is the correct food item for this
|
||||
* entity.
|
||||
*/
|
||||
boolean isBreedItem(@NotNull ItemStack stack);
|
||||
|
||||
/**
|
||||
* Check if the provided ItemStack is the correct item used for breeding
|
||||
* this entity..
|
||||
*
|
||||
* @param material Material to check.
|
||||
* @return if the provided ItemStack is the correct food item for this
|
||||
* entity.
|
||||
*/
|
||||
boolean isBreedItem(@NotNull Material material);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user