Skip to content

Commit c25de36

Browse files
committed
Config improvements for colors and bundle packets, plus other misc
1 parent 7ec9bb0 commit c25de36

12 files changed

Lines changed: 102 additions & 58 deletions

File tree

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fabric_api_version=0.119.4+1.21.4
1414

1515
# Mod Properties
1616
#1 = MaLiLib config, MapArtAutoPlace, Modrinth release
17-
#1 = (PLANNED): new bundle copy, new caching, support non-QWERTY?
17+
#1 = new bundle copy, anti-accidental-rotate,
1818
mod_id=evmod
1919
mod_name=Ev's Mod
2020
mod_version=1.1
@@ -28,7 +28,6 @@ malilib_version=1.21.4-0.23.2
2828
malilib_dependency=~0.23.2
2929

3030

31-
3231
# Store gradle downloads in OneDrive
3332
#Edit: nevermind, gradlew already uses ~.gradle (in EvMod dir), plus this setting doesn't appear to work with rektive paths anyway
3433
#systemProp.gradle.user.home=~/OneDrive/Minecraft/Development/Libraries/.gradle

src/main/java/net/evmodder/evmod/Configs.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ public class Configs implements IConfigHandler{
2525

2626
private static final String GENERIC_KEY = Main.MOD_ID+".config.generic";
2727
public static class Generic{
28-
public static final ConfigInteger CLICK_LIMIT_COUNT = new ConfigInteger("clickLimitCount", 69, 0, 100_000).apply(GENERIC_KEY);
29-
public static final ConfigInteger CLICK_LIMIT_DURATION = new ConfigInteger("clickLimitWindow", 99, 1, 72_000).apply(GENERIC_KEY);
28+
public static final ConfigInteger CLICK_LIMIT_COUNT = new ConfigInteger("clickLimitCount", 74, 0, 100_000).apply(GENERIC_KEY);
29+
public static final ConfigInteger CLICK_LIMIT_DURATION = new ConfigInteger("clickLimitWindow", 81, 1, 72_000).apply(GENERIC_KEY);
3030
public static final ConfigBoolean CLICK_LIMIT_USER_INPUT = new ConfigBoolean("clickLimitUserInputs", true).apply(GENERIC_KEY);
3131
public static final ConfigBoolean CLICK_FILTER_USER_INPUT = new ConfigBoolean("clickBlockUserInputsDuringOperation", true).apply(GENERIC_KEY);
3232

33+
public static final ConfigBoolean BUNDLE_SELECT_PACKET = new ConfigBoolean("selectBundleSlotsPacket", true).apply(GENERIC_KEY);
3334
public static final ConfigBoolean BUNDLE_SELECT_REVERSED = new ConfigBoolean("selectBundleSlotsInReverse", true).apply(GENERIC_KEY);
3435

3536
public static final ConfigOptionList MAP_STATE_CACHE = new ConfigOptionList("mapStateCache",
@@ -97,8 +98,8 @@ public static final List<IConfigBase> getOptions(){
9798
if(availableOptions == null){
9899
Main main = Main.getInstance();
99100
availableOptions = new ArrayList<>();
100-
availableOptions.addAll(List.of(CLICK_LIMIT_COUNT, CLICK_LIMIT_DURATION, CLICK_LIMIT_USER_INPUT, CLICK_FILTER_USER_INPUT));
101-
if(main.placementHelperMapArt) availableOptions.add(BUNDLE_SELECT_REVERSED);
101+
availableOptions.addAll(List.of(CLICK_LIMIT_COUNT, CLICK_LIMIT_DURATION, CLICK_LIMIT_USER_INPUT, CLICK_FILTER_USER_INPUT,
102+
BUNDLE_SELECT_PACKET, BUNDLE_SELECT_REVERSED));
102103
if((main.serverJoinListener && main.serverQuitListener) || main.containerOpenCloseListener != null){
103104
availableOptions.add(MAP_STATE_CACHE);
104105
// if(MAP_STATE_CACHE.getOptionListValue() != MapStateCacheOption.OFF) availableOptions.add(MAP_STATE_CACHE_TYPE);
@@ -163,7 +164,7 @@ public static class Visuals{
163164
public static final ConfigColor MAP_COLOR_IN_INV = new ConfigColor("highlightColorInInv", "#FFB4FFFF").apply(VISUALS_KEY); // 11862015 Aqua
164165
public static final ConfigColor MAP_COLOR_IN_IFRAME = new ConfigColor("highlightColorInIFrame", "#FF55AAE6").apply(VISUALS_KEY); // 5614310 Blue
165166
public static final ConfigColor MAP_COLOR_MULTI_IFRAME = new ConfigColor("highlightColorMultiIFrame", "#FFB450E6").apply(VISUALS_KEY); // 11817190 Purple
166-
public static final ConfigColor MAP_COLOR_MULTI_INV = new ConfigColor("highlightColorMultiInv", "#FFB450E6").apply(VISUALS_KEY); // 11817190 Purple
167+
public static final ConfigColor MAP_COLOR_MULTI_CONTAINER = new ConfigColor("highlightColorMultiContainer", "#FFB450E6").apply(VISUALS_KEY); // 11817190 Purple
167168

168169
// public static final ConfigBoolean MAP_METADATA_TOOLTIP = new ConfigBoolean("mapMetadataTooltip", true);
169170
public static final ConfigBoolean MAP_METADATA_TOOLTIP_STAIRCASE = new ConfigBoolean("mapMetadataTooltipStaircase", true).apply(VISUALS_KEY);
@@ -198,8 +199,9 @@ public static final List<IConfigBase> getOptions(){
198199
availableOptions.addAll(List.of(
199200
MAP_HIGHLIGHT_IN_INV_INCLUDE_BUNDLES,
200201

201-
MAP_COLOR_UNLOADED, MAP_COLOR_UNLOCKED, MAP_COLOR_UNNAMED, MAP_COLOR_NOT_IN_GROUP,
202-
MAP_COLOR_IN_INV, MAP_COLOR_IN_IFRAME, MAP_COLOR_MULTI_IFRAME, MAP_COLOR_MULTI_INV
202+
MAP_COLOR_IN_INV, MAP_COLOR_NOT_IN_GROUP, MAP_COLOR_UNLOCKED,
203+
MAP_COLOR_UNLOADED, MAP_COLOR_UNNAMED, MAP_COLOR_IN_IFRAME,
204+
MAP_COLOR_MULTI_IFRAME, MAP_COLOR_MULTI_CONTAINER
203205
));
204206
}
205207
if(main.tooltipMapMetadata) availableOptions.addAll(List.of(
@@ -230,7 +232,6 @@ public static class Hotkeys{
230232
public static final ConfigHotkey OPEN_CONFIG_GUI = new ConfigHotkey("openConfigGui", "M,N").apply(HOTKEYS_KEY);
231233

232234
public static final ConfigHotkey MAP_COPY = new ConfigHotkey("mapCopy", "T", KeybindSettings.GUI).apply(HOTKEYS_KEY);
233-
public static final ConfigBoolean MAP_COPY_BUNDLE_BETA = new ConfigBoolean("mapCopyBundleSelectPacket", true).apply(HOTKEYS_KEY);
234235
public static final ConfigHotkey MAP_LOAD = new ConfigHotkey("mapLoad", "E", KeybindSettings.GUI).apply(HOTKEYS_KEY);
235236
public static final ConfigHotkey MAP_MOVE = new ConfigHotkey("mapMove", "T", GUI_ALLOW_EXTRA_KEYS).apply(HOTKEYS_KEY);
236237
public static final ConfigHotkey MAP_MOVE_BUNDLE = new ConfigHotkey("mapMoveBundle", "D", KeybindSettings.GUI).apply(HOTKEYS_KEY);
@@ -349,7 +350,7 @@ public static final List<IConfigBase> getOptions(){
349350
availableOptions = new ArrayList<>();
350351
availableOptions.addAll(List.of(
351352
OPEN_CONFIG_GUI,
352-
MAP_COPY, MAP_COPY_BUNDLE_BETA, MAP_LOAD, MAP_MOVE, MAP_MOVE_BUNDLE, MAP_MOVE_BUNDLE_REVERSE,
353+
MAP_COPY, MAP_LOAD, MAP_MOVE, MAP_MOVE_BUNDLE, MAP_MOVE_BUNDLE_REVERSE,
353354
MAP_CLICK_MOVE_NEIGHBORS, MAP_CLICK_MOVE_NEIGHBORS_KEY
354355
));
355356
if(!Main.mapArtFeaturesOnly) availableOptions.addAll(List.of(

src/main/java/net/evmodder/evmod/Main.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
public class Main{
5151
// Splash potion harming, weakness (spider eyes, sugar, gunpowder, brewing stand)
5252
//TODO:
53-
// AutoMapPlacer (for LVotU)
54-
// fix the JANKY BROKENESS of MapMove when count==2 (i think selective move?)
55-
// GUI: StringHotkeyed, SlotListHotkeyed, YawPitchHotkeyed, UUIDList/PlayerList, ServerAddress(addr:port)
53+
// map load from bundle skip loaded maps
54+
// new caching, support non-QWERTY?
55+
// GUI: StringHotkeyed, SlotListHotkeyed, ServerAddress(addr:port)
5656

5757
// Investigate https://github.com/Siphalor/amecs-api (potential better alternative to MaLiLib?)
5858

src/main/java/net/evmodder/evmod/keybinds/KeybindMapCopy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ private void copyMapArtInBundles(final ArrayDeque<InvAction> clicks, final ItemS
184184
final BundleContentsComponent[] bundles = Arrays.stream(slotsWithBundles)
185185
.mapToObj(i -> slots[i].get(DataComponentTypes.BUNDLE_CONTENTS)).toArray(BundleContentsComponent[]::new);
186186
final int SRC_BUNDLES = (int)Arrays.stream(bundles).filter(Predicate.not(BundleContentsComponent::isEmpty)).count();
187-
final boolean USE_TEMP_BUNDLE = !Configs.Hotkeys.MAP_COPY_BUNDLE_BETA.getBooleanValue();
187+
final boolean USE_TEMP_BUNDLE = !Configs.Generic.BUNDLE_SELECT_PACKET.getBooleanValue();
188188
final int USABLE_EMPTY_BUNDLES = bundles.length - SRC_BUNDLES - (USE_TEMP_BUNDLE ? 1 : 0);
189189
if(USABLE_EMPTY_BUNDLES <= 0){Main.LOGGER.warn("MapCopyBundle: Could not find a usable empty bundle"); return;}
190190
int LAST_EMPTY_SLOT = lastEmptySlot(slots, f.HOTBAR_END, f.INV_START);

src/main/java/net/evmodder/evmod/keybinds/KeybindMapLoad.java

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package net.evmodder.evmod.keybinds;
22

33
import java.util.ArrayDeque;
4-
import java.util.Arrays;
54
import java.util.Comparator;
65
import java.util.HashSet;
76
import java.util.IdentityHashMap;
87
import java.util.Optional;
98
import java.util.OptionalInt;
109
import java.util.stream.IntStream;
10+
import net.evmodder.evmod.Configs;
1111
import net.evmodder.evmod.Main;
1212
import net.evmodder.evmod.apis.ClickUtils.ActionType;
1313
import net.evmodder.evmod.apis.ClickUtils.InvAction;
@@ -59,53 +59,74 @@ private int[] getUsableHotbarButtons(MinecraftClient client){
5959
return IntStream.range(0, 9).filter(hb -> isUsable(client.player.getInventory().getStack(hb))).toArray();
6060
}
6161

62-
private final long WAIT_FOR_STATE_UPDATE = 71, STATE_LOAD_TIMEOUT = 5*1000; // 50 = 1 tick
62+
private final long WAIT_FOR_STATE_UPDATE = 101, STATE_LOAD_TIMEOUT = 5*1000; // 50 = 1 tick
6363
private long stateUpdateWaitStart, stateLoadWaitStart;
6464
private final void loadMapArtFromBundles(){
6565
// Main.LOGGER.warn("MapLoadBundle: in InventoryScreen");
6666
final MinecraftClient client = MinecraftClient.getInstance();
6767
final InventoryScreen is = (InventoryScreen)client.currentScreen;
6868
final ItemStack[] slots = is.getScreenHandler().slots.stream().map(s -> s.getStack()).toArray(ItemStack[]::new);
69-
final int[] slotsWithBundles = IntStream.range(9, 45).filter(i -> slots[i].get(DataComponentTypes.BUNDLE_CONTENTS) != null).toArray();
70-
if(slotsWithBundles.length == 0){
71-
Main.LOGGER.warn("MapLoadBundle: No bundles in inventory");
69+
final int[] slotsWithMapArtBundles = IntStream.range(9, 45).filter(i -> {
70+
BundleContentsComponent content = slots[i].get(DataComponentTypes.BUNDLE_CONTENTS);
71+
return content != null && !content.isEmpty() && content.stream().allMatch(s -> s.getItem() == Items.FILLED_MAP);
72+
}).toArray();
73+
if(slotsWithMapArtBundles.length == 0){
74+
Main.LOGGER.warn("MapLoadBundle: No mapart bundles in inventory");
7275
return;
7376
}
74-
final OptionalInt emptyBundleSlotOpt = Arrays.stream(slotsWithBundles)
75-
.filter(i -> slots[i].get(DataComponentTypes.BUNDLE_CONTENTS).getOccupancy().getNumerator() == 0).findAny();
76-
if(emptyBundleSlotOpt.isEmpty()){Main.LOGGER.warn("MapLoadBundle: Empty bundle not found"); return;}
77-
final int emptyBundleSlot = emptyBundleSlotOpt.getAsInt();
77+
final boolean USE_TEMP_BUNDLE = !Configs.Generic.BUNDLE_SELECT_PACKET.getBooleanValue();
78+
int emptyBundleSlot = -1;
79+
if(USE_TEMP_BUNDLE){
80+
final OptionalInt emptyBundleSlotOpt = IntStream.range(9, 45).filter(i -> slots[i].get(DataComponentTypes.BUNDLE_CONTENTS).isEmpty()).findAny();
81+
if(emptyBundleSlotOpt.isEmpty()){Main.LOGGER.warn("MapLoadBundle: Empty bundle not found"); return;}
82+
emptyBundleSlot = emptyBundleSlotOpt.getAsInt();
83+
}
7884
// final OptionalInt emptySlotOpt = IntStream.range(9, 45).filter(i -> slots[i].isEmpty()).min(Comparator.comparingInt(i -> Math.abs(i-emptyBundleSlot)));
7985
Optional<Integer> emptySlotOpt = IntStream.range(9, 45).filter(i -> slots[i].isEmpty()).boxed()
80-
.min(Comparator.comparingInt(i -> Math.abs(i-emptyBundleSlot)));
86+
.min(Comparator.comparingInt(i -> Math.abs(i-slotsWithMapArtBundles[0])));
8187
if(emptySlotOpt.isEmpty()){Main.LOGGER.warn("MapLoadBundle: Empty slot not found"); return;}
8288
final int emptySlot = emptySlotOpt.get();
8389

8490
final ArrayDeque<InvAction> clicks = new ArrayDeque<>();
8591
final IdentityHashMap<InvAction, Integer> ableToSkipClicks = new IdentityHashMap<>();
86-
for(int i : slotsWithBundles){
92+
for(int i : slotsWithMapArtBundles){
8793
BundleContentsComponent contents = slots[i].get(DataComponentTypes.BUNDLE_CONTENTS);
8894
if(contents.isEmpty()) continue;
89-
if(contents.stream().anyMatch(s -> s.getItem() != Items.FILLED_MAP)) continue; // Skip bundles with non-mapart contents
95+
// if(contents.stream().anyMatch(s -> s.getItem() != Items.FILLED_MAP)) continue; // Skip bundles with non-mapart contents
9096
if(contents.stream().allMatch(s -> isLoadedMapArt(client.world, s))) continue; // Skip bundles with already-loaded mapart
9197
// Main.LOGGER.info("MapLoadBundle: found bundle with "+contents.size()+" maps");
92-
for(int j=0; j<contents.size(); ++j){
93-
InvAction c;
94-
clicks.add(c=new InvAction(i, 1, ActionType.CLICK)); // Take last map from bundle
95-
clicks.add(new InvAction(emptySlot, 0, ActionType.CLICK)); // Place map in empty slot
96-
// Wait for map state to load
97-
clicks.add(new InvAction(emptySlot, 0, ActionType.CLICK)); // Take map from empty slot
98-
clicks.add(new InvAction(emptyBundleSlot, 0, ActionType.CLICK)); // Place map in empty bundle
98+
if(USE_TEMP_BUNDLE){
99+
for(int j=0; j<contents.size(); ++j){
100+
InvAction c;
101+
clicks.add(c=new InvAction(i, 1, ActionType.CLICK)); // Take last map from bundle
102+
clicks.add(new InvAction(emptySlot, 0, ActionType.CLICK)); // Place map in empty slot
103+
// Wait for map state to load
104+
clicks.add(new InvAction(emptySlot, 0, ActionType.CLICK)); // Take map from empty slot
105+
clicks.add(new InvAction(emptyBundleSlot, 0, ActionType.CLICK)); // Place map in empty bundle
99106

100-
ableToSkipClicks.put(c, 6*(contents.size()-j));
107+
ableToSkipClicks.put(c, 6*(contents.size()-j));
108+
}
109+
for(int j=0; j<contents.size(); ++j){
110+
clicks.add(new InvAction(emptyBundleSlot, 1, ActionType.CLICK)); // Take last map from empty bundle
111+
clicks.add(new InvAction(i, 0, ActionType.CLICK)); // Place map back in original bundle
112+
}
101113
}
102-
for(int j=0; j<contents.size(); ++j){
103-
clicks.add(new InvAction(emptyBundleSlot, 1, ActionType.CLICK)); // Take last map from empty bundle
104-
clicks.add(new InvAction(i, 0, ActionType.CLICK)); // Place map back in original bundle
114+
else{
115+
for(int j=0; j<contents.size(); ++j){
116+
if(contents.size() > 1){
117+
int bottomBundleSlot = Configs.Generic.BUNDLE_SELECT_REVERSED.getBooleanValue() ? contents.size()-1 : 0;
118+
clicks.add(new InvAction(i, bottomBundleSlot, ActionType.BUNDLE_SELECT)); // Select 1st map in bundle
119+
}
120+
clicks.add(new InvAction(i, 1, ActionType.CLICK)); // Take 1st map from bundle
121+
clicks.add(new InvAction(emptySlot, 0, ActionType.CLICK)); // Place map in empty slot
122+
// Wait for map state to load
123+
clicks.add(new InvAction(emptySlot, 0, ActionType.CLICK)); // Take map from empty slot
124+
clicks.add(new InvAction(i, 0, ActionType.CLICK)); // Place map back into bundle
125+
}
105126
}
106127
}
107128
if(clicks.isEmpty()){
108-
Main.LOGGER.warn("MapLoadBundle: No bundles containing mapart in inventory");
129+
Main.LOGGER.warn("MapLoadBundle: No bundles containing unloaded mapart in inventory");
109130
return; // No bundles with maps
110131
}
111132
// client.player.sendMessage(Text.literal("Scheduling clicks: "+clicks.size()), true);
@@ -134,7 +155,7 @@ private final void loadMapArtFromBundles(){
134155
Main.LOGGER.warn("MapLoadBundle: Timed out while waiting for map state to load!");
135156
return true;
136157
}
137-
// Wait a bit even aft map state is loaded, to ensure it REALLY gets loaded
158+
// Wait a bit even after map state is loaded, to ensure it REALLY gets loaded
138159
else if(stateUpdateWaitStart <= 0){stateUpdateWaitStart = System.currentTimeMillis(); return false;}
139160
else if(System.currentTimeMillis() - stateUpdateWaitStart < WAIT_FOR_STATE_UPDATE) return false;
140161
else{stateUpdateWaitStart = 0; return true;}

src/main/java/net/evmodder/evmod/listeners/MapHandRestock.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ private List<ItemStack> getSlotsWithBundleSub(List<ItemStack> slots, PlayerEntit
412412
for(int i=0; i<slots.size(); ++i){
413413
BundleContentsComponent contents = slots.get(i).get(DataComponentTypes.BUNDLE_CONTENTS);
414414
if(contents == null || contents.isEmpty()) continue;
415-
ItemStack stack = contents.get(contents.size()-1);
415+
int topBundleSlot = Configs.Generic.BUNDLE_SELECT_REVERSED.getBooleanValue() ? contents.size()-1 : 0;
416+
ItemStack stack = contents.get(topBundleSlot);
416417
if(stack.getItem() != Items.FILLED_MAP) continue;
417418
if(slots.stream().anyMatch(s -> ItemStack.areItemsAndComponentsEqual(s, stack))) continue; // If map is also present unbundled in inv
418419
if(stack.getCount() == 1 && isInNearbyItemFrame(stack, player, 20)) continue;
@@ -532,7 +533,7 @@ public MapHandRestock(final boolean allowAutoPlacer){
532533
if(!ife.getHeldItemStack().isEmpty()){
533534
if(allowAutoPlacer && Configs.Generic.MAPART_AUTOPLACE_ANTI_ROTATE.getBooleanValue() && autoPlacer.isActive()
534535
&& ife.getHeldItemStack().getItem() == Items.FILLED_MAP){
535-
Main.LOGGER.info("AutoPlaceMapArt: Ignoring a (likely accidental) map-rotation click");
536+
Main.LOGGER.warn("AutoPlaceMapArt: Discarding a (likely accidental) map-rotation click");
536537
return ActionResult.FAIL;
537538
}
538539
return ActionResult.PASS;

src/main/java/net/evmodder/evmod/mixin/MixinClientPlayerInteractionManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private void avoid_sending_too_many_clicks(int syncId, int slot, int button, Slo
6060
ci.cancel();
6161
if(syncId == 0 && slot == 0 && button == 0 && action == SlotActionType.QUICK_MOVE) return; // QUICK_CRAFT sometimes sends duplicate fake QUICK_MOVE?
6262
MinecraftClient.getInstance().player.sendMessage(Text.literal("Discarding user click to protect an ongoing ClickOp").withColor(/*&c=*/16733525), false);
63-
MinecraftClient.getInstance().player.sendMessage(Text.literal("syncId="+syncId+",slot="+slot+",button="+button+",action="+action.name()), false);
63+
// MinecraftClient.getInstance().player.sendMessage(Text.literal("syncId="+syncId+",slot="+slot+",button="+button+",action="+action.name()), false);
6464
return;
6565
}
6666
final int availableClicks = Main.clickUtils.calcAvailableClicks();

src/main/java/net/evmodder/evmod/onTick/AutoPlaceMapArt.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,12 @@ private final MapPlacementData getNearestMapPlacement(PlayerEntity player){
366366
final int bundleSz = contents != null ? contents.size() : 0;
367367
// if(contents != null && !contents.isEmpty()) mapItem = contents.get(contents.size()-1);
368368

369+
final boolean ALLOW_ONLY_TOP_SLOT = !Configs.Generic.BUNDLE_SELECT_PACKET.getBooleanValue();
369370
for(int j=-1; j<bundleSz; ++j){
370-
ItemStack mapStack = j==-1 ? slots.get(i) : contents.get(j);
371+
final ItemStack mapStack;
372+
if(j == -1) mapStack = slots.get(i);
373+
else if(ALLOW_ONLY_TOP_SLOT && j != bundleSz-1) continue;
374+
else mapStack = contents.get(j);
371375
if(mapStack.getItem() != Items.FILLED_MAP) continue;
372376
++numMaps;
373377
BlockPos bp = getPlacement(mapStack, player.getWorld());
@@ -459,7 +463,7 @@ private final void getMapIntoMainHand(MinecraftClient client, int slot, int bund
459463
BundleContentsComponent contents = client.player.playerScreenHandler.slots.get(slot).getStack().get(DataComponentTypes.BUNDLE_CONTENTS);
460464
assert contents != null && contents.size() > bundleSlot;
461465
ArrayDeque<InvAction> clicks = new ArrayDeque<>();
462-
if(contents.size() != 1){
466+
if(bundleSlot != contents.size()-1){
463467
int bundleSlotUsed = Configs.Generic.BUNDLE_SELECT_REVERSED.getBooleanValue() ? contents.size()-(bundleSlot+1) : bundleSlot;
464468
clicks.add(new InvAction(slot, bundleSlotUsed, ActionType.BUNDLE_SELECT)); // Select bundle slot
465469
}

0 commit comments

Comments
 (0)