diff --git a/src/pocketmine/block/Barrier.php b/src/pocketmine/block/Barrier.php deleted file mode 100644 index 6b5bee1a3..000000000 --- a/src/pocketmine/block/Barrier.php +++ /dev/null @@ -1,31 +0,0 @@ - "Cut ", BlockLegacyMetadata::SANDSTONE_SMOOTH => "Smooth " ]; + $sandstoneBreakInfo = new BlockBreakInfo(0.8, BlockToolType::TYPE_PICKAXE, TieredTool::TIER_WOODEN); + self::register(new Stair(new BID(BlockLegacyIds::RED_SANDSTONE_STAIRS), "Red Sandstone Stairs", $sandstoneBreakInfo)); + self::register(new Stair(new BID(BlockLegacyIds::SANDSTONE_STAIRS), "Sandstone Stairs", $sandstoneBreakInfo)); foreach($sandstoneTypes as $variant => $prefix){ - self::register(new Sandstone(new BID(BlockLegacyIds::SANDSTONE, $variant), $prefix . "Sandstone")); - self::register(new Sandstone(new BID(BlockLegacyIds::RED_SANDSTONE, $variant), $prefix . "Red Sandstone")); + self::register(new Solid(new BID(BlockLegacyIds::SANDSTONE, $variant), $prefix . "Sandstone", $sandstoneBreakInfo)); + self::register(new Solid(new BID(BlockLegacyIds::RED_SANDSTONE, $variant), $prefix . "Red Sandstone", $sandstoneBreakInfo)); } //region ugly glazed-terracotta colour -> ID mapping table diff --git a/src/pocketmine/block/BrickStairs.php b/src/pocketmine/block/BrickStairs.php deleted file mode 100644 index 7d942c2fe..000000000 --- a/src/pocketmine/block/BrickStairs.php +++ /dev/null @@ -1,33 +0,0 @@ - dummy */ protected $connections = []; diff --git a/src/pocketmine/block/Gold.php b/src/pocketmine/block/Gold.php deleted file mode 100644 index 5fcda706b..000000000 --- a/src/pocketmine/block/Gold.php +++ /dev/null @@ -1,33 +0,0 @@ - dummy */ protected $connections = []; diff --git a/src/pocketmine/block/Transparent.php b/src/pocketmine/block/Transparent.php index d079f39f9..3d501dd76 100644 --- a/src/pocketmine/block/Transparent.php +++ b/src/pocketmine/block/Transparent.php @@ -24,7 +24,7 @@ declare(strict_types=1); namespace pocketmine\block; -abstract class Transparent extends Block{ +class Transparent extends Block{ public function isTransparent() : bool{ return true; diff --git a/src/pocketmine/block/Trapdoor.php b/src/pocketmine/block/Trapdoor.php index efc4e0282..4b41837b1 100644 --- a/src/pocketmine/block/Trapdoor.php +++ b/src/pocketmine/block/Trapdoor.php @@ -31,7 +31,7 @@ use pocketmine\math\Vector3; use pocketmine\Player; use pocketmine\world\sound\DoorSound; -abstract class Trapdoor extends Transparent{ +class Trapdoor extends Transparent{ /** @var int */ protected $facing = Facing::NORTH; diff --git a/tests/phpunit/block/BlockTest.php b/tests/phpunit/block/BlockTest.php index 8c3fbc6a0..b1d747da3 100644 --- a/tests/phpunit/block/BlockTest.php +++ b/tests/phpunit/block/BlockTest.php @@ -37,7 +37,7 @@ class BlockTest extends TestCase{ * Test registering a block which would overwrite another block, without forcing it */ public function testAccidentalOverrideBlock() : void{ - $block = new MyCustomBlock(new BlockIdentifier(BlockLegacyIds::COBBLESTONE), "Cobblestone"); + $block = new MyCustomBlock(new BlockIdentifier(BlockLegacyIds::COBBLESTONE), "Cobblestone", BlockBreakInfo::instant()); $this->expectException(\InvalidArgumentException::class); BlockFactory::register($block); } @@ -46,7 +46,7 @@ class BlockTest extends TestCase{ * Test registering a block deliberately overwriting another block works as expected */ public function testDeliberateOverrideBlock() : void{ - $block = new MyCustomBlock(new BlockIdentifier(BlockLegacyIds::COBBLESTONE), "Cobblestone"); + $block = new MyCustomBlock(new BlockIdentifier(BlockLegacyIds::COBBLESTONE), "Cobblestone", BlockBreakInfo::instant()); BlockFactory::register($block, true); self::assertInstanceOf(MyCustomBlock::class, BlockFactory::get($block->getId())); } diff --git a/tests/phpunit/block/MyCustomBlock.php b/tests/phpunit/block/MyCustomBlock.php index 45b8a00e1..7d21c0404 100644 --- a/tests/phpunit/block/MyCustomBlock.php +++ b/tests/phpunit/block/MyCustomBlock.php @@ -23,6 +23,6 @@ declare(strict_types=1); namespace pocketmine\block; -class MyCustomBlock extends Cobblestone{ +class MyCustomBlock extends Solid{ }