mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Added new methods of Block properties (WiP)
This commit is contained in:
parent
4c06b384c7
commit
5a054a8ab4
6 changed files with 236 additions and 25 deletions
|
|
@ -35,19 +35,19 @@ class TreeObject{
|
|||
);
|
||||
public static function growTree(LevelAPI $level, Block $block){
|
||||
switch($block->getMetadata() & 0x03){
|
||||
case Sapling::SPRUCE:
|
||||
case SaplingBlock::SPRUCE:
|
||||
if(mt_rand(0,1) == 1){
|
||||
$tree = new SpruceTreeObject();
|
||||
}else{
|
||||
$tree = new PineTreeObject();
|
||||
}
|
||||
break;
|
||||
case Sapling::BIRCH:
|
||||
case SaplingBlock::BIRCH:
|
||||
$tree = new SmallTreeObject();
|
||||
$tree->type = Sapling::BIRCH;
|
||||
$tree->type = SaplingBlock::BIRCH;
|
||||
break;
|
||||
default:
|
||||
case Sapling::OAK:
|
||||
case SaplingBlock::OAK:
|
||||
if(mt_rand(0,9) === 0){
|
||||
$tree = new BigTreeObject();
|
||||
}else{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue