This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
forked from pmmp/PocketMine-MP
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce4df8f
commit fceda82
Showing
6 changed files
with
212 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace symply\behavior\block; | ||
|
||
use pocketmine\block\BlockTypeInfo; | ||
use pocketmine\block\Flowable as PMFlowable; | ||
use symply\behavior\block\builder\BlockBuilder; | ||
|
||
class Flowable extends PMFlowable implements IBlockCustom | ||
{ | ||
|
||
|
||
public function __construct( | ||
BlockIdentifier $idInfo, | ||
string $name, | ||
BlockTypeInfo $typeInfo | ||
) | ||
{ | ||
parent::__construct($idInfo, $name, $typeInfo); | ||
} | ||
|
||
public function getIdInfo() : BlockIdentifier | ||
{ | ||
$idInfo = parent::getIdInfo(); | ||
assert($idInfo instanceof BlockIdentifier); | ||
return $idInfo; | ||
} | ||
|
||
public function getBlockBuilder(): BlockBuilder | ||
{ | ||
return BlockBuilder::create() | ||
->setBlock($this) | ||
->setUnitCube(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace symply\behavior\block; | ||
|
||
use pocketmine\block\BlockTypeInfo; | ||
use pocketmine\block\Flowable as PMFlowable; | ||
use symply\behavior\block\builder\BlockPermutationBuilder; | ||
|
||
abstract class FlowablePermutation extends PMFlowable implements IPermutationBlock | ||
{ | ||
|
||
|
||
public function __construct( | ||
BlockIdentifier $idInfo, | ||
string $name, | ||
BlockTypeInfo $typeInfo | ||
) | ||
{ | ||
parent::__construct($idInfo, $name, $typeInfo); | ||
} | ||
|
||
public function getIdInfo() : BlockIdentifier | ||
{ | ||
$idInfo = parent::getIdInfo(); | ||
assert($idInfo instanceof BlockIdentifier); | ||
return $idInfo; | ||
} | ||
|
||
public function getBlockBuilder(): BlockPermutationBuilder | ||
{ | ||
return BlockPermutationBuilder::create() | ||
->setBlock($this) | ||
->setUnitCube(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace symply\behavior\block; | ||
|
||
use pocketmine\block\BlockTypeInfo; | ||
use pocketmine\block\Opaque as PMOpaque; | ||
use symply\behavior\block\builder\BlockBuilder; | ||
|
||
class Opaque extends PMOpaque implements IBlockCustom | ||
{ | ||
|
||
|
||
public function __construct( | ||
BlockIdentifier $idInfo, | ||
string $name, | ||
BlockTypeInfo $typeInfo | ||
) | ||
{ | ||
parent::__construct($idInfo, $name, $typeInfo); | ||
} | ||
|
||
public function getIdInfo() : BlockIdentifier | ||
{ | ||
$idInfo = parent::getIdInfo(); | ||
assert($idInfo instanceof BlockIdentifier); | ||
return $idInfo; | ||
} | ||
|
||
public function getBlockBuilder(): BlockBuilder | ||
{ | ||
return BlockBuilder::create() | ||
->setBlock($this) | ||
->setUnitCube(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace symply\behavior\block; | ||
|
||
use pocketmine\block\BlockTypeInfo; | ||
use pocketmine\block\Opaque as PMOpaque; | ||
use symply\behavior\block\builder\BlockBuilder; | ||
use symply\behavior\block\builder\BlockPermutationBuilder; | ||
|
||
abstract class OpaquePermutation extends PMOpaque implements IPermutationBlock | ||
{ | ||
|
||
|
||
public function __construct( | ||
BlockIdentifier $idInfo, | ||
string $name, | ||
BlockTypeInfo $typeInfo | ||
) | ||
{ | ||
parent::__construct($idInfo, $name, $typeInfo); | ||
} | ||
|
||
public function getIdInfo() : BlockIdentifier | ||
{ | ||
$idInfo = parent::getIdInfo(); | ||
assert($idInfo instanceof BlockIdentifier); | ||
return $idInfo; | ||
} | ||
|
||
public function getBlockBuilder(): BlockPermutationBuilder | ||
{ | ||
return BlockPermutationBuilder::create() | ||
->setBlock($this) | ||
->setUnitCube(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace symply\behavior\block; | ||
|
||
use pocketmine\block\BlockTypeInfo; | ||
use pocketmine\block\Transparent as PMTransparent; | ||
use symply\behavior\block\builder\BlockBuilder; | ||
|
||
class Transparent extends PMTransparent implements IBlockCustom | ||
{ | ||
|
||
|
||
public function __construct( | ||
BlockIdentifier $idInfo, | ||
string $name, | ||
BlockTypeInfo $typeInfo | ||
) | ||
{ | ||
parent::__construct($idInfo, $name, $typeInfo); | ||
} | ||
|
||
public function getIdInfo() : BlockIdentifier | ||
{ | ||
$idInfo = parent::getIdInfo(); | ||
assert($idInfo instanceof BlockIdentifier); | ||
return $idInfo; | ||
} | ||
|
||
public function getBlockBuilder(): BlockBuilder | ||
{ | ||
return BlockBuilder::create() | ||
->setBlock($this) | ||
->setUnitCube(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace symply\behavior\block; | ||
|
||
use pocketmine\block\BlockTypeInfo; | ||
use pocketmine\block\Transparent as PMTransparent; | ||
use symply\behavior\block\builder\BlockBuilder; | ||
use symply\behavior\block\builder\BlockPermutationBuilder; | ||
|
||
abstract class TransparentPermutation extends PMTransparent implements IPermutationBlock | ||
{ | ||
|
||
|
||
public function __construct( | ||
BlockIdentifier $idInfo, | ||
string $name, | ||
BlockTypeInfo $typeInfo | ||
) | ||
{ | ||
parent::__construct($idInfo, $name, $typeInfo); | ||
} | ||
|
||
public function getIdInfo() : BlockIdentifier | ||
{ | ||
$idInfo = parent::getIdInfo(); | ||
assert($idInfo instanceof BlockIdentifier); | ||
return $idInfo; | ||
} | ||
|
||
public function getBlockBuilder(): BlockPermutationBuilder | ||
{ | ||
return BlockPermutationBuilder::create() | ||
->setBlock($this) | ||
->setUnitCube(); | ||
} | ||
} |