Skip to content
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"require-dev": {
"php": "^8.0",
"pocketmine/pocketmine-mp": "^5.27.0",
"pocketmine/pocketmine-mp": "^5.42.2",
"phpstan/phpstan": "1.10.21"
},
"repositories": [
Expand Down
320 changes: 144 additions & 176 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(private Animal $animal){}

public function encode() : array{
return [
ActorEventPacket::create($this->animal->getId(), ActorEvent::BABY_ANIMAL_FEED, 0)
ActorEventPacket::create($this->animal->getId(), ActorEvent::BABY_ANIMAL_FEED, 0, null)
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(private Animal $animal){}

public function encode() : array{
return [
ActorEventPacket::create($this->animal->getId(), ActorEvent::LOVE_PARTICLES, 0)
ActorEventPacket::create($this->animal->getId(), ActorEvent::LOVE_PARTICLES, 0, null)
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function encode() : array{
[$netId, $netData] = TypeConverter::getInstance()->getItemTranslator()->toNetworkId($this->item);
return [
//TODO: need to check the data values
ActorEventPacket::create($this->entity->getId(), ActorEvent::EATING_ITEM, ($netId << 16) | $netData)
ActorEventPacket::create($this->entity->getId(), ActorEvent::EATING_ITEM, ($netId << 16) | $netData, null)
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(private Animal $animal){}

public function encode() : array{
return [
ActorEventPacket::create($this->animal->getId(), ActorEvent::EAT_GRASS_ANIMATION, 0)
ActorEventPacket::create($this->animal->getId(), ActorEvent::EAT_GRASS_ANIMATION, 0, null)
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(private IronGolem $golem, private int $durationTicks

public function encode() : array{
return [
ActorEventPacket::create($this->golem->getId(), ActorEvent::IRON_GOLEM_OFFER_FLOWER, $this->durationTicks)
ActorEventPacket::create($this->golem->getId(), ActorEvent::IRON_GOLEM_OFFER_FLOWER, $this->durationTicks, null)
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(private IronGolem $golem){}

public function encode() : array{
return [
ActorEventPacket::create($this->golem->getId(), ActorEvent::IRON_GOLEM_WITHDRAW_FLOWER, 0)
ActorEventPacket::create($this->golem->getId(), ActorEvent::IRON_GOLEM_WITHDRAW_FLOWER, 0, null)
];
}
}
3 changes: 2 additions & 1 deletion src/IvanCraft623/MobPlugin/sound/EntityPlopSound.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function encode(Vector3 $pos) : array{
$this->entity::getNetworkTypeId(),
false, //TODO: does isBaby have any relevance here?
false,
$this->entity->getId()
$this->entity->getId(),
null
)];
}
}
3 changes: 2 additions & 1 deletion src/IvanCraft623/MobPlugin/sound/EntityShootSound.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function encode(Vector3 $pos) : array{
$this->entity::getNetworkTypeId(),
false, //TODO: does isBaby have any relevance here?
false,
$this->entity->getId()
$this->entity->getId(),
null
)];
}
}
3 changes: 2 additions & 1 deletion src/IvanCraft623/MobPlugin/sound/EntityStareSound.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function encode(Vector3 $pos) : array{
$this->entity::getNetworkTypeId(),
false, //TODO: does isBaby have any relevance here?
false,
$this->entity->getId()
$this->entity->getId(),
null
)];
}
}
3 changes: 2 additions & 1 deletion src/IvanCraft623/MobPlugin/sound/IronGolemCrackSound.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function encode(Vector3 $pos) : array{
$this->entity::getNetworkTypeId(),
false,
false,
$this->entity->getId()
$this->entity->getId(),
null
)];
}
}
3 changes: 2 additions & 1 deletion src/IvanCraft623/MobPlugin/sound/IronGolemRepairSound.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function encode(Vector3 $pos) : array{
$this->entity::getNetworkTypeId(),
false,
false,
$this->entity->getId()
$this->entity->getId(),
null
)];
}
}
3 changes: 2 additions & 1 deletion src/IvanCraft623/MobPlugin/sound/MobWarningSound.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public function encode(Vector3 $pos) : array{
$this->entity::getNetworkTypeId(),
$isBaby,
false,
$this->entity->getId()
$this->entity->getId(),
null
)];
}
}
3 changes: 2 additions & 1 deletion src/IvanCraft623/MobPlugin/sound/ThrowSound.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function encode(Vector3 $pos) : array{
$this->entity::getNetworkTypeId(),
false,
false,
$this->entity->getId()
$this->entity->getId(),
null
)];
}
}