From fc93387ff11888096c4d83290c0abac862db9c46 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Thu, 2 Mar 2023 08:02:40 +0300 Subject: [PATCH] cocoa block sides fix --- src/material/block/plant/CocoaBlock.php | 16 ++++++++-------- src/world/Level.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/material/block/plant/CocoaBlock.php b/src/material/block/plant/CocoaBlock.php index 2710d15a..56b17d77 100644 --- a/src/material/block/plant/CocoaBlock.php +++ b/src/material/block/plant/CocoaBlock.php @@ -1,6 +1,12 @@ 0x00, + 3 => 0x02, + 4 => 0x03, + 5 => 0x01 + ]; public function __construct($meta = 0){ parent::__construct(COCOA, $meta, "tile.cocoa.name<"); $this->isActivable = true; @@ -12,13 +18,7 @@ class CocoaBlock extends FlowableBlock{ return false; //fix of placing invalid ids without array } if($target->isTransparent === false){ - $faces = array( - 2 => 0x00, - 3 => 0x00, - 4 => 0x00, - 5 => 0x00, - ); - $this->level->setBlock($this, BlockAPI::get($this->id, $faces[$face]), true, false, true); + $this->level->setBlock($this, BlockAPI::get($this->id, self::$faces[$face]), true, false, true); return true; } return false; @@ -63,4 +63,4 @@ class CocoaBlock extends FlowableBlock{ } return $drops; } -} \ No newline at end of file +} diff --git a/src/world/Level.php b/src/world/Level.php index 0bd2d4c6..39dfefc5 100644 --- a/src/world/Level.php +++ b/src/world/Level.php @@ -7,7 +7,7 @@ class Level{ * 1 - Infinite * @var integer */ - public $generatorType = 1; + public $generatorType = 0; /** * @var Config