mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
Added new Block properties (Block::isSolid, Block::isFullBlock)
This commit is contained in:
parent
8d00ef381d
commit
a795b64bab
36 changed files with 57 additions and 32 deletions
|
|
@ -25,7 +25,7 @@ the Free Software Foundation, either version 3 of the License, or
|
|||
|
||||
*/
|
||||
|
||||
class SugarcaneBlock extends TransparentBlock{
|
||||
class SugarcaneBlock extends FlowableBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(SUGARCANE_BLOCK, 0, "Sugarcane");
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ class SugarcaneBlock extends TransparentBlock{
|
|||
|
||||
public function onUpdate($type){
|
||||
if($type === BLOCK_UPDATE_NORMAL){
|
||||
if($this->getSide(0)->isFlowable === true){ //Replace wit common break method
|
||||
if($this->getSide(0)->isTransparent === true){ //Replace wit common break method
|
||||
ServerAPI::request()->api->entity->drop($this, BlockAPI::getItem(SUGARCANE));
|
||||
$this->level->setBlock($this, new AirBlock(), false);
|
||||
return BLOCK_UPDATE_NORMAL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue