some new blocks

This commit is contained in:
FreeHij 2023-02-21 21:08:26 +03:00
parent 9b5a3959c4
commit 1a01483453
18 changed files with 395 additions and 9 deletions

View file

@ -1,9 +1,30 @@
<?php
class CyanFlowerBlock extends FlowableBlock{
const POPPY = 0;
const BLUE_ORCHID = 1;
const ALLIUM = 2;
const AZURE_BLUET = 3;
const RED_TULIP = 4;
const ORANGE_TULIP = 5;
const WHITE_TULIP = 6;
const PINK_TULIP = 7;
const OXEYE_DAISY = 8;
public function __construct(){
parent::__construct(CYAN_FLOWER, 0, "Cyan Flower");
parent::__construct(CYAN_FLOWER, 0, "Poppy");
$this->hardness = 0;
$names = array(
0 => "Poppy",
1 => "Blue Orchid",
2 => "Allium",
3 => "Azure Bluet",
4 => "Red Tulip",
5 => "Orange Tulip",
6 => "White Tulip",
7 => "Pink Tulip",
8 => "Oxeye Daisy",
);
}
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){

View file

@ -5,6 +5,8 @@ class SaplingBlock extends FlowableBlock{
const SPRUCE = 1;
const BIRCH = 2;
const JUNGLE = 3;
const ACACIA = 4;
const DARK_OAK = 5;
const BURN_TIME = 5;
public function __construct($meta = SaplingBlock::OAK){
@ -15,6 +17,8 @@ class SaplingBlock extends FlowableBlock{
1 => "Spruce Sapling",
2 => "Birch Sapling",
3 => "Jungle Sapling",
4 => "Acacia Sapling",
5 => "Dark Oak Sapling",
);
$this->name = $names[$this->meta & 0x03];
$this->hardness = 0;