Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
add all model for creation block
Browse files Browse the repository at this point in the history
  • Loading branch information
SenseiTarzan committed Dec 6, 2023
1 parent ce4df8f commit fceda82
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 0 deletions.
35 changes: 35 additions & 0 deletions symply/behavior/block/Flowable.php
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();
}
}
35 changes: 35 additions & 0 deletions symply/behavior/block/FlowablePermutation.php
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();
}
}
35 changes: 35 additions & 0 deletions symply/behavior/block/Opaque.php
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();
}
}
36 changes: 36 additions & 0 deletions symply/behavior/block/OpaquePermutation.php
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();
}
}
35 changes: 35 additions & 0 deletions symply/behavior/block/Transparent.php
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();
}
}
36 changes: 36 additions & 0 deletions symply/behavior/block/TransparentPermutation.php
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();
}
}

0 comments on commit fceda82

Please sign in to comment.