mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +00:00
Added documentation for some base Block classes
This commit is contained in:
parent
3f7d8a3777
commit
cb7c136035
@ -26,6 +26,10 @@ namespace pocketmine\block;
|
|||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\math\AxisAlignedBB;
|
use pocketmine\math\AxisAlignedBB;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* "Flowable" blocks are destroyed if water flows into the same space as the block. These blocks usually don't have any
|
||||||
|
* collision boxes, and can't provide support for other blocks.
|
||||||
|
*/
|
||||||
abstract class Flowable extends Transparent{
|
abstract class Flowable extends Transparent{
|
||||||
|
|
||||||
public function canBeFlowedInto() : bool{
|
public function canBeFlowedInto() : bool{
|
||||||
|
@ -23,6 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opaque blocks do not allow light to pass through. They are usually collidable full-cube blocks.
|
||||||
|
* Most blocks in Minecraft fall into this category.
|
||||||
|
*/
|
||||||
class Opaque extends Block{
|
class Opaque extends Block{
|
||||||
|
|
||||||
public function isSolid() : bool{
|
public function isSolid() : bool{
|
||||||
|
@ -29,6 +29,9 @@ use pocketmine\math\AxisAlignedBB;
|
|||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
use function count;
|
use function count;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Thin blocks behave like glass panes. They connect to full-cube blocks horizontally adjacent to them if possible.
|
||||||
|
*/
|
||||||
class Thin extends Transparent{
|
class Thin extends Transparent{
|
||||||
/** @var bool[] facing => dummy */
|
/** @var bool[] facing => dummy */
|
||||||
protected array $connections = [];
|
protected array $connections = [];
|
||||||
|
@ -23,6 +23,12 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transparent blocks do not block any light from propagating through them.
|
||||||
|
*
|
||||||
|
* Note: This does **not** imply that the block is **visually** transparent. For example, chests allow light to pass
|
||||||
|
* through, but the player cannot see through them except at the edges.
|
||||||
|
*/
|
||||||
class Transparent extends Block{
|
class Transparent extends Block{
|
||||||
|
|
||||||
public function isTransparent() : bool{
|
public function isTransparent() : bool{
|
||||||
|
@ -25,6 +25,9 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a block which is unrecognized or not implemented.
|
||||||
|
*/
|
||||||
class UnknownBlock extends Transparent{
|
class UnknownBlock extends Transparent{
|
||||||
|
|
||||||
public function __construct(BlockIdentifier $idInfo, BlockBreakInfo $breakInfo){
|
public function __construct(BlockIdentifier $idInfo, BlockBreakInfo $breakInfo){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user