Unknown inventory change protection

This commit is contained in:
BuildTools authored and Olof Larsson committed 2016-04-25 17:53:10 +02:00
1 parent 4ab784e1e0
commit 0255042f28
1 file changed
+5 -3
@@ -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.