From 399824c31c0986459bac3cbb828c04a7a75a5519 Mon Sep 17 00:00:00 2001 From: Covered123 <58715544+JavierLeon9966@users.noreply.github.com> Date: Sun, 14 Nov 2021 11:15:36 -0300 Subject: [PATCH 1/2] Add correct drop for Podzol (#4573) --- src/block/Podzol.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/block/Podzol.php b/src/block/Podzol.php index 8da535c54..0eeba12c8 100644 --- a/src/block/Podzol.php +++ b/src/block/Podzol.php @@ -23,6 +23,13 @@ declare(strict_types=1); namespace pocketmine\block; +use pocketmine\item\Item; + class Podzol extends Opaque{ + public function getDropsForCompatibleTool(Item $item) : array{ + return [ + VanillaBlocks::DIRT()->asItem() + ]; + } } From d4a382d56837a6cc5cd6f8de9dc9fa632ea6648f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AD=E3=82=89=E3=81=B2=E3=81=8B=E3=81=A0?= Date: Mon, 15 Nov 2021 00:40:20 +0900 Subject: [PATCH 2/2] Fix position of setworldspawn command (#4574) * The world spawn position is no longer rounded * Remove round() since the position is always int --- src/command/defaults/SetWorldSpawnCommand.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/command/defaults/SetWorldSpawnCommand.php b/src/command/defaults/SetWorldSpawnCommand.php index 9bd37db98..1257e388f 100644 --- a/src/command/defaults/SetWorldSpawnCommand.php +++ b/src/command/defaults/SetWorldSpawnCommand.php @@ -32,7 +32,6 @@ use pocketmine\permission\DefaultPermissionNames; use pocketmine\player\Player; use pocketmine\utils\TextFormat; use function count; -use function round; class SetWorldSpawnCommand extends VanillaCommand{ @@ -54,7 +53,7 @@ class SetWorldSpawnCommand extends VanillaCommand{ if($sender instanceof Player){ $location = $sender->getPosition(); $world = $location->getWorld(); - $pos = $location->asVector3()->round(); + $pos = $location->asVector3()->floor(); }else{ $sender->sendMessage(TextFormat::RED . "You can only perform this command as a player"); @@ -69,7 +68,7 @@ class SetWorldSpawnCommand extends VanillaCommand{ $world->setSpawnLocation($pos); - Command::broadcastCommandMessage($sender, KnownTranslationFactory::commands_setworldspawn_success((string) round($pos->x, 2), (string) round($pos->y, 2), (string) round($pos->z, 2))); + Command::broadcastCommandMessage($sender, KnownTranslationFactory::commands_setworldspawn_success((string) $pos->x, (string) $pos->y, (string) $pos->z)); return true; }