Consistently use 'mob head' terminology in the API

previously, we were sometimes using 'mob head' and other times 'skull', sometimes even within the same file.
This commit is contained in:
Dylan K. Taylor
2023-05-26 14:52:28 +01:00
parent edafe9d21f
commit bdb0ed0701
15 changed files with 107 additions and 107 deletions

View File

@ -426,14 +426,14 @@ parameters:
path: ../../../src/block/tile/Chest.php
-
message: "#^Constant pocketmine\\\\block\\\\tile\\\\Skull\\:\\:TAG_MOUTH_MOVING is unused\\.$#"
message: "#^Constant pocketmine\\\\block\\\\tile\\\\MobHead\\:\\:TAG_MOUTH_MOVING is unused\\.$#"
count: 1
path: ../../../src/block/tile/Skull.php
path: ../../../src/block/tile/MobHead.php
-
message: "#^Constant pocketmine\\\\block\\\\tile\\\\Skull\\:\\:TAG_MOUTH_TICK_COUNT is unused\\.$#"
message: "#^Constant pocketmine\\\\block\\\\tile\\\\MobHead\\:\\:TAG_MOUTH_TICK_COUNT is unused\\.$#"
count: 1
path: ../../../src/block/tile/Skull.php
path: ../../../src/block/tile/MobHead.php
-
message: "#^Parameter \\#2 \\$value of method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:setInt\\(\\) expects int, float\\|int given\\.$#"

View File

@ -28,8 +28,8 @@ use pocketmine\block\BaseBanner;
use pocketmine\block\Bed;
use pocketmine\block\BlockTypeIds;
use pocketmine\block\CaveVines;
use pocketmine\block\MobHead;
use pocketmine\block\RuntimeBlockStateRegistry;
use pocketmine\block\Skull;
use pocketmine\data\bedrock\block\BlockStateDeserializeException;
use pocketmine\data\bedrock\block\BlockStateSerializeException;
use function print_r;
@ -72,8 +72,8 @@ final class BlockSerializerDeserializerTest extends TestCase{
($block instanceof Bed && $newBlock instanceof Bed)
){
$newBlock->setColor($block->getColor());
}elseif($block instanceof Skull && $newBlock instanceof Skull){
$newBlock->setSkullType($block->getSkullType());
}elseif($block instanceof MobHead && $newBlock instanceof MobHead){
$newBlock->setMobHeadType($block->getMobHeadType());
}elseif($block instanceof CaveVines && $newBlock instanceof CaveVines && !$block->hasBerries()){
$newBlock->setHead($block->isHead());
}