diff --git a/gradle.properties b/gradle.properties index bab4099..d01f528 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.11.6 # Mod Properties - mod_version = 1.17.1.1 + mod_version = 1.17.1.2 maven_group = de.jottyfan.minecraft archives_base_name = quickiefabric diff --git a/src/main/java/de/jottyfan/minecraft/quickiefabric/container/BackpackScreenHandler.java b/src/main/java/de/jottyfan/minecraft/quickiefabric/container/BackpackScreenHandler.java index 6a381a1..55a9b79 100644 --- a/src/main/java/de/jottyfan/minecraft/quickiefabric/container/BackpackScreenHandler.java +++ b/src/main/java/de/jottyfan/minecraft/quickiefabric/container/BackpackScreenHandler.java @@ -74,15 +74,35 @@ public class BackpackScreenHandler extends ScreenHandler { ItemStack stack = slot == null ? ItemStack.EMPTY : slot.getStack(); if (actionType.equals(SlotActionType.PICKUP) || actionType.equals(SlotActionType.PICKUP_ALL) || actionType.equals(SlotActionType.SWAP)) { + super.onSlotClick(slotId, quickCraftData, actionType, playerEntity); + } else if (actionType.equals(SlotActionType.THROW)) { // pickup from the active items line if (stack.getName().equals(thisStack.getName())) { return; // omit to put the backpack into itself; as a side effect, omits adding same - // colored backpacks into this one + // colored backpacks into this one + } else { + // do not throw but pickup + super.onSlotClick(slotId, quickCraftData, SlotActionType.PICKUP, playerEntity); + } + } else if (actionType.equals(SlotActionType.QUICK_CRAFT)) { // drag - but does not drag the right slot content + if (slotId < 0) { + return; // do not execute anything if slotId is < 0 as sometimes -999 + } + if (playerEntity.world.isClient) { + LOGGER.debug("ignoring action type {} on slotId {} for {} x {}", actionType.toString(), slotId, + stack.getCount(), stack.getItem().toString()); + } + } else if (actionType.equals(SlotActionType.QUICK_MOVE)) { // shift click + if (stack.getName().equals(thisStack.getName())) { + return; // omit to put the backpack into itself; as a side effect, omits adding same + // colored backpacks into this one + } else { + // do not move but pickup all + super.onSlotClick(slotId, quickCraftData, SlotActionType.PICKUP_ALL, playerEntity); } - super.onSlotClick(slotId, quickCraftData, actionType, playerEntity); } else { if (playerEntity.world.isClient) { - LOGGER.debug("ignoring action type {} on slotId {} for {} x {}", actionType.toString(), slotId, stack.getCount(), - stack.getItem().toString()); + LOGGER.debug("ignoring action type {} on slotId {} for {} x {}", actionType.toString(), slotId, + stack.getCount(), stack.getItem().toString()); } } }