Merge 'minor-next' into 'major-next'

Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/17364003235
This commit is contained in:
pmmp-admin-bot[bot]
2025-09-01 00:03:51 +00:00
4 changed files with 14 additions and 22 deletions

View File

@ -127,3 +127,9 @@ Consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if
## Internals
- `BlockStateUpgrader` is now almost entirely independent from `BlockStateData`. It's anticipated that the upgrader library will be separable from the core in the future.
- `Block->readStateFromWorld()` is now triggered on chunk load for any position containing a tile. This should allow more effective updating of blocks with properties in their tiles.
# 5.33.1
Released 31st August 2025.
## Fixes
- Fixed banners placed in prior versions getting their tiles deleted (due to missing `Type` tags).

View File

@ -31,7 +31,7 @@ use function str_repeat;
final class VersionInfo{
public const NAME = "PocketMine-MP";
public const BASE_VERSION = "5.33.1";
public const BASE_VERSION = "5.33.2";
public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_CHANNEL = "stable";

View File

@ -82,7 +82,7 @@ class Banner extends Spawnable{
}
}
$this->type = $nbt->getInt(self::TAG_TYPE);
$this->type = $nbt->getInt(self::TAG_TYPE, self::TYPE_NORMAL);
}
protected function writeSaveData(CompoundTag $nbt) : void{

View File

@ -30,13 +30,11 @@ use pocketmine\inventory\transaction\action\SlotChangeAction;
use pocketmine\item\Item;
use pocketmine\player\Player;
use pocketmine\utils\Utils;
use function array_keys;
use function array_values;
use function assert;
use function count;
use function get_class;
use function min;
use function shuffle;
use function spl_object_hash;
use function spl_object_id;
@ -95,10 +93,13 @@ class InventoryTransaction{
}
/**
* Returns an **unordered** set of actions involved in this transaction.
* Returns a set of actions involved in this transaction.
*
* WARNING: This system is **explicitly designed NOT to care about ordering**. Any order seen in this set has NO
* significance and should not be relied on.
* Note: This system is designed to care only about item balances. While you can usually assume that the actions
* are provided in the correct order, it will still successfully complete transactions whose actions are provided in
* the "wrong" order, as long as the transaction balances.
* For example, you may see that an action setting a slot to a particular item may appear before the action that
* removes that item from its original slot. While unintuitive, this is still valid.
*
* @return InventoryAction[]
* @phpstan-return array<int, InventoryAction>
@ -118,19 +119,6 @@ class InventoryTransaction{
}
}
/**
* Shuffles actions in the transaction to prevent external things relying on any implicit ordering.
*/
private function shuffleActions() : void{
$keys = array_keys($this->actions);
shuffle($keys);
$actions = [];
foreach($keys as $key){
$actions[$key] = $this->actions[$key];
}
$this->actions = $actions;
}
/**
* @param Item[] $needItems
* @param Item[] $haveItems
@ -307,8 +295,6 @@ class InventoryTransaction{
throw new TransactionValidationException("Transaction has already been executed");
}
$this->shuffleActions();
$this->validate();
if(!$this->callExecuteEvent()){