__construct() public method

public __construct ( $id, $meta, integer $count = 1, string $name = "Unknown" )
$count integer
$name string
 /**
  * @param int $id
  * @param int $meta
  * @param int $count
  * @param string $name
  * @param int|float $perAmount
  * @param int $maxStack
  * @param bool $throwable
  */
 public function __construct($id, $meta = 0, $count = 1, $name, $perAmount, $maxStack, $throwable = true)
 {
     parent::__construct($id, $meta, $count, $name);
     $this->perAmount = $perAmount;
     $this->isActivable = $throwable;
     $this->maxStackSize = $maxStack;
 }
Example #2
0
 public function __construct($meta = 0, $count = 1)
 {
     if ($meta == 3) {
         $this->block = Block::get(CropPlus::COCOA_BEANS_BLOCK);
     }
     parent::__construct(Item::DYE, $meta, $count, "Dye");
 }
Example #3
0
 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));
 }
Example #4
0
 public function __construct($meta = 0, $count = 1)
 {
     if ($meta === 3) {
         $this->block = Block::get(Item::COCOA_BLOCK);
         parent::__construct(self::DYE, 3, $count, "Cocoa Beans");
     } else {
         parent::__construct(self::DYE, $meta, $count, $this->getNameByMeta($meta));
     }
 }
Example #5
0
 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";
     }
 }
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::DARK_OAK_DOOR);
     parent::__construct(self::DARK_OAK_DOOR, 0, $count, "Dark Oak Door");
 }
Example #7
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::SPAWN_EGG, $meta, $count, "Spawn Egg");
 }
Example #8
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::POTION, $meta, $count, $this->getNameByMeta($meta));
 }
Example #9
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::DARK_OAK_DOOR, $meta, $count, "Dark Oak Door");
     $this->block = Block::get(Block::DARK_OAK_DOOR_BLOCK, $meta);
 }
Example #10
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::SIGN_POST);
     parent::__construct(self::SIGN, 0, $count, "Sign");
 }
Example #11
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::REDSTONE, $meta, $count, "Redstone");
 }
Example #12
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::MINECART, $meta, $count, "Minecart");
 }
Example #13
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::MELON_STEM);
     parent::__construct(self::MELON_SEEDS, 0, $count, "Melon Seeds");
 }
Example #14
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Block::CAULDRON_BLOCK);
     parent::__construct(self::CAULDRON, $meta, $count, "Cauldron");
 }
Example #15
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::ITEM_FRAME_BLOCK);
     parent::__construct(self::ITEM_FRAME, 0, $count, "Item Frame");
 }
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(MainClass::BLOCK_SKULL);
     $name = isset(self::$names[$meta]) ? self::$names[$meta] : "Mob Head";
     parent::__construct(MainClass::ITEM_SKULL, $meta, $count, $name);
 }
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(MainClass::BLOCK_FLOWER_POT);
     parent::__construct(MainClass::ITEM_FLOWER_POT, 0, $count, "Flower Pot");
 }
Example #18
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::BUCKET, $meta, $count, "Bucket");
 }
Example #19
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::BIRCH_DOOR_BLOCK);
     parent::__construct(self::BIRCH_DOOR, 0, $count, "Birch Door");
 }
Example #20
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Block::SKULL_BLOCK);
     parent::__construct(self::SKULL, $meta, $count, "Skull");
 }
Example #21
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::CAKE_BLOCK);
     parent::__construct(self::CAKE, 0, $count, "Cake");
 }
Example #22
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::BED_BLOCK);
     parent::__construct(self::BED, 0, $count, "Bed");
 }
Example #23
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::WOODEN_DOOR_BLOCK);
     parent::__construct(self::WOODEN_DOOR, 0, $count, "Wooden Door");
 }
Example #24
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Block::UNPOWERED_COMPARATOR);
     parent::__construct(self::REDSTONE_COMPARATOR, $meta, $count, "Redstone Comparator");
 }
Example #25
0
 public function __construct($id, $meta = 0, $count = 1, $name = "Unknown")
 {
     parent::__construct($id, $meta, $count, $name);
 }
Example #26
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::WHEAT_BLOCK);
     parent::__construct(self::WHEAT_SEEDS, 0, $count, "Wheat Seeds");
 }
Example #27
0
 public function __construct($meta = 0, $count = 1)
 {
     parent::__construct(self::PAINTING, 0, $count, "Painting");
 }
Example #28
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::REDSTONE_WIRE);
     parent::__construct(self::REDSTONE, 0, $count, "Redstone");
 }
Example #29
0
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::SPRUCE_DOOR_BLOCK);
     parent::__construct(self::SPRUCE_DOOR, 0, $count, "Spruce Door");
 }
 public function __construct($meta = 0, $count = 1)
 {
     $this->block = Block::get(Item::BREWING_STAND);
     parent::__construct(self::BREWING_STAND_FULL, 0, $count, "Brewing Stand");
 }