diff --git a/build/php b/build/php index 19222cfb2..8138c6a4a 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit 19222cfb2867869cfc9b96fbc5f6cdbd601f5e8b +Subproject commit 8138c6a4a4a5b38047b9a5043c5aa0cefc32ee71 diff --git a/changelogs/4.3.md b/changelogs/4.3.md index b5ebafe52..b7149c752 100644 --- a/changelogs/4.3.md +++ b/changelogs/4.3.md @@ -30,3 +30,16 @@ Released 10th May 2022. ## Documentation - Added more documentation in the template `pocketmine.yml` for the `aliases` config section. - Removed useless doc comment in `PlayerChangeSkinEvent`. + +# 4.3.3 +Released 16th May 2022. + +## General +- Improved display of parameters in exception stack trace logs. +- Exception stack traces now include names for dynamic named arguments (i.e. arguments that don't match any parameter of the function), if any were given. + - Note: Named arguments which do match parameters are not shown this way, since PHP reduces them to positional arguments for performance reasons. + +## Fixes +- Fixed server crash when chunks are unloaded during chunk generation callbacks +- Fixed dead coral fan items placing coral fans in the wrong orientation. +- Fixed max stack size of boat items. diff --git a/src/item/ItemFactory.php b/src/item/ItemFactory.php index c38268c41..15894b921 100644 --- a/src/item/ItemFactory.php +++ b/src/item/ItemFactory.php @@ -81,11 +81,26 @@ class ItemFactory{ $this->register(new Clock(new ItemIdentifier(ItemIds::CLOCK, 0), "Clock")); $this->register(new Clownfish(new ItemIdentifier(ItemIds::CLOWNFISH, 0), "Clownfish")); $this->register(new Coal(new ItemIdentifier(ItemIds::COAL, 0), "Coal")); - $this->register(new ItemBlockWallOrFloor(new ItemIdentifier(ItemIds::CORAL_FAN, 0), VanillaBlocks::CORAL_FAN()->setCoralType(CoralType::TUBE()), VanillaBlocks::WALL_CORAL_FAN()->setCoralType(CoralType::TUBE())), true); - $this->register(new ItemBlockWallOrFloor(new ItemIdentifier(ItemIds::CORAL_FAN, 1), VanillaBlocks::CORAL_FAN()->setCoralType(CoralType::BRAIN()), VanillaBlocks::WALL_CORAL_FAN()->setCoralType(CoralType::BRAIN())), true); - $this->register(new ItemBlockWallOrFloor(new ItemIdentifier(ItemIds::CORAL_FAN, 2), VanillaBlocks::CORAL_FAN()->setCoralType(CoralType::BUBBLE()), VanillaBlocks::WALL_CORAL_FAN()->setCoralType(CoralType::BUBBLE())), true); - $this->register(new ItemBlockWallOrFloor(new ItemIdentifier(ItemIds::CORAL_FAN, 3), VanillaBlocks::CORAL_FAN()->setCoralType(CoralType::FIRE()), VanillaBlocks::WALL_CORAL_FAN()->setCoralType(CoralType::FIRE())), true); - $this->register(new ItemBlockWallOrFloor(new ItemIdentifier(ItemIds::CORAL_FAN, 4), VanillaBlocks::CORAL_FAN()->setCoralType(CoralType::HORN()), VanillaBlocks::WALL_CORAL_FAN()->setCoralType(CoralType::HORN())), true); + + foreach([ + 0 => CoralType::TUBE(), + 1 => CoralType::BRAIN(), + 2 => CoralType::BUBBLE(), + 3 => CoralType::FIRE(), + 4 => CoralType::HORN() + ] as $meta => $coralType){ + $this->register(new ItemBlockWallOrFloor( + new ItemIdentifier(ItemIds::CORAL_FAN, $meta), + VanillaBlocks::CORAL_FAN()->setCoralType($coralType)->setDead(false), + VanillaBlocks::WALL_CORAL_FAN()->setCoralType($coralType)->setDead(false) + ), true); + $this->register(new ItemBlockWallOrFloor( + new ItemIdentifier(ItemIds::CORAL_FAN_DEAD, $meta), + VanillaBlocks::CORAL_FAN()->setCoralType($coralType)->setDead(true), + VanillaBlocks::WALL_CORAL_FAN()->setCoralType($coralType)->setDead(true) + ), true); + } + $this->register(new Coal(new ItemIdentifier(ItemIds::COAL, 1), "Charcoal")); $this->register(new CocoaBeans(new ItemIdentifier(ItemIds::DYE, 3), "Cocoa Beans")); $this->register(new Compass(new ItemIdentifier(ItemIds::COMPASS, 0), "Compass"));