mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Merge branch 'next-minor'
This commit is contained in:
commit
81dff6d4c5
@ -93,7 +93,7 @@ class ParticleCommand extends VanillaCommand{
|
|||||||
|
|
||||||
if($sender instanceof Player){
|
if($sender instanceof Player){
|
||||||
$senderPos = $sender->getPosition();
|
$senderPos = $sender->getPosition();
|
||||||
$world = $senderPos->getWorld();
|
$world = $senderPos->getWorldNonNull();
|
||||||
$pos = new Vector3(
|
$pos = new Vector3(
|
||||||
$this->getRelativeDouble($senderPos->getX(), $sender, $args[1]),
|
$this->getRelativeDouble($senderPos->getX(), $sender, $args[1]),
|
||||||
$this->getRelativeDouble($senderPos->getY(), $sender, $args[2], 0, World::Y_MAX),
|
$this->getRelativeDouble($senderPos->getY(), $sender, $args[2], 0, World::Y_MAX),
|
||||||
|
@ -52,7 +52,7 @@ class SetWorldSpawnCommand extends VanillaCommand{
|
|||||||
if(count($args) === 0){
|
if(count($args) === 0){
|
||||||
if($sender instanceof Player){
|
if($sender instanceof Player){
|
||||||
$location = $sender->getPosition();
|
$location = $sender->getPosition();
|
||||||
$world = $location->getWorld();
|
$world = $location->getWorldNonNull();
|
||||||
$pos = $location->asVector3()->round();
|
$pos = $location->asVector3()->round();
|
||||||
}else{
|
}else{
|
||||||
$sender->sendMessage(TextFormat::RED . "You can only perform this command as a player");
|
$sender->sendMessage(TextFormat::RED . "You can only perform this command as a player");
|
||||||
|
@ -83,7 +83,7 @@ class SpawnpointCommand extends VanillaCommand{
|
|||||||
}elseif(count($args) <= 1){
|
}elseif(count($args) <= 1){
|
||||||
if($sender instanceof Player){
|
if($sender instanceof Player){
|
||||||
$cpos = $sender->getPosition();
|
$cpos = $sender->getPosition();
|
||||||
$pos = Position::fromObject($cpos->floor(), $cpos->getWorld());
|
$pos = Position::fromObject($cpos->floor(), $cpos->getWorldNonNull());
|
||||||
$target->setSpawn($pos);
|
$target->setSpawn($pos);
|
||||||
|
|
||||||
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.spawnpoint.success", [$target->getName(), round($pos->x, 2), round($pos->y, 2), round($pos->z, 2)]));
|
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.spawnpoint.success", [$target->getName(), round($pos->x, 2), round($pos->y, 2), round($pos->z, 2)]));
|
||||||
|
@ -63,7 +63,7 @@ class Bow extends Tool{
|
|||||||
$baseForce = min((($p ** 2) + $p * 2) / 3, 1);
|
$baseForce = min((($p ** 2) + $p * 2) / 3, 1);
|
||||||
|
|
||||||
/** @var ArrowEntity $entity */
|
/** @var ArrowEntity $entity */
|
||||||
$entity = EntityFactory::getInstance()->create(ArrowEntity::class, $location->getWorld(), $nbt, $player, $baseForce >= 1);
|
$entity = EntityFactory::getInstance()->create(ArrowEntity::class, $location->getWorldNonNull(), $nbt, $player, $baseForce >= 1);
|
||||||
|
|
||||||
$infinity = $this->hasEnchantment(Enchantment::INFINITY());
|
$infinity = $this->hasEnchantment(Enchantment::INFINITY());
|
||||||
if($infinity){
|
if($infinity){
|
||||||
|
@ -60,7 +60,7 @@ abstract class ProjectileItem extends Item{
|
|||||||
Utils::testValidInstance($class, Throwable::class);
|
Utils::testValidInstance($class, Throwable::class);
|
||||||
|
|
||||||
/** @var Throwable $projectile */
|
/** @var Throwable $projectile */
|
||||||
$projectile = EntityFactory::getInstance()->create($class, $location->getWorld(), $nbt, $player);
|
$projectile = EntityFactory::getInstance()->create($class, $location->getWorldNonNull(), $nbt, $player);
|
||||||
$projectile->setMotion($projectile->getMotion()->multiply($this->getThrowForce()));
|
$projectile->setMotion($projectile->getMotion()->multiply($this->getThrowForce()));
|
||||||
|
|
||||||
$projectileEv = new ProjectileLaunchEvent($projectile);
|
$projectileEv = new ProjectileLaunchEvent($projectile);
|
||||||
|
@ -300,11 +300,6 @@ parameters:
|
|||||||
count: 1
|
count: 1
|
||||||
path: ../../../src/inventory/transaction/CraftingTransaction.php
|
path: ../../../src/inventory/transaction/CraftingTransaction.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#2 \\$world of method pocketmine\\\\entity\\\\EntityFactory\\:\\:create\\(\\) expects pocketmine\\\\world\\\\World, pocketmine\\\\world\\\\World\\|null given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../../src/item/Bow.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method pocketmine\\\\item\\\\Item\\:\\:getNamedTag\\(\\) should return pocketmine\\\\nbt\\\\tag\\\\CompoundTag but returns pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\|null\\.$#"
|
message: "#^Method pocketmine\\\\item\\\\Item\\:\\:getNamedTag\\(\\) should return pocketmine\\\\nbt\\\\tag\\\\CompoundTag but returns pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\|null\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
@ -325,11 +320,6 @@ parameters:
|
|||||||
count: 1
|
count: 1
|
||||||
path: ../../../src/item/Item.php
|
path: ../../../src/item/Item.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#2 \\$world of method pocketmine\\\\entity\\\\EntityFactory\\:\\:create\\(\\) expects pocketmine\\\\world\\\\World, pocketmine\\\\world\\\\World\\|null given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../../src/item/ProjectileItem.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method pocketmine\\\\item\\\\enchantment\\\\Enchantment\\:\\:BLAST_PROTECTION\\(\\) should return pocketmine\\\\item\\\\enchantment\\\\Enchantment but returns pocketmine\\\\item\\\\enchantment\\\\Enchantment\\|null\\.$#"
|
message: "#^Method pocketmine\\\\item\\\\enchantment\\\\Enchantment\\:\\:BLAST_PROTECTION\\(\\) should return pocketmine\\\\item\\\\enchantment\\\\Enchantment but returns pocketmine\\\\item\\\\enchantment\\\\Enchantment\\|null\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user