Skip to content

Daiuske 1 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: fallendead
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/brokiem/snpc/entity/npc/BlockingDeadNPC.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace brokiem\snpc\entity\npc;

use brokiem\snpc\entity\BaseNPC;
use conquest\form\JoinForm;
use entity_factory\CustomEntityIds;
use fallendead\form\game\JoinFormV2;
use fallendead\form\game\SelectMapForm;
Expand All @@ -21,8 +22,8 @@
use pocketmine\player\Player;

class BlockingDeadNPC extends BaseNPC {
public float $height = 5.0;
public float $width = 5.0;
public float $height = 2.5;
public float $width = 0.5;

public int $tick_counter = 0;

Expand All @@ -47,6 +48,6 @@ public function attack(EntityDamageEvent $source) : void{
}

private function onJoin(Player $player) : void{
$player->sendForm(new JoinFormV2());
$player->sendForm(new JoinForm());
}
}
12 changes: 6 additions & 6 deletions src/brokiem/snpc/entity/npc/JoinPortal.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,27 @@
namespace brokiem\snpc\entity\npc;

use brokiem\snpc\entity\BaseNPC;
use conquest\form\JoinForm;
use conquest\object\utils\GameFactory;
use entity_factory\CustomEntityIds;
use fallendead\form\game\JoinFormV2;
use fallendead\level\map;
use pocketmine\entity\EntitySizeInfo;
use pocketmine\event\entity\EntityDamageByEntityEvent;
use pocketmine\event\entity\EntityDamageEvent;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\player\Player;
use pocketmine\Server;
use conquest\form\JoinForm;

class JoinPortal extends BaseNPC {
public float $height = 5.0;
public float $width = 5.0;
public float $height = 2.5;
public float $width = 0.5;

protected int $tick_counter = 0;

protected function initEntity(CompoundTag $nbt): void {
parent::initEntity($nbt);
$this->setScale(1);
$this->setScale(6.7);
}

protected function getInitialSizeInfo(): EntitySizeInfo {
Expand All @@ -44,8 +45,7 @@ public function attack(EntityDamageEvent $source) : void{
}

private function onJoin(Player $player) : void{
$player->sendForm(new JoinForm());

$player->sendForm(new JoinFormV2());
}

public static function getNetworkTypeId(): string {
Expand Down