mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 02:09:42 +00:00
Merge branch 'minor-next' into major-next
This commit is contained in:
commit
f1a6d71cc1
@ -34,9 +34,9 @@ class BrewingStandTest extends TestCase{
|
|||||||
* @phpstan-return \Generator<int, array{list<BrewingStandSlot>}, void, void>
|
* @phpstan-return \Generator<int, array{list<BrewingStandSlot>}, void, void>
|
||||||
*/
|
*/
|
||||||
public static function slotsProvider() : \Generator{
|
public static function slotsProvider() : \Generator{
|
||||||
yield [array_values(BrewingStandSlot::getAll())];
|
yield [BrewingStandSlot::cases()];
|
||||||
yield [[BrewingStandSlot::EAST()]];
|
yield [[BrewingStandSlot::EAST]];
|
||||||
yield [[BrewingStandSlot::EAST(), BrewingStandSlot::NORTHWEST()]];
|
yield [[BrewingStandSlot::EAST, BrewingStandSlot::NORTHWEST]];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,10 +29,10 @@ use pocketmine\block\utils\DyeColor;
|
|||||||
class DyeColorIdMapTest extends TestCase{
|
class DyeColorIdMapTest extends TestCase{
|
||||||
|
|
||||||
public function testAllColorsMapped() : void{
|
public function testAllColorsMapped() : void{
|
||||||
foreach(DyeColor::getAll() as $color){
|
foreach(DyeColor::cases() as $color){
|
||||||
$id = DyeColorIdMap::getInstance()->toId($color);
|
$id = DyeColorIdMap::getInstance()->toId($color);
|
||||||
$color2 = DyeColorIdMap::getInstance()->fromId($id);
|
$color2 = DyeColorIdMap::getInstance()->fromId($id);
|
||||||
self::assertTrue($color2 !== null && $color->equals($color2));
|
self::assertTrue($color === $color2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ final class BannerTest extends TestCase{
|
|||||||
$item = VanillaBlocks::BANNER()->asItem();
|
$item = VanillaBlocks::BANNER()->asItem();
|
||||||
assert($item instanceof Banner);
|
assert($item instanceof Banner);
|
||||||
$item->setPatterns([
|
$item->setPatterns([
|
||||||
new BannerPatternLayer(BannerPatternType::FLOWER(), DyeColor::RED())
|
new BannerPatternLayer(BannerPatternType::FLOWER, DyeColor::RED)
|
||||||
]);
|
]);
|
||||||
$data = $item->nbtSerialize();
|
$data = $item->nbtSerialize();
|
||||||
|
|
||||||
@ -45,6 +45,6 @@ final class BannerTest extends TestCase{
|
|||||||
self::assertInstanceOf(Banner::class, $item2);
|
self::assertInstanceOf(Banner::class, $item2);
|
||||||
$patterns = $item2->getPatterns();
|
$patterns = $item2->getPatterns();
|
||||||
self::assertCount(1, $patterns);
|
self::assertCount(1, $patterns);
|
||||||
self::assertTrue(BannerPatternType::FLOWER()->equals($patterns[0]->getType()));
|
self::assertTrue(BannerPatternType::FLOWER === $patterns[0]->getType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user