Skip to content

SitOnBlockGoal 5.46.0 ​

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

Extends Goal

Tamed cats like to sit on chests, lit furnaces and the foot of beds (vanilla behavior.ocelot_sit_on_block, Java CatSitOnBlockGoal): every 10-20 seconds a cat which isn't ordered to sit looks for one within 8 blocks (1 up or down) with nothing on top, walks there, hops on and sits for up to a minute. Players can't open a chest a cat sits on.

Constants ​

MAX_TICKS ​

php
public const MAX_TICKS = 1200

Longest time the goal runs (walking there and sitting).

SEARCH_HEIGHT ​

php
public const SEARCH_HEIGHT = 1

SEARCH_RANGE ​

php
public const SEARCH_RANGE = 8

SPEED ​

php
public const SPEED = 1.0

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

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.