Skip to content

DropGiftForOwnerGoal 5.46.0 ​

class · pocketmine\entity\ai\goal\DropGiftForOwnerGoal · source

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 = 200

MAX_TIME ​

php
public const MAX_TIME = 1200

MIN_TIME ​

php
public const MIN_TIME = 0

Time of day window (ticks): Bedrock time_of_day 0.74999-0.8.

RANGE ​

php
public const RANGE = 5.0

target_range

Properties ​

$cat ​

php
public \pocketmine\entity\animal\Cat $cat

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\animal\Cat $cat)

canContinue() ​

php
public function canContinue() : bool

canStart() ​

php
public function canStart() : bool

getFlags() ​

php
public function getFlags() : int

isGiftTime() ​

php
public static function isGiftTime(\pocketmine\world\World $world) : bool

start() ​

php
public function start() : void

stop() ​

php
public function stop() : void

tick() ​

php
public function tick() : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.