DropGiftForOwnerGoal 5.46.0
Extends Goal
Morning gift of a cat which slept with its owner (vanilla behavior.drop_item_for of cat.json): between sunrise and one minute later (time_of_day 0.75-0.8, ticks 0-1200), with the owner within 5 blocks, the cat walks up to them and makes one drop attempt: 70% of the time it drops an item of the cat_gift loot table. Either way it is done until it sleeps with its owner again.
Constants
GIVE_UP_TICKS
php
public const GIVE_UP_TICKS = 200MAX_TIME
php
public const MAX_TIME = 1200MIN_TIME
php
public const MIN_TIME = 0Time of day window (ticks): Bedrock time_of_day 0.74999-0.8.
RANGE
php
public const RANGE = 5.0target_range
Properties
$cat
php
public \pocketmine\entity\animal\Cat $catMethods
__construct()
php
public function __construct(\pocketmine\entity\animal\Cat $cat)canContinue()
php
public function canContinue() : boolcanStart()
php
public function canStart() : boolgetFlags()
php
public function getFlags() : intisGiftTime()
php
public static function isGiftTime(\pocketmine\world\World $world) : boolstart()
php
public function start() : voidstop()
php
public function stop() : voidtick()
php
public function tick() : void