Unknown inventory change protection

This commit is contained in:
BuildTools 2016-04-25 17:50:26 +02:00 committed by Olof Larsson
parent 4ab784e1e0
commit 0255042f28
No known key found for this signature in database
GPG Key ID: BBEF14F97DA52474

View File

@ -523,9 +523,8 @@ public class InventoryUtil
{
switch (action)
{
// TODO
case UNKNOWN:
break;
// What is the best thing to do?
case UNKNOWN: return InventoryAlter.BOTH;
// Possibly both
case HOTBAR_SWAP:
@ -564,6 +563,9 @@ public class InventoryUtil
}
else
{
// What is the best thing to do?
if (action == InventoryAction.UNKNOWN) return InventoryAlter.BOTH;
if (action == InventoryAction.MOVE_TO_OTHER_INVENTORY) return InventoryAlter.GIVE;
// This one will possibly take, but we cannot be 100% sure.