From ff12c2bb778724f4e82a38a5318ce59198c96ae4 Mon Sep 17 00:00:00 2001 From: Kittychanley Date: Thu, 30 Jul 2015 13:56:42 -0500 Subject: [PATCH] Shift click to back slot only if quiver or item that would overburden the player. If the back slot is full, shift click will toggle the item between the inventory and the hotbar. --- src/Common/com/bioxx/tfc/Containers/ContainerPlayerTFC.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Common/com/bioxx/tfc/Containers/ContainerPlayerTFC.java b/src/Common/com/bioxx/tfc/Containers/ContainerPlayerTFC.java index 0b6db5b39..195d82a4a 100644 --- a/src/Common/com/bioxx/tfc/Containers/ContainerPlayerTFC.java +++ b/src/Common/com/bioxx/tfc/Containers/ContainerPlayerTFC.java @@ -15,6 +15,7 @@ import com.bioxx.tfc.Handlers.CraftingHandler; import com.bioxx.tfc.Handlers.FoodCraftingHandler; import com.bioxx.tfc.Items.ItemTFCArmor; +import com.bioxx.tfc.api.TFCItems; import com.bioxx.tfc.api.Interfaces.IEquipable; import com.bioxx.tfc.api.Interfaces.IEquipable.EquipType; import com.bioxx.tfc.api.Interfaces.IFood; @@ -143,10 +144,10 @@ else if (!((Slot) this.inventorySlots.get(armorSlotNum)).getHasStack()) } } // From inventory to back slot - else if (origStack.getItem() instanceof IEquipable) + else if (!equipmentSlot.getHasStack() && origStack.getItem() instanceof IEquipable) { IEquipable equipment = (IEquipable) origStack.getItem(); - if (!equipmentSlot.getHasStack() && equipment.getEquipType(origStack) == EquipType.BACK) + if (equipment.getEquipType(origStack) == EquipType.BACK && (equipment == TFCItems.Quiver || equipment.getTooHeavyToCarry(origStack))) { ItemStack backStack = slotStack.copy(); backStack.stackSize = 1;