BucketableMobTrait 5.46.0
Picking up a BucketableMob with a water bucket (vanilla: fish, axolotls and tadpoles are caught with a water bucket, not an empty one). For Mobs.
Methods
applyBucketData()
php
public function applyBucketData(\pocketmine\nbt\tag\CompoundTag $tag) : voidcreateBucket()
php
public function createBucket() : \pocketmine\item\ItemgetBucketItem() protected
php
abstract protected function getBucketItem() : \pocketmine\item\ItemItem of the filled bucket, without data.
tryPickUpWithBucket() protected
php
protected function tryPickUpWithBucket(\pocketmine\player\Player $player, \pocketmine\item\Item $item) : boolPuts the mob in the player's water bucket. Returns false if the player isn't holding a plain water bucket.
writeBucketData() protected
php
protected function writeBucketData(\pocketmine\nbt\tag\CompoundTag $tag) : voidWrites the data kept in the bucket (variant, age...).
