BreakDoorGoal 5.47.0
Extends Goal
Breaks a closed wooden door on the mob's path (vanilla minecraft:annotation.break_door with navigation can_break_doors; Java BreakDoorGoal): when the mob bumps into a wall and a closed door other than an iron door is in the next nodes of its path within 1.5 blocks (or in its own block), it hits the door (door bump sound and an arm swing 1 tick in 20) while the block cracks, and after the break time the door is gone, with the door crash sound and its break particles, and drops nothing. It gives up when the door opens, the mob gets 2 blocks away from it or the difficulty falls below the minimum. Needs the mobGriefing game rule.
The mob's paths must go through closed doors for it to walk into them (see \pocketmine\entity\ai\navigation\PathFinder::setCanBreakDoors()). The goal holds no control flag: the mob keeps chasing its target into the door while it breaks it.
Constants
DEFAULT_BREAK_TICKS
public const DEFAULT_BREAK_TICKS = 240Vanilla annotation.break_door break_time (12 seconds) and min_difficulty (hard) defaults
DEFAULT_MIN_DIFFICULTY
public const DEFAULT_MIN_DIFFICULTY = \pocketmine\world\World::DIFFICULTY_HARDMethods
__construct()
public function __construct(\pocketmine\entity\Mob $mob, int $breakTime = self::DEFAULT_BREAK_TICKS, int $minDifficulty = self::DEFAULT_MIN_DIFFICULTY, ?\Closure $condition = null)canContinue()
public function canContinue() : boolcanStart()
public function canStart() : boolgetBreakTicks()
public function getBreakTicks() : intgetBreakTime()
public function getBreakTime() : intgetDoor()
public function getDoor() : ?\pocketmine\math\Vector3Returns the lower half of the door being broken, or null.
start()
public function start() : voidstop()
public function stop() : voidtick()
public function tick() : void