mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-05 19:37:17 +00:00
InventoryTransaction: Fixed indexes persisting from balance calculation in crafting input/outputs
fixes #4019 the order of the actual items may not be the same across runs, but index 0 will at least be sure to exist.
This commit is contained in:
parent
bef906b0f0
commit
1a24afc6d1
@ -30,6 +30,7 @@ use pocketmine\inventory\transaction\action\SlotChangeAction;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\Player;
|
||||
use function array_keys;
|
||||
use function array_values;
|
||||
use function assert;
|
||||
use function count;
|
||||
use function get_class;
|
||||
@ -168,6 +169,8 @@ class InventoryTransaction{
|
||||
}
|
||||
}
|
||||
}
|
||||
$needItems = array_values($needItems);
|
||||
$haveItems = array_values($haveItems);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user