mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-14 22:01:59 +00:00
Merge branch 'minor-next' into blockstate-schema-generator-improvements
This commit is contained in:
commit
847f931660
@ -23,9 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\CopperMaterial;
|
||||||
use pocketmine\block\utils\CopperTrait;
|
use pocketmine\block\utils\CopperTrait;
|
||||||
use pocketmine\block\utils\ICopper;
|
|
||||||
|
|
||||||
class Copper extends Opaque implements ICopper{
|
class Copper extends Opaque implements CopperMaterial{
|
||||||
use CopperTrait;
|
use CopperTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,14 +23,14 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\CopperMaterial;
|
||||||
use pocketmine\block\utils\CopperOxidation;
|
use pocketmine\block\utils\CopperOxidation;
|
||||||
use pocketmine\block\utils\CopperTrait;
|
use pocketmine\block\utils\CopperTrait;
|
||||||
use pocketmine\block\utils\ICopper;
|
|
||||||
use pocketmine\block\utils\LightableTrait;
|
use pocketmine\block\utils\LightableTrait;
|
||||||
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
use pocketmine\block\utils\PoweredByRedstoneTrait;
|
||||||
use pocketmine\data\runtime\RuntimeDataDescriber;
|
use pocketmine\data\runtime\RuntimeDataDescriber;
|
||||||
|
|
||||||
class CopperBulb extends Opaque implements ICopper{
|
class CopperBulb extends Opaque implements CopperMaterial{
|
||||||
use CopperTrait;
|
use CopperTrait;
|
||||||
use PoweredByRedstoneTrait;
|
use PoweredByRedstoneTrait;
|
||||||
use LightableTrait{
|
use LightableTrait{
|
||||||
|
@ -23,14 +23,14 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\CopperMaterial;
|
||||||
use pocketmine\block\utils\CopperTrait;
|
use pocketmine\block\utils\CopperTrait;
|
||||||
use pocketmine\block\utils\ICopper;
|
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Facing;
|
use pocketmine\math\Facing;
|
||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
|
|
||||||
class CopperDoor extends Door implements ICopper{
|
class CopperDoor extends Door implements CopperMaterial{
|
||||||
use CopperTrait{
|
use CopperTrait{
|
||||||
onInteract as onInteractCopper;
|
onInteract as onInteractCopper;
|
||||||
}
|
}
|
||||||
|
@ -23,10 +23,10 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\CopperMaterial;
|
||||||
use pocketmine\block\utils\CopperTrait;
|
use pocketmine\block\utils\CopperTrait;
|
||||||
use pocketmine\block\utils\ICopper;
|
|
||||||
|
|
||||||
class CopperGrate extends Transparent implements ICopper{
|
class CopperGrate extends Transparent implements CopperMaterial{
|
||||||
use CopperTrait;
|
use CopperTrait;
|
||||||
|
|
||||||
//TODO: waterlogging!
|
//TODO: waterlogging!
|
||||||
|
@ -23,9 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\CopperMaterial;
|
||||||
use pocketmine\block\utils\CopperTrait;
|
use pocketmine\block\utils\CopperTrait;
|
||||||
use pocketmine\block\utils\ICopper;
|
|
||||||
|
|
||||||
class CopperSlab extends Slab implements ICopper{
|
class CopperSlab extends Slab implements CopperMaterial{
|
||||||
use CopperTrait;
|
use CopperTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,9 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\CopperMaterial;
|
||||||
use pocketmine\block\utils\CopperTrait;
|
use pocketmine\block\utils\CopperTrait;
|
||||||
use pocketmine\block\utils\ICopper;
|
|
||||||
|
|
||||||
class CopperStairs extends Stair implements ICopper{
|
class CopperStairs extends Stair implements CopperMaterial{
|
||||||
use CopperTrait;
|
use CopperTrait;
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\block\utils\CopperMaterial;
|
||||||
use pocketmine\block\utils\CopperTrait;
|
use pocketmine\block\utils\CopperTrait;
|
||||||
use pocketmine\block\utils\ICopper;
|
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
|
|
||||||
class CopperTrapdoor extends Trapdoor implements ICopper{
|
class CopperTrapdoor extends Trapdoor implements CopperMaterial{
|
||||||
use CopperTrait{
|
use CopperTrait{
|
||||||
onInteract as onInteractCopper;
|
onInteract as onInteractCopper;
|
||||||
}
|
}
|
||||||
|
@ -26,13 +26,13 @@ namespace pocketmine\block\utils;
|
|||||||
/**
|
/**
|
||||||
* Represents copper blocks that have oxidized and waxed variations.
|
* Represents copper blocks that have oxidized and waxed variations.
|
||||||
*/
|
*/
|
||||||
interface ICopper{
|
interface CopperMaterial{
|
||||||
|
|
||||||
public function getOxidation() : CopperOxidation;
|
public function getOxidation() : CopperOxidation;
|
||||||
|
|
||||||
public function setOxidation(CopperOxidation $oxidation) : ICopper;
|
public function setOxidation(CopperOxidation $oxidation) : CopperMaterial;
|
||||||
|
|
||||||
public function isWaxed() : bool;
|
public function isWaxed() : bool;
|
||||||
|
|
||||||
public function setWaxed(bool $waxed) : ICopper;
|
public function setWaxed(bool $waxed) : CopperMaterial;
|
||||||
}
|
}
|
@ -45,8 +45,8 @@ use pocketmine\block\Slab;
|
|||||||
use pocketmine\block\Stair;
|
use pocketmine\block\Stair;
|
||||||
use pocketmine\block\Stem;
|
use pocketmine\block\Stem;
|
||||||
use pocketmine\block\Trapdoor;
|
use pocketmine\block\Trapdoor;
|
||||||
|
use pocketmine\block\utils\CopperMaterial;
|
||||||
use pocketmine\block\utils\CopperOxidation;
|
use pocketmine\block\utils\CopperOxidation;
|
||||||
use pocketmine\block\utils\ICopper;
|
|
||||||
use pocketmine\block\utils\SlabType;
|
use pocketmine\block\utils\SlabType;
|
||||||
use pocketmine\block\VanillaBlocks;
|
use pocketmine\block\VanillaBlocks;
|
||||||
use pocketmine\block\Wall;
|
use pocketmine\block\Wall;
|
||||||
@ -98,24 +98,24 @@ final class BlockStateDeserializerHelper{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @phpstan-template TBlock of ICopper
|
* @phpstan-template TBlock of CopperMaterial
|
||||||
*
|
*
|
||||||
* @phpstan-param TBlock $block
|
* @phpstan-param TBlock $block
|
||||||
* @phpstan-return TBlock
|
* @phpstan-return TBlock
|
||||||
*/
|
*/
|
||||||
public static function decodeCopper(ICopper $block, CopperOxidation $oxidation) : ICopper{
|
public static function decodeCopper(CopperMaterial $block, CopperOxidation $oxidation) : CopperMaterial{
|
||||||
$block->setOxidation($oxidation);
|
$block->setOxidation($oxidation);
|
||||||
$block->setWaxed(false);
|
$block->setWaxed(false);
|
||||||
return $block;
|
return $block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @phpstan-template TBlock of ICopper
|
* @phpstan-template TBlock of CopperMaterial
|
||||||
*
|
*
|
||||||
* @phpstan-param TBlock $block
|
* @phpstan-param TBlock $block
|
||||||
* @phpstan-return TBlock
|
* @phpstan-return TBlock
|
||||||
*/
|
*/
|
||||||
public static function decodeWaxedCopper(ICopper $block, CopperOxidation $oxidation) : ICopper{
|
public static function decodeWaxedCopper(CopperMaterial $block, CopperOxidation $oxidation) : CopperMaterial{
|
||||||
$block->setOxidation($oxidation);
|
$block->setOxidation($oxidation);
|
||||||
$block->setWaxed(true);
|
$block->setWaxed(true);
|
||||||
return $block;
|
return $block;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user