Ravager 5.46.0
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
public const ATTACK_DAMAGE = 12.0ROAR_ATTACK_TICK
public const ROAR_ATTACK_TICK = 10ROAR_DAMAGE
public const ROAR_DAMAGE = 6.0ROAR_RANGE
public const ROAR_RANGE = 4.0ROAR_TICKS
public const ROAR_TICKS = 20STUN_TICKS
public const STUN_TICKS = 40Methods
attackMelee()
public function attackMelee(\pocketmine\entity\Living $target, float $baseDamage) : boolbreakBlocksInTheWay()
public function breakBlocksInTheWay() : intBreaks 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()
public function canBeRiddenBy(\pocketmine\entity\Entity $entity) : boolcanBreak()
public static function canBreak(\pocketmine\block\Block $block) : boolWhether the ravager breaks this block when it walks into it (Bedrock ravager.json minecraft:break_blocks list).
entityBaseTick() protected
protected function entityBaseTick(int $tickDiff = 1) : boolgetDrops()
public function getDrops() : arraygetInitialSizeInfo() protected
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
public function getName() : stringgetNetworkTypeId()
public static function getNetworkTypeId() : stringgetPickedItem()
public function getPickedItem() : ?\pocketmine\item\ItemgetRideableSeats()
public function getRideableSeats() : arraygetXpDropAmount()
public function getXpDropAmount() : intinitEntity() protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisRaidVictim()
public function isRaidVictim(\pocketmine\entity\Living $entity) : boolisRoaring()
public function isRoaring() : boolisStunned()
public function isStunned() : boolregisterGoals() protected
protected function registerGoals() : voidroar()
public function roar() : voidKnocks back every entity within 4 blocks (except ravagers) and hurts the non-illagers.
saveNBT()
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagstun()
public function stun() : voidStuns the ravager (its attack was blocked by a shield): it stands still for 2 seconds, then roars.
syncNetworkData() protected
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : void