mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
Separate block break-info to a separate dynamic unit
This commit is contained in:
@ -57,7 +57,7 @@ class BlockTest extends TestCase{
|
||||
public function testRegisterNewBlock() : void{
|
||||
for($i = 0; $i < 256; ++$i){
|
||||
if(!BlockFactory::isRegistered($i)){
|
||||
$b = new StrangeNewBlock(new BlockIdentifier($i), "Strange New Block");
|
||||
$b = new StrangeNewBlock(new BlockIdentifier($i), "Strange New Block", BlockBreakInfo::instant());
|
||||
BlockFactory::register($b);
|
||||
self::assertInstanceOf(StrangeNewBlock::class, BlockFactory::get($b->getId()));
|
||||
return;
|
||||
@ -72,7 +72,7 @@ class BlockTest extends TestCase{
|
||||
*/
|
||||
public function testRegisterIdTooLarge() : void{
|
||||
self::expectException(\RuntimeException::class);
|
||||
BlockFactory::register(new OutOfBoundsBlock(new BlockIdentifier(25555), "Out Of Bounds Block"));
|
||||
BlockFactory::register(new OutOfBoundsBlock(new BlockIdentifier(25555), "Out Of Bounds Block", BlockBreakInfo::instant()));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -80,7 +80,7 @@ class BlockTest extends TestCase{
|
||||
*/
|
||||
public function testRegisterIdTooSmall() : void{
|
||||
self::expectException(\RuntimeException::class);
|
||||
BlockFactory::register(new OutOfBoundsBlock(new BlockIdentifier(-1), "Out Of Bounds Block"));
|
||||
BlockFactory::register(new OutOfBoundsBlock(new BlockIdentifier(-1), "Out Of Bounds Block", BlockBreakInfo::instant()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user