當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Item::__construct方法代碼示例

本文整理匯總了PHP中BukkitPE\item\Item::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Item::__construct方法的具體用法?PHP Item::__construct怎麽用?PHP Item::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BukkitPE\item\Item的用法示例。


在下文中一共展示了Item::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct($meta = 0, $count = 1)
 {
     if ($meta === self::COCOA_BEANS) {
         $this->block = Block::get(Item::COCOA_POD);
         $this->meta = 1;
     }
     parent::__construct(self::DYE, $meta, $count, $this->getNameByMeta($meta));
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:8,代碼來源:Dye.php

示例2: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::BOAT, $meta, $count, "Oak Boat");
     if ($this->meta === 1) {
         $this->name = "Spruce Boat";
     } elseif ($this->meta === 2) {
         $this->name = "Birch Boat";
     } elseif ($this->meta === 3) {
         $this->name = "Jungle Boat";
     } elseif ($this->meta === 4) {
         $this->name = "Acacia Boat";
     } elseif ($this->meta === 5) {
         $this->name = "Dark Oak Boat";
     }
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:15,代碼來源:Boat.php

示例3: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::PAINTING, 0, $count, "Painting");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:4,代碼來源:Painting.php

示例4: __construct

 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::TRIPWIRE);
     parent::__construct(self::STRING, $meta, $count, "String");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:5,代碼來源:StringItem.php

示例5: __construct

 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::REDSTONE_WIRE);
     parent::__construct(self::REDSTONE, 0, $count, "Redstone");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:5,代碼來源:Redstone.php

示例6: __construct

 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::PUMPKIN_STEM);
     parent::__construct(self::PUMPKIN_SEEDS, 0, $count, "Pumpkin Seeds");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:5,代碼來源:PumpkinSeeds.php

示例7: __construct

 public function __construct($id, $meta = 0, $count = 1, $name = "Unknown")
 {
     parent::__construct($id, $meta, $count, $name);
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:4,代碼來源:Tool.php

示例8: __construct

 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Block::SKULL_BLOCK);
     parent::__construct(self::SKULL, $meta, $count, "Skull");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:5,代碼來源:Skull.php

示例9: __construct

 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::DARK_OAK_DOOR_BLOCK);
     parent::__construct(self::DARK_OAK_DOOR, 0, $count, "Dark Oak Door");
 }
開發者ID:gitter-badger,項目名稱:BukkitPE,代碼行數:5,代碼來源:DarkOakDoor.php

示例10: __construct

 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::BEETROOT_BLOCK);
     parent::__construct(self::BEETROOT_SEEDS, 0, $count, "Beetroot Seeds");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:5,代碼來源:BeetrootSeeds.php

示例11: __construct

 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::WOODEN_DOOR_BLOCK);
     parent::__construct(self::WOODEN_DOOR, 0, $count, "Wooden Door");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:5,代碼來源:WoodenDoor.php

示例12: __construct

 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::ACACIA_DOOR_BLOCK);
     parent::__construct(self::ACACIA_DOOR, 0, $count, "Acacia Door");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:5,代碼來源:AcaciaDoor.php

示例13: __construct

 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::SIGN_POST);
     parent::__construct(self::SIGN, 0, $count, "Sign");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:5,代碼來源:Sign.php

示例14: __construct

 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::MELON_STEM);
     parent::__construct(self::MELON_SEEDS, 0, $count, "Melon Seeds");
 }
開發者ID:MunkySkunk,項目名稱:BukkitPE,代碼行數:5,代碼來源:MelonSeeds.php

示例15: __construct

 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::SPAWN_EGG, $meta, $count, "Spawn Egg");
 }
開發者ID:gitter-badger,項目名稱:BukkitPE,代碼行數:4,代碼來源:SpawnEgg.php


注:本文中的BukkitPE\item\Item::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。