PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
|
Static Public Member Functions | |
static | legacyJsonDeserialize (array $data) |
static | nbtDeserialize (CompoundTag $tag) |
Public Attributes | |
const | TAG_BLOCK_ENTITY_TAG = "BlockEntityTag" |
const | TAG_DISPLAY = "display" |
const | TAG_DISPLAY_LORE = "Lore" |
const | TAG_DISPLAY_NAME = "Name" |
const | TAG_ENCH = "ench" |
const | TAG_KEEP_ON_DEATH = "minecraft:keep_on_death" |
Protected Member Functions | |
describeState (RuntimeDataDescriber $w) | |
deserializeCompoundTag (CompoundTag $tag) | |
serializeCompoundTag (CompoundTag $tag) | |
Protected Attributes | |
CompoundTag | $blockEntityTag = null |
array | $canDestroy = [] |
array | $canPlaceOn = [] |
int | $count = 1 |
string | $customName = "" |
bool | $keepOnDeath = false |
array | $lore = [] |
|
finalinherited |
pocketmine\item\Food::canStartUsingItem | ( | Player | $player | ) |
Implements pocketmine\item\Releasable.
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
Describes state properties of the item, such as colour, skull type, etc. This allows associating basic extra data with the item at runtime in a more efficient format than NBT.
Reimplemented in pocketmine\item\Banner, pocketmine\item\CoralFan, pocketmine\item\Dye, pocketmine\item\GoatHorn, pocketmine\item\ItemBlock, pocketmine\item\Medicine, pocketmine\item\Potion, pocketmine\item\SplashPotion, and pocketmine\item\SuspiciousStew.
|
protectedinherited |
NbtException |
Reimplemented in pocketmine\item\Armor, pocketmine\item\Banner, pocketmine\item\Durable, pocketmine\item\WritableBookBase, and pocketmine\item\WrittenBook.
|
finalinherited |
Compares an Item to this Item and check if they match.
bool | $checkDamage |
bool | $checkCompound | Whether to verify that the items' NBT match. |
|
finalinherited |
pocketmine\item\Food::getAdditionalEffects | ( | ) |
Implements pocketmine\entity\Consumable.
Reimplemented in pocketmine\item\GoldenApple, pocketmine\item\GoldenAppleEnchanted, pocketmine\item\PoisonousPotato, pocketmine\item\Pufferfish, pocketmine\item\RawChicken, pocketmine\item\RottenFlesh, pocketmine\item\SpiderEye, and pocketmine\item\SuspiciousStew.
|
inherited |
Returns how many points of damage this item will deal to an entity when used as a weapon.
Reimplemented in pocketmine\item\Axe, pocketmine\item\Pickaxe, pocketmine\item\Shovel, and pocketmine\item\Sword.
|
inherited |
Returns the block corresponding to this Item.
Reimplemented in pocketmine\item\Bamboo, pocketmine\item\BeetrootSeeds, pocketmine\item\Carrot, pocketmine\item\CocoaBeans, pocketmine\item\CoralFan, pocketmine\item\GlowBerries, pocketmine\item\ItemBlock, pocketmine\item\ItemBlockWallOrFloor, pocketmine\item\MelonSeeds, pocketmine\item\PitcherPod, pocketmine\item\Potato, pocketmine\item\PumpkinSeeds, pocketmine\item\Redstone, pocketmine\item\StringItem, pocketmine\item\SweetBerries, pocketmine\item\TorchflowerSeeds, and pocketmine\item\WheatSeeds.
Definition at line 491 of file Item.php.
Referenced by pocketmine\block\Cake\onInteract().
|
inherited |
Returns the harvesting power that this tool has. This affects what blocks it can mine when the tool type matches the mined block. This should return 1 for non-tiered tools, and the tool tier for tiered tools.
Reimplemented in pocketmine\item\Axe, pocketmine\item\Pickaxe, pocketmine\item\Shears, pocketmine\item\Shovel, and pocketmine\item\Sword.
|
inherited |
Returns what type of block-breaking tool this is. Blocks requiring the same tool type as the item will break faster (except for blocks requiring no tool, which break at the same speed regardless of the tool used)
Reimplemented in pocketmine\item\Axe, pocketmine\item\Hoe, pocketmine\item\Pickaxe, pocketmine\item\Shears, pocketmine\item\Shovel, and pocketmine\item\Sword.
|
inherited |
|
inherited |
|
inherited |
Returns a tag that identifies a group of items that should have cooldown at the same time regardless of their state or type. When cooldown starts, any other items with the same cooldown tag can't be used until the cooldown expires. Such behaviour can be seen in goat horns and shields.
If tag is null, item state id will be used to store cooldown.
Reimplemented in pocketmine\item\ChorusFruit, pocketmine\item\EnderPearl, and pocketmine\item\GoatHorn.
Definition at line 667 of file Item.php.
Referenced by pocketmine\player\Player\resetItemCooldown().
|
inherited |
Returns the number of ticks a player must wait before activating this item again.
Reimplemented in pocketmine\item\ChorusFruit, pocketmine\item\EnderPearl, pocketmine\item\GoatHorn, and pocketmine\item\IceBomb.
|
inherited |
Returns how many armor points can be gained by wearing this item.
Reimplemented in pocketmine\item\Armor.
|
inherited |
Returns the value that defines how enchantable the item is.
The higher an item's enchantability is, the more likely it will be to gain high-level enchantments or multiple enchantments upon being enchanted in an enchanting table.
Reimplemented in pocketmine\item\Armor, and pocketmine\item\TieredTool.
|
inherited |
Returns tags that represent the type of item being enchanted and are used to determine what enchantments can be applied to this item during in-game enchanting (enchanting table, anvil, fishing, etc.).
|
inherited |
Returns an item after burning fuel
Reimplemented in pocketmine\item\LiquidBucket.
|
inherited |
Returns the time in ticks which the item will fuel a furnace for.
Reimplemented in pocketmine\item\Bamboo, pocketmine\item\Banner, pocketmine\item\BlazeRod, pocketmine\item\Boat, pocketmine\item\Bow, pocketmine\item\Bowl, pocketmine\item\Coal, pocketmine\item\CoralFan, pocketmine\item\ItemBlock, pocketmine\item\ItemBlockWallOrFloor, pocketmine\item\LiquidBucket, pocketmine\item\Stick, and pocketmine\item\TieredTool.
|
inherited |
|
inherited |
Returns the highest amount of this item which will fit into one inventory slot.
Reimplemented in pocketmine\item\Armor, pocketmine\item\BeetrootSoup, pocketmine\item\Boat, pocketmine\item\Bucket, pocketmine\item\CoralFan, pocketmine\item\Egg, pocketmine\item\EnchantedBook, pocketmine\item\EnderPearl, pocketmine\item\FishingRod, pocketmine\item\GoatHorn, pocketmine\item\HoneyBottle, pocketmine\item\IceBomb, pocketmine\item\ItemBlock, pocketmine\item\ItemBlockWallOrFloor, pocketmine\item\LiquidBucket, pocketmine\item\Medicine, pocketmine\item\MilkBucket, pocketmine\item\Minecart, pocketmine\item\MushroomStew, pocketmine\item\Potion, pocketmine\item\RabbitStew, pocketmine\item\Record, pocketmine\item\Snowball, pocketmine\item\SplashPotion, pocketmine\item\Spyglass, pocketmine\item\SuspiciousStew, pocketmine\item\Tool, pocketmine\item\Totem, pocketmine\item\WritableBookBase, and pocketmine\item\WrittenBook.
|
inherited |
|
finalinherited |
|
inherited |
pocketmine\item\Food::getResidue | ( | ) |
Returns the leftover that this Consumable produces when it is consumed. For Items, this is usually air, but could be an Item to add to a Player's inventory afterwards (such as a bowl).
Implements pocketmine\item\ConsumableItem.
Reimplemented in pocketmine\item\BeetrootSoup, pocketmine\item\HoneyBottle, pocketmine\item\MushroomStew, pocketmine\item\RabbitStew, and pocketmine\item\SuspiciousStew.
|
inherited |
|
inherited |
|
inherited |
Returns whether this item can survive being dropped into lava, or fire.
Reimplemented in pocketmine\item\Armor, pocketmine\item\ItemBlock, and pocketmine\item\TieredTool.
|
inherited |
|
inherited |
|
staticfinalinherited |
|
staticinherited |
|
inherited |
|
inherited |
Called when this item is used to attack an entity. Usually used to update durability.
Item[] | &$returnedItems | Items to be added to the target's inventory (or dropped, if the inventory is full) |
Reimplemented in pocketmine\item\Axe, pocketmine\item\Hoe, pocketmine\item\Pickaxe, pocketmine\item\Shovel, and pocketmine\item\Sword.
|
inherited |
Called when a player uses the item on air, for example throwing a projectile. Returns whether the item was changed, for example count decrease or durability change.
Item[] | &$returnedItems | Items to be added to the target's inventory (or dropped, if the inventory is full) |
Reimplemented in pocketmine\item\Armor, pocketmine\item\GoatHorn, and pocketmine\item\ProjectileItem.
pocketmine\item\Food::onConsume | ( | Living | $consumer | ) |
Called when this Consumable is consumed by mob, after standard resulting effects have been applied.
Implements pocketmine\entity\Consumable.
Reimplemented in pocketmine\item\ChorusFruit, and pocketmine\item\HoneyBottle.
|
inherited |
Called when this item is used to destroy a block. Usually used to update durability.
Item[] | &$returnedItems | Items to be added to the target's inventory (or dropped, if the inventory is full) |
Reimplemented in pocketmine\item\Axe, pocketmine\item\Hoe, pocketmine\item\Pickaxe, pocketmine\item\Shears, pocketmine\item\Shovel, and pocketmine\item\Sword.
|
inherited |
Called when a player uses this item on a block.
Item[] | &$returnedItems | Items to be added to the target's inventory (or dropped, if the inventory is full) |
Reimplemented in pocketmine\item\Bucket, pocketmine\item\EndCrystal, pocketmine\item\FireCharge, pocketmine\item\FlintSteel, pocketmine\item\GlassBottle, pocketmine\item\LiquidBucket, pocketmine\item\PaintingItem, and pocketmine\item\SpawnEgg.
|
inherited |
Called when a player uses the item to interact with entity, for example by using a name tag.
Vector3 | $clickVector | The exact position of the click (absolute coordinates) |
Reimplemented in pocketmine\item\NameTag.
|
inherited |
Called when a player is using this item and releases it. Used to handle bow shoot actions. Returns whether the item was changed, for example count decrease or durability change.
Item[] | &$returnedItems | Items to be added to the target's inventory (or dropped, if the inventory is full) |
Reimplemented in pocketmine\item\Bow.
|
inherited |
Called when this item is being worn by an entity. Returns whether it did something.
Reimplemented in pocketmine\item\TurtleHelmet.
|
inherited |
Pops an item from the stack and returns it, decreasing the stack count of this item stack by one.
InvalidArgumentException if trying to pop more items than are on the stack
Definition at line 430 of file Item.php.
Referenced by pocketmine\block\Bamboo\onInteract(), pocketmine\block\BambooSapling\onInteract(), pocketmine\block\BaseBigDripleaf\onInteract(), pocketmine\block\Cake\onInteract(), pocketmine\block\CocoaBlock\onInteract(), pocketmine\block\Crops\onInteract(), pocketmine\block\DoublePitcherCrop\onInteract(), pocketmine\block\GlowLichen\onInteract(), pocketmine\block\Jukebox\onInteract(), pocketmine\block\Lectern\onInteract(), pocketmine\block\NetherVines\onInteract(), pocketmine\block\PinkPetals\onInteract(), pocketmine\block\PitcherCrop\onInteract(), pocketmine\block\Sapling\onInteract(), pocketmine\block\SmallDripleaf\onInteract(), pocketmine\block\Sugarcane\onInteract(), pocketmine\block\SweetBerryBush\onInteract(), pocketmine\block\TNT\onInteract(), pocketmine\block\TorchflowerCrop\onInteract(), pocketmine\item\EndCrystal\onInteractBlock(), pocketmine\item\FireCharge\onInteractBlock(), pocketmine\item\GlassBottle\onInteractBlock(), and pocketmine\item\NameTag\onInteractEntity().
pocketmine\item\Food::requiresHunger | ( | ) |
Returns whether a Human eating this FoodSource must have a non-full hunger bar. This is ignored in creative mode and in peaceful difficulty.
Implements pocketmine\entity\FoodSource.
Reimplemented in pocketmine\item\ChorusFruit, pocketmine\item\GoldenApple, pocketmine\item\HoneyBottle, and pocketmine\item\SuspiciousStew.
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |