mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 20:07:09 +00:00
Fixed matchItems corrupting CraftingTransaction internal state on repeated validation
This bug became apparent while developing a more robust fix for 1.16 crafting.
This commit is contained in:
parent
df2c3136c9
commit
756840f11d
@ -136,6 +136,8 @@ class InventoryTransaction{
|
||||
* @throws TransactionValidationException
|
||||
*/
|
||||
protected function matchItems(array &$needItems, array &$haveItems) : void{
|
||||
$needItems = [];
|
||||
$haveItems = [];
|
||||
foreach($this->actions as $key => $action){
|
||||
if(!$action->getTargetItem()->isNull()){
|
||||
$needItems[] = $action->getTargetItem();
|
||||
|
Loading…
x
Reference in New Issue
Block a user