Add Bee#set/getTimeSinceSting() methods (#12792)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.checkerframework.checker.index.qual.NonNegative;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
@@ -144,5 +145,28 @@ public interface Bee extends Animals {
|
||||
* @return number of ticks
|
||||
*/
|
||||
int getTicksSincePollination();
|
||||
|
||||
/**
|
||||
* Sets how many ticks have passed since this bee last stung.
|
||||
* This value is used to determine when the bee should die after stinging.
|
||||
* <p>
|
||||
* Note that bees don’t die at a fixed time. Instead, every few ticks, they
|
||||
* have a random chance of dying, and that chance increases with this value.
|
||||
*
|
||||
* @param time number of ticks since last sting
|
||||
*/
|
||||
void setTimeSinceSting(@NonNegative int time);
|
||||
|
||||
/**
|
||||
* Gets how many ticks have passed since this bee last stung.
|
||||
* This value increases each tick after the bee stings and is used
|
||||
* to determine when the bee should die.
|
||||
* <p>
|
||||
* Note that bees don’t die at a fixed time. Instead, every few ticks, they
|
||||
* have a random chance of dying, and that chance increases with this value.
|
||||
*
|
||||
* @return number of ticks since last sting
|
||||
*/
|
||||
int getTimeSinceSting();
|
||||
// Paper end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user