Skip to content

Commit

Permalink
古来の忘れられし存在を実装
Browse files Browse the repository at this point in the history
  • Loading branch information
RarkHopper committed Feb 1, 2022
1 parent cca188e commit cd626cd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
28 changes: 28 additions & 0 deletions src/brokiem/snpc/entity/npc/BBGuardianNPC.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* Copyright (c) 2021 brokiem
* SimpleNPC is licensed under the GNU Lesser General Public License v3.0
*/

declare(strict_types=1);

namespace brokiem\snpc\entity\npc;

use brokiem\snpc\entity\BaseNPC;
use pocketmine\entity\EntitySizeInfo;
use pocketmine\network\mcpe\protocol\types\entity\EntityIds;

class BBGuardian extends BaseNPC {

public float $height = 2;
public float $width = 2;

protected function getInitialSizeInfo(): EntitySizeInfo {
return new EntitySizeInfo($this->height, $this->width);
}

public static function getNetworkTypeId(): string {
return EntityIds::ELDER_GUARDIAN;
}
}
4 changes: 3 additions & 1 deletion src/brokiem/snpc/manager/NPCManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use brokiem\snpc\entity\CustomHuman;
use brokiem\snpc\entity\npc\AxolotlNPC;
use brokiem\snpc\entity\npc\BatNPC;
use brokiem\snpc\entity\npc\BBGuardian;
use brokiem\snpc\entity\npc\BlazeNPC;
use brokiem\snpc\entity\npc\ChickenNPC;
use brokiem\snpc\entity\npc\CowNPC;
Expand Down Expand Up @@ -75,7 +76,8 @@ class NPCManager {
VillagerNPC::class => ["villager_snpc", "simplenpc:villager"],
WitchNPC::class => ["witch_snpc", "simplenpc:witch"],
WolfNPC::class => ["wolf_snpc", "simplenpc:wolf"],
ZombieNPC::class => ["zombie_snpc", "simplenpc:zombie"]
ZombieNPC::class => ["zombie_snpc", "simplenpc:zombie"],
BBGuardian::class => ["bbguardian_snpc", "simplenpc::bbguardian"]
];

public function getDefaultNPCs(): array {
Expand Down

0 comments on commit cd626cd

Please sign in to comment.