public function __construct() { parent::__construct(self::COBWEB, 0, "Cobweb"); $this->isSolid = true; $this->isFullBlock = false; $this->hardness = 25; }
public function __construct($meta = 1) { parent::__construct(self::TALL_GRASS, $meta, "Tall Grass"); $this->isReplaceable = true; $names = [0 => "Dead Shrub", 1 => "Tall Grass", 2 => "Fern"]; $this->name = $names[$this->meta & 0x3]; $this->hardness = 0; }
public function __construct($meta = 0) { parent::__construct(self::SNOW_LAYER, $meta, "Snow Layer"); $this->isReplaceable = true; $this->isSolid = false; $this->isFullBlock = false; $this->hardness = 0.5; }
public function __construct($meta = 0) { parent::__construct(self::FIRE, $meta, "Fire"); $this->isReplaceable = true; $this->breakable = false; $this->isFullBlock = true; $this->hardness = 0; }
public function __construct($meta = Sapling::OAK) { parent::__construct(self::SAPLING, $meta, "Sapling"); $this->isActivable = true; $names = [0 => "Oak Sapling", 1 => "Spruce Sapling", 2 => "Birch Sapling", 3 => "Jungle Sapling", 4 => "Acacia Sapling", 5 => "Dark Oak Sapling"]; $this->name = $names[$this->meta & 0x7]; $this->hardness = 0; }
public function __construct($meta = 0) { parent::__construct(self::CARPET, $meta, "Carpet"); $names = [0 => "White Carpet", 1 => "Orange Carpet", 2 => "Magenta Carpet", 3 => "Light Blue Carpet", 4 => "Yellow Carpet", 5 => "Lime Carpet", 6 => "Pink Carpet", 7 => "Gray Carpet", 8 => "Light Gray Carpet", 9 => "Cyan Carpet", 10 => "Purple Carpet", 11 => "Blue Carpet", 12 => "Brown Carpet", 13 => "Green Carpet", 14 => "Red Carpet", 15 => "Black Carpet"]; $this->name = $names[$this->meta]; $this->hardness = 0; $this->isFullBlock = false; $this->isSolid = true; }
public function setPowerLevel($power) { parent::setPowerLevel($power); $this->meta = $power; if ($power > 0) { $this->setPowerSource(true); } else { $this->setPowerSource(false); } }
public function onBreak(Item $item) { parent::onBreak($item); $sound = new EndermanTeleportSound($this); $this->getLevel()->addSound($sound); $particle = new PortalParticle($this); $this->getLevel()->addParticle($particle); $block = $this; $this->getLevel()->setBlock($block, new Block(90, 0)); //在破坏处放置一个方块防止计算出错 if ($this->getLevel()->getBlock($block->add(-1, 0, 0))->getId() == 90 or $this->getLevel()->getBlock($block->add(1, 0, 0))->getId() == 90) { //x方向 for ($x = $block->getX(); $this->getLevel()->getBlock(new Vector3($x, $block->getY(), $block->getZ()))->getId() == 90; $x++) { for ($y = $block->getY(); $this->getLevel()->getBlock(new Vector3($x, $y, $block->getZ()))->getId() == 90; $y++) { $this->getLevel()->setBlock(new Vector3($x, $y, $block->getZ()), new Block(0, 0)); } for ($y = $block->getY() - 1; $this->getLevel()->getBlock(new Vector3($x, $y, $block->getZ()))->getId() == 90; $y--) { $this->getLevel()->setBlock(new Vector3($x, $y, $block->getZ()), new Block(0, 0)); } } for ($x = $block->getX() - 1; $this->getLevel()->getBlock(new Vector3($x, $block->getY(), $block->getZ()))->getId() == 90; $x--) { for ($y = $block->getY(); $this->getLevel()->getBlock(new Vector3($x, $y, $block->getZ()))->getId() == 90; $y++) { $this->getLevel()->setBlock(new Vector3($x, $y, $block->getZ()), new Block(0, 0)); } for ($y = $block->getY() - 1; $this->getLevel()->getBlock(new Vector3($x, $y, $block->getZ()))->getId() == 90; $y--) { $this->getLevel()->setBlock(new Vector3($x, $y, $block->getZ()), new Block(0, 0)); } } } else { //z方向 for ($z = $block->getZ(); $this->getLevel()->getBlock(new Vector3($block->getX(), $block->getY(), $z))->getId() == 90; $z++) { for ($y = $block->getY(); $this->getLevel()->getBlock(new Vector3($block->getX(), $y, $z))->getId() == 90; $y++) { $this->getLevel()->setBlock(new Vector3($block->getX(), $y, $z), new Block(0, 0)); } for ($y = $block->getY() - 1; $this->getLevel()->getBlock(new Vector3($block->getX(), $y, $z))->getId() == 90; $y--) { $this->getLevel()->setBlock(new Vector3($block->getX(), $y, $z), new Block(0, 0)); } } for ($z = $block->getZ() - 1; $this->getLevel()->getBlock(new Vector3($block->getX(), $block->getY(), $z))->getId() == 90; $z--) { for ($y = $block->getY(); $this->getLevel()->getBlock(new Vector3($block->getX(), $y, $z))->getId() == 90; $y++) { $this->getLevel()->setBlock(new Vector3($block->getX(), $y, $z), new Block(0, 0)); } for ($y = $block->getY() - 1; $this->getLevel()->getBlock(new Vector3($block->getX(), $y, $z))->getId() == 90; $y--) { $this->getLevel()->setBlock(new Vector3($block->getX(), $y, $z), new Block(0, 0)); } } } }
public function __construct($meta = 0) { parent::__construct(self::BEETROOT_BLOCK, $meta, "Beetroot Block"); $this->isActivable = true; $this->hardness = 0; }
public function __construct($meta = 0) { parent::__construct(self::SUGARCANE_BLOCK, $meta, "Sugarcane"); $this->hardness = 0; }
public function __construct($face = 0) { parent::__construct(127, $this->getBeanFace($face), "Cocoa Bean"); $this->treeFace = $this->getTreeFace(); }
public function __construct() { parent::__construct(self::POPPY, 0, "Cyan Flower"); $this->hardness = 0; }
public function __construct() { parent::__construct(self::RED_MUSHROOM, 0, "Red Mushroom"); $this->hardness = 0; }
public function __construct($meta = 0) { parent::__construct(self::WHEAT_BLOCK, $meta, "Wheat Block"); $this->isActivable = true; $this->hardness = 0; }
public function __construct($meta = 0) { parent::__construct(self::MELON_STEM, $meta, "Melon Stem"); $this->isActivable = true; $this->hardness = 0; }
public function __construct($meta = 0) { parent::__construct(self::CARROT_BLOCK, $meta, "Carrot Block"); $this->isActivable = true; $this->hardness = 0; }
public function __construct($meta = 0) { parent::__construct(127, $meta, "Cocoa Bean"); $this->hardness = 0.5; }
public function __construct($meta = 0) { parent::__construct(self::POTATO_BLOCK, $meta, "Potato Block"); $this->isActivable = true; $this->hardness = 0; }
public function __construct($meta = 0) { parent::__construct(self::PUMPKIN_STEM, $meta, "Pumpkin Stem"); $this->isActivable = true; $this->hardness = 0; }
public function __construct($meta = 0) { parent::__construct(self::TORCH, $meta, "Torch"); $this->hardness = 0; }
public function __construct() { parent::__construct(self::DEAD_BUSH, 0, "Dead Bush"); //$this->isReplaceable = true; $this->hardness = 0; }
public function __construct($face = 0) { parent::__construct(127, $this->getBeanFace($face), "Cocoa Bean"); $this->isActivable = true; $this->hardness = 0; $this->treeFace = $this->getTreeFace(); }
public function __construct($meta = 0) { parent::__construct(127, $meta, "Cocoa Bean"); }
public function __construct() { parent::__construct(self::DANDELION, 0, "Dandelion"); $this->hardness = 0; }
public function __construct() { parent::__construct(self::BROWN_MUSHROOM, 0, "Brown Mushroom"); $this->hardness = 0; }