mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
Block: Blow away a bunch of useless classes
This commit is contained in:
@ -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()));
|
||||
}
|
||||
|
@ -23,6 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
class MyCustomBlock extends Cobblestone{
|
||||
class MyCustomBlock extends Solid{
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user