Block: Blow away a bunch of useless classes

This commit is contained in:
Dylan K. Taylor
2019-05-24 19:38:43 +01:00
parent d25ecbebd4
commit 54216c2fee
48 changed files with 128 additions and 1311 deletions

View File

@ -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()));
}

View File

@ -23,6 +23,6 @@ declare(strict_types=1);
namespace pocketmine\block;
class MyCustomBlock extends Cobblestone{
class MyCustomBlock extends Solid{
}