PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\item Namespace Reference

Classes

class  Apple
 
class  Armor
 
class  ArmorMaterial
 
class  ArmorTypeInfo
 
class  Arrow
 
class  Axe
 
class  BakedPotato
 
class  Bamboo
 
class  Banner
 
class  Beetroot
 
class  BeetrootSeeds
 
class  BeetrootSoup
 
class  BlazeRod
 
class  Boat
 
class  Book
 
class  Bow
 
class  Bowl
 
class  Bread
 
class  Bucket
 
class  Carrot
 
class  ChorusFruit
 
class  Clock
 
class  Clownfish
 
class  Coal
 
class  CocoaBeans
 
class  Compass
 
interface  ConsumableItem
 
class  CookedChicken
 
class  CookedFish
 
class  CookedMutton
 
class  CookedPorkchop
 
class  CookedRabbit
 
class  CookedSalmon
 
class  Cookie
 
class  CoralFan
 
class  DriedKelp
 
class  Durable
 
class  Dye
 
class  Egg
 
class  EnchantedBook
 
class  EndCrystal
 
class  EnderPearl
 
class  ExperienceBottle
 
class  Fertilizer
 
class  FireCharge
 
class  FishingRod
 
class  FlintSteel
 
class  Food
 
interface  FoodSourceItem
 
class  GlassBottle
 
class  GlowBerries
 
class  GoatHorn
 
class  GoldenApple
 
class  GoldenAppleEnchanted
 
class  GoldenCarrot
 
class  Hoe
 
class  HoneyBottle
 
class  IceBomb
 
class  Item
 
class  ItemBlock
 
class  ItemBlockWallOrFloor
 
class  ItemCooldownTags
 
class  ItemIdentifier
 
class  ItemTypeIds
 
class  LegacyStringToItemParser
 
class  LegacyStringToItemParserException
 
class  LiquidBucket
 
class  Medicine
 
class  Melon
 
class  MelonSeeds
 
class  MilkBucket
 
class  Minecart
 
class  MushroomStew
 
class  NameTag
 
class  PaintingItem
 
class  Pickaxe
 
class  PitcherPod
 
class  PoisonousPotato
 
class  Potato
 
class  Potion
 
class  ProjectileItem
 
class  Pufferfish
 
class  PumpkinPie
 
class  PumpkinSeeds
 
class  RabbitStew
 
class  RawBeef
 
class  RawChicken
 
class  RawFish
 
class  RawMutton
 
class  RawPorkchop
 
class  RawRabbit
 
class  RawSalmon
 
class  Record
 
class  Redstone
 
interface  Releasable
 
class  RottenFlesh
 
class  Shears
 
class  Shovel
 
class  Snowball
 
class  SpawnEgg
 
class  SpiderEye
 
class  SplashPotion
 
class  Spyglass
 
class  Steak
 
class  Stick
 
class  StringItem
 
class  StringToItemParser
 
class  SuspiciousStew
 
class  SweetBerries
 
class  Sword
 
class  TieredTool
 
class  Tool
 
class  TorchflowerSeeds
 
class  Totem
 
class  TurtleHelmet
 
class  VanillaArmorMaterials
 
class  VanillaItems
 
class  WheatSeeds
 
class  WritableBook
 
class  WritableBookBase
 
class  WritableBookPage
 
class  WrittenBook
 

Enumerations

enum  BoatType { getWoodType }
 
enum  GoatHornType { DREAM }
 
enum  ItemUseResult { SUCCESS }
 
enum  MedicineType { getMetadata }
 
enum  PotionType { getMetadata }
 
enum  SuspiciousStewType { getEffects }
 
enum  ToolTier { meta }
 

Functions

 addEnchantment (EnchantmentInstance $enchantment)
 
 getEnchantment (Enchantment $enchantment)
 
 getEnchantmentLevel (Enchantment $enchantment)
 
 getEnchantments ()
 
 hasEnchantment (Enchantment $enchantment, int $level=-1)
 
 hasEnchantments ()
 
 removeEnchantment (Enchantment $enchantment, int $level=-1)
 
 removeEnchantments ()
 

Variables

trait ItemEnchantmentHandlingTrait
 

Detailed Description

All the Item classes

Enumeration Type Documentation

◆ BoatType

TODO: These tags need to be removed once we get rid of LegacyEnumShimTrait (PM6) These are retained for backwards compatibility only.

@method static BoatType ACACIA() @method static BoatType BIRCH() @method static BoatType DARK_OAK() @method static BoatType JUNGLE() @method static BoatType MANGROVE() @method static BoatType OAK() @method static BoatType SPRUCE()

Definition at line 41 of file BoatType.php.

◆ GoatHornType

enum pocketmine::item::GoatHornType

Definition at line 26 of file GoatHornType.php.

◆ ItemUseResult

TODO: These tags need to be removed once we get rid of LegacyEnumShimTrait (PM6) These are retained for backwards compatibility only.

@method static ItemUseResult FAIL() @method static ItemUseResult NONE() @method static ItemUseResult SUCCESS()

Definition at line 36 of file ItemUseResult.php.

◆ MedicineType

TODO: These tags need to be removed once we get rid of LegacyEnumShimTrait (PM6) These are retained for backwards compatibility only.

@method static MedicineType ANTIDOTE() @method static MedicineType ELIXIR() @method static MedicineType EYE_DROPS() @method static MedicineType TONIC()

Enumerator
getMetadata 

@phpstan-return array{0: string, 1: Effect}

@phpstan-return TMetadata

Definition at line 39 of file MedicineType.php.

◆ PotionType

TODO: These tags need to be removed once we get rid of LegacyEnumShimTrait (PM6) These are retained for backwards compatibility only.

@method static PotionType AWKWARD() @method static PotionType FIRE_RESISTANCE() @method static PotionType HARMING() @method static PotionType HEALING() @method static PotionType INVISIBILITY() @method static PotionType LEAPING() @method static PotionType LONG_FIRE_RESISTANCE() @method static PotionType LONG_INVISIBILITY() @method static PotionType LONG_LEAPING() @method static PotionType LONG_MUNDANE() @method static PotionType LONG_NIGHT_VISION() @method static PotionType LONG_POISON() @method static PotionType LONG_REGENERATION() @method static PotionType LONG_SLOWNESS() @method static PotionType LONG_SLOW_FALLING() @method static PotionType LONG_STRENGTH() @method static PotionType LONG_SWIFTNESS() @method static PotionType LONG_TURTLE_MASTER() @method static PotionType LONG_WATER_BREATHING() @method static PotionType LONG_WEAKNESS() @method static PotionType MUNDANE() @method static PotionType NIGHT_VISION() @method static PotionType POISON() @method static PotionType REGENERATION() @method static PotionType SLOWNESS() @method static PotionType SLOW_FALLING() @method static PotionType STRENGTH() @method static PotionType STRONG_HARMING() @method static PotionType STRONG_HEALING() @method static PotionType STRONG_LEAPING() @method static PotionType STRONG_POISON() @method static PotionType STRONG_REGENERATION() @method static PotionType STRONG_SLOWNESS() @method static PotionType STRONG_STRENGTH() @method static PotionType STRONG_SWIFTNESS() @method static PotionType STRONG_TURTLE_MASTER() @method static PotionType SWIFTNESS() @method static PotionType THICK() @method static PotionType TURTLE_MASTER() @method static PotionType WATER() @method static PotionType WATER_BREATHING() @method static PotionType WEAKNESS() @method static PotionType WITHER()

@phpstan-type TMetadata array{0: string, 1: \Closure() : list<EffectInstance>}

Enumerator
getMetadata 

@phpstan-return array{0: string, 1: Effect}

@phpstan-return TMetadata

Definition at line 81 of file PotionType.php.

◆ SuspiciousStewType

TODO: These tags need to be removed once we get rid of LegacyEnumShimTrait (PM6) These are retained for backwards compatibility only.

@method static SuspiciousStewType ALLIUM() @method static SuspiciousStewType AZURE_BLUET() @method static SuspiciousStewType BLUE_ORCHID() @method static SuspiciousStewType CORNFLOWER() @method static SuspiciousStewType DANDELION() @method static SuspiciousStewType LILY_OF_THE_VALLEY() @method static SuspiciousStewType OXEYE_DAISY() @method static SuspiciousStewType POPPY() @method static SuspiciousStewType TULIP() @method static SuspiciousStewType WITHER_ROSE()

Enumerator
getEffects 
Returns
EffectInstance[] @phpstan-return list<EffectInstance>

Definition at line 45 of file SuspiciousStewType.php.

◆ ToolTier

TODO: These tags need to be removed once we get rid of LegacyEnumShimTrait (PM6) These are retained for backwards compatibility only.

@method static ToolTier DIAMOND() @method static ToolTier GOLD() @method static ToolTier IRON() @method static ToolTier NETHERITE() @method static ToolTier STONE() @method static ToolTier WOOD()

@phpstan-type TMetadata array{0: int, 1: int, 2: int, 3: int, 4: int}

Enumerator
meta 

This function exists only to permit the use of named arguments and to make the code easier to read in PhpStorm. @phpstan-return TMetadata

Definition at line 41 of file ToolTier.php.

Function Documentation

◆ addEnchantment()

pocketmine\item\addEnchantment ( EnchantmentInstance $enchantment)
Returns
$this

Definition at line 78 of file ItemEnchantmentHandlingTrait.php.

◆ getEnchantment()

pocketmine\item\getEnchantment ( Enchantment $enchantment)

Definition at line 51 of file ItemEnchantmentHandlingTrait.php.

◆ getEnchantmentLevel()

pocketmine\item\getEnchantmentLevel ( Enchantment $enchantment)

Returns the level of the enchantment on this item with the specified ID, or 0 if the item does not have the enchantment.

Definition at line 95 of file ItemEnchantmentHandlingTrait.php.

◆ getEnchantments()

pocketmine\item\getEnchantments ( )
Returns
EnchantmentInstance[] @phpstan-return array<int, EnchantmentInstance>

Definition at line 87 of file ItemEnchantmentHandlingTrait.php.

Referenced by pocketmine\item\Armor\getEnchantmentProtectionFactor().

+ Here is the caller graph for this function:

◆ hasEnchantment()

pocketmine\item\hasEnchantment ( Enchantment $enchantment,
int $level = -1 )

Definition at line 46 of file ItemEnchantmentHandlingTrait.php.

◆ hasEnchantments()

pocketmine\item\hasEnchantments ( )

Definition at line 42 of file ItemEnchantmentHandlingTrait.php.

◆ removeEnchantment()

pocketmine\item\removeEnchantment ( Enchantment $enchantment,
int $level = -1 )
Returns
$this

Definition at line 58 of file ItemEnchantmentHandlingTrait.php.

◆ removeEnchantments()

pocketmine\item\removeEnchantments ( )
Returns
$this

Definition at line 70 of file ItemEnchantmentHandlingTrait.php.

Variable Documentation

◆ ItemEnchantmentHandlingTrait

trait pocketmine::item\ItemEnchantmentHandlingTrait
Initial value:
{
protected array $enchantments = []

This trait encapsulates all enchantment handling needed for itemstacks. The primary purpose of this trait is providing scope isolation for the methods it contains.

Definition at line 35 of file ItemEnchantmentHandlingTrait.php.