Separate block break-info to a separate dynamic unit

This commit is contained in:
Dylan K. Taylor
2019-05-10 16:24:59 +01:00
parent 3be5de4570
commit 9e72bc91a2
155 changed files with 556 additions and 1295 deletions

View File

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