Guardian 5.46.0
Extends AquaticMonster
Bedrock values (guardian.json): 30 health, 0.85x0.85, swims (movement 0.12), follow range 16, attack 5. Targets players and squids it can see within 16 blocks and fires its laser at them (see GuardianAttackGoal): the beam deals 1 magic damage (+2 on hard, +2 for elder guardians) plus its attack damage. Melee attackers take 2 thorns damage from its spikes while it is not moving. Loot: 0-2 prismarine shards (+0-1 per Looting level); raw cod (2/5) or prismarine crystals (2/5) (+0-1 per Looting level); 2.5% (+1% per Looting level) a fish when killed by a player. Experience 10.
Constants
ATTACK_DAMAGE
public const ATTACK_DAMAGE = 5.0ATTACK_DURATION
public const ATTACK_DURATION = 80FOLLOW_RANGE
public const FOLLOW_RANGE = 16.0Methods
attack()
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : voidfireBeam()
public function fireBeam(\pocketmine\entity\Living $target) : voidFires the charged laser at the target.
getAttackDuration()
public function getAttackDuration() : intTicks the laser takes to charge once warmed up.
getBeamMagicDamage()
public function getBeamMagicDamage() : floatReturns the magic damage part of the laser: 1, +2 on hard, +2 for elder guardians (Java GuardianAttackGoal).
getBeamTarget()
public function getBeamTarget() : ?\pocketmine\entity\LivinggetDrops()
public function getDrops() : arraygetFollowRange()
public function getFollowRange() : floatgetInitialSizeInfo() protected
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
public function getName() : stringgetNetworkTypeId()
public static function getNetworkTypeId() : stringgetPickedItem()
public function getPickedItem() : ?\pocketmine\item\ItemgetSwimSpeed() protected
protected function getSwimSpeed() : floatgetXpDropAmount()
public function getXpDropAmount() : intinitEntity() protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisElder()
public function isElder() : boolonBeamCharging()
public function onBeamCharging() : voidCalled when the laser starts charging (after the warm-up): plays the beam sound on the clients.
registerGoals() protected
protected function registerGoals() : voidsetAttackTarget()
public function setAttackTarget(?\pocketmine\entity\Living $target) : voidsetBeamTarget()
public function setBeamTarget(?\pocketmine\entity\Living $target) : voidLocks the laser on an entity (null: no beam). The client draws the beam to the entity in TARGET_EID.
