Skip to content

Ravager 5.46.0 ​

class · pocketmine\entity\monster\Ravager · source

Extends Monster
Implements Raider

Bedrock values (ravager.json): 100 health, movement 0.4, 1.95x2.2, attack 12 (reach x1.5), knockback resistance 0.75. When its attack is blocked by a shield it is stunned for 2 seconds, then roars: entities within 4 blocks are knocked back and non-illagers take 6 damage (behavior.knockback_roar). Loot: a saddle when killed by a player. Experience 20. One pillager, vindicator or evoker can ride it (raids put riders on some ravagers). It breaks the leaves, crops and small plants it walks into (minecraft:break_blocks, see Ravager::canBreak()), with drops. There is no mobGriefing game rule yet, so this always happens.

Constants ​

ATTACK_DAMAGE ​

php
public const ATTACK_DAMAGE = 12.0

ROAR_ATTACK_TICK ​

php
public const ROAR_ATTACK_TICK = 10

ROAR_DAMAGE ​

php
public const ROAR_DAMAGE = 6.0

ROAR_RANGE ​

php
public const ROAR_RANGE = 4.0

ROAR_TICKS ​

php
public const ROAR_TICKS = 20

STUN_TICKS ​

php
public const STUN_TICKS = 40

Methods ​

attackMelee() ​

php
public function attackMelee(\pocketmine\entity\Living $target, float $baseDamage) : bool

breakBlocksInTheWay() ​

php
public function breakBlocksInTheWay() : int

Breaks the breakable blocks touching the ravager (its box grown by 0.2 blocks sideways, like Java's ravager): leaves it bumps into and the plants it walks through.

canBeRiddenBy() ​

php
public function canBeRiddenBy(\pocketmine\entity\Entity $entity) : bool

canBreak() ​

php
public static function canBreak(\pocketmine\block\Block $block) : bool

Whether the ravager breaks this block when it walks into it (Bedrock ravager.json minecraft:break_blocks list).

entityBaseTick() protected ​

php
protected function entityBaseTick(int $tickDiff = 1) : bool

getDrops() ​

php
public function getDrops() : array

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPickedItem() ​

php
public function getPickedItem() : ?\pocketmine\item\Item

getRideableSeats() ​

php
public function getRideableSeats() : array

getXpDropAmount() ​

php
public function getXpDropAmount() : int

initEntity() protected ​

php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : void

isRaidVictim() ​

php
public function isRaidVictim(\pocketmine\entity\Living $entity) : bool

isRoaring() ​

php
public function isRoaring() : bool

isStunned() ​

php
public function isStunned() : bool

registerGoals() protected ​

php
protected function registerGoals() : void

roar() ​

php
public function roar() : void

Knocks back every entity within 4 blocks (except ravagers) and hurts the non-illagers.

saveNBT() ​

php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag

stun() ​

php
public function stun() : void

Stuns the ravager (its attack was blocked by a shield): it stands still for 2 seconds, then roars.

syncNetworkData() protected ​

php
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void

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