Rename BlockFactory::fromFullBlock() -> BlockFactory::fromStateId()

This commit is contained in:
Dylan K. Taylor
2022-07-05 13:46:19 +01:00
parent a059d03b37
commit 0a23e91329
12 changed files with 25 additions and 25 deletions

View File

@ -54,7 +54,7 @@ class BlockTest extends TestCase{
public function testDeliberateOverrideBlock() : void{
$block = new MyCustomBlock(new BlockIdentifier(BlockTypeIds::COBBLESTONE), "Cobblestone", BlockBreakInfo::instant());
$this->blockFactory->register($block, true);
self::assertInstanceOf(MyCustomBlock::class, $this->blockFactory->fromFullBlock($block->getStateId()));
self::assertInstanceOf(MyCustomBlock::class, $this->blockFactory->fromStateId($block->getStateId()));
}
/**
@ -65,7 +65,7 @@ class BlockTest extends TestCase{
if(!$this->blockFactory->isRegistered($i)){
$b = new StrangeNewBlock(new BlockIdentifier($i), "Strange New Block", BlockBreakInfo::instant());
$this->blockFactory->register($b);
self::assertInstanceOf(StrangeNewBlock::class, $this->blockFactory->fromFullBlock($b->getStateId()));
self::assertInstanceOf(StrangeNewBlock::class, $this->blockFactory->fromStateId($b->getStateId()));
return;
}
}
@ -88,8 +88,8 @@ class BlockTest extends TestCase{
*/
public function testBlockFactoryClone() : void{
foreach($this->blockFactory->getAllKnownStates() as $k => $state){
$b1 = $this->blockFactory->fromFullBlock($k);
$b2 = $this->blockFactory->fromFullBlock($k);
$b1 = $this->blockFactory->fromStateId($k);
$b2 = $this->blockFactory->fromStateId($k);
self::assertNotSame($b1, $b2);
}
}