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