fix incorrect conversion of CreateItemAction, close #3436 (#3437)

This commit is contained in:
Muqsit Rayyan 2020-04-25 14:21:40 +05:00 committed by GitHub
parent 1f7f33d35d
commit b1eff87ad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,7 +183,7 @@ class TypeConverter{
case NetworkInventoryAction::ACTION_MAGIC_SLOT_CREATIVE_DELETE_ITEM: case NetworkInventoryAction::ACTION_MAGIC_SLOT_CREATIVE_DELETE_ITEM:
return new DestroyItemAction($new); return new DestroyItemAction($new);
case NetworkInventoryAction::ACTION_MAGIC_SLOT_CREATIVE_CREATE_ITEM: case NetworkInventoryAction::ACTION_MAGIC_SLOT_CREATIVE_CREATE_ITEM:
return new CreateItemAction($new); return new CreateItemAction($old);
default: default:
throw new \UnexpectedValueException("Unexpected creative action type $action->inventorySlot"); throw new \UnexpectedValueException("Unexpected creative action type $action->inventorySlot");