mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 01:16:15 +00:00
Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/17364003235
This commit is contained in:
@ -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).
|
||||
|
@ -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";
|
||||
|
||||
|
@ -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{
|
||||
|
@ -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()){
|
||||
|
Reference in New Issue
Block a user