Add Bee#set/getTimeSinceSting() methods (#12792)

This commit is contained in:
Umbre11as
2025-07-18 23:17:06 +03:00
committed by GitHub
parent f7c59f914c
commit 0dad7f150b
3 changed files with 36 additions and 0 deletions
@@ -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
}