Skip to content

Commit

Permalink
sync with sakura-ryoko/itemscroller 1.21.3-0.25.0-sakura.3
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Nov 8, 2024
1 parent 00e9d0e commit d9d0e1c
Show file tree
Hide file tree
Showing 34 changed files with 850 additions and 330 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
## Change
- sync with `sakura-ryoko/itemscroller` 1.21-0.24.51
- sync with `sakura-ryoko/itemscroller` 1.21.3-0.25.0-sakura.3
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[versions]
# Base properties
minecraft_version="1.21.1"
yarn_mappings="1.21.1+build.3"
minecraft_version="1.21.3"
yarn_mappings="1.21.3+build.2"
mappings_patch="1.21+build.4"
neoforge="21.1.31"
neoforge="21.3.12-beta"

# Mod properties
version="0.1.9"
version="0.1.10"
maven-group="org.thinkingstudio.rocknroller"
archives-name="RocknRoller"

Expand All @@ -15,7 +15,7 @@ id-modrinth="hYq29QmW"
id-curseforge="916852"

# Mod dependencies
mafglib="0.1.24-mc1.21.1"
mafglib="0.1.25-mc1.21.3"
badpackets="neo-0.8.1"

# Libraries
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/fi/dy/masa/itemscroller/InitHandler.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package fi.dy.masa.itemscroller;

import fi.dy.masa.itemscroller.config.Configs;
import fi.dy.masa.itemscroller.event.InputHandler;
import fi.dy.masa.itemscroller.event.KeybindCallbacks;
import fi.dy.masa.itemscroller.event.WorldLoadListener;
import fi.dy.masa.malilib.config.ConfigManager;
import fi.dy.masa.malilib.event.InputEventHandler;
import fi.dy.masa.malilib.event.TickHandler;
import fi.dy.masa.malilib.event.WorldLoadHandler;
import fi.dy.masa.malilib.interfaces.IInitializationHandler;
import fi.dy.masa.itemscroller.config.Configs;
import fi.dy.masa.itemscroller.event.InputHandler;
import fi.dy.masa.itemscroller.event.KeybindCallbacks;
import fi.dy.masa.itemscroller.event.WorldLoadListener;

public class InitHandler implements IInitializationHandler
{
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/fi/dy/masa/itemscroller/ItemScroller.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import fi.dy.masa.malilib.event.InitializationHandler;
import fi.dy.masa.itemscroller.config.Configs;

public class ItemScroller
{
Expand All @@ -13,13 +14,11 @@ public static void onInitialize()
InitializationHandler.getInstance().registerInitializationHandler(new InitHandler());
}

/*
public static void printDebug(String key, Object... args)
{
if (Configs.Generic.DEBUG_MESSAGES.getBooleanValue())
{
logger.info(key, args);
}
}
*/
}
90 changes: 47 additions & 43 deletions src/main/java/fi/dy/masa/itemscroller/config/Configs.java

Large diffs are not rendered by default.

81 changes: 42 additions & 39 deletions src/main/java/fi/dy/masa/itemscroller/config/Hotkeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,55 @@
import fi.dy.masa.malilib.config.options.ConfigHotkey;
import fi.dy.masa.malilib.hotkeys.KeyAction;
import fi.dy.masa.malilib.hotkeys.KeybindSettings;
import fi.dy.masa.itemscroller.Reference;

public class Hotkeys
{
private static final KeybindSettings GUI_RELAXED = KeybindSettings.create(KeybindSettings.Context.GUI, KeyAction.PRESS, true, false, false, false);
private static final KeybindSettings GUI_RELAXED_CANCEL = KeybindSettings.create(KeybindSettings.Context.GUI, KeyAction.PRESS, true, false, false, true);
private static final KeybindSettings GUI_NO_ORDER = KeybindSettings.create(KeybindSettings.Context.GUI, KeyAction.PRESS, false, false, false, true);

public static final ConfigHotkey OPEN_CONFIG_GUI = new ConfigHotkey("openConfigGui", "I,C", "itemscroller.config.hotkeys.comment.openConfigGui").translatedName("itemscroller.config.hotkeys.name.openConfigGui");

public static final ConfigHotkey CRAFT_EVERYTHING = new ConfigHotkey("craftEverything", "LEFT_CONTROL,C", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.craftEverything").translatedName("itemscroller.config.hotkeys.name.craftEverything");
public static final ConfigHotkey DROP_ALL_MATCHING = new ConfigHotkey("dropAllMatching", "LEFT_CONTROL,LEFT_SHIFT,Q", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.dropAllMatching").translatedName("itemscroller.config.hotkeys.name.dropAllMatching");
public static final ConfigHotkey MASS_CRAFT = new ConfigHotkey("massCraft", "LEFT_CONTROL,LEFT_ALT,C", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.massCraft").translatedName("itemscroller.config.hotkeys.name.massCraft");
public static final ConfigHotkey MOVE_CRAFT_RESULTS = new ConfigHotkey("moveCraftResults", "LEFT_CONTROL,M", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.moveCraftResults").translatedName("itemscroller.config.hotkeys.name.moveCraftResults");
public static final ConfigHotkey RECIPE_VIEW = new ConfigHotkey("recipeView", "A", GUI_RELAXED, "itemscroller.config.hotkeys.comment.recipeView").translatedName("itemscroller.config.hotkeys.name.recipeView");
public static final ConfigHotkey SLOT_DEBUG = new ConfigHotkey("slotDebug", "LEFT_CONTROL,LEFT_ALT,LEFT_SHIFT,I", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.slotDebug").translatedName("itemscroller.config.hotkeys.name.slotDebug");
public static final ConfigHotkey STORE_RECIPE = new ConfigHotkey("storeRecipe", "BUTTON_3", GUI_RELAXED_CANCEL, "itemscroller.config.hotkeys.comment.storeRecipe").translatedName("itemscroller.config.hotkeys.name.storeRecipe");
public static final ConfigHotkey THROW_CRAFT_RESULTS = new ConfigHotkey("throwCraftResults", "LEFT_CONTROL,T", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.throwCraftResults").translatedName("itemscroller.config.hotkeys.name.throwCraftResults");
public static final ConfigHotkey TOGGLE_MOD_ON_OFF = new ConfigHotkey("toggleModOnOff", "", KeybindSettings.GUI, "itemscroller.config.hotkeys.comment.toggleModOnOff").translatedName("itemscroller.config.hotkeys.name.toggleModOnOff");
public static final ConfigHotkey VILLAGER_TRADE_FAVORITES = new ConfigHotkey("villagerTradeFavorites","", KeybindSettings.GUI, "itemscroller.config.hotkeys.comment.villagerTradeFavorites").translatedName("itemscroller.config.hotkeys.name.villagerTradeFavorites");

public static final ConfigHotkey KEY_DRAG_DROP_LEAVE_ONE = new ConfigHotkey("keyDragDropLeaveOne", "LEFT_SHIFT,Q,BUTTON_2", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.keyDragDropLeaveOne").translatedName("itemscroller.config.hotkeys.name.keyDragDropLeaveOne");
public static final ConfigHotkey KEY_DRAG_DROP_SINGLE = new ConfigHotkey("keyDragDropSingle", "Q,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.keyDragDropSingle").translatedName("itemscroller.config.hotkeys.name.keyDragDropSingle");
public static final ConfigHotkey KEY_DRAG_DROP_STACKS = new ConfigHotkey("keyDragDropStacks", "LEFT_SHIFT,Q,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.keyDragDropStacks").translatedName("itemscroller.config.hotkeys.name.keyDragDropStacks");

public static final ConfigHotkey KEY_DRAG_LEAVE_ONE = new ConfigHotkey("keyDragMoveLeaveOne", "LEFT_SHIFT,BUTTON_2", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.keyDragMoveLeaveOne").translatedName("itemscroller.config.hotkeys.name.keyDragMoveLeaveOne");
public static final ConfigHotkey KEY_DRAG_MATCHING = new ConfigHotkey("keyDragMoveMatching", "LEFT_ALT,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.keyDragMoveMatching").translatedName("itemscroller.config.hotkeys.name.keyDragMoveMatching");
public static final ConfigHotkey KEY_DRAG_MOVE_ONE = new ConfigHotkey("keyDragMoveOne", "LEFT_CONTROL,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.keyDragMoveOne").translatedName("itemscroller.config.hotkeys.name.keyDragMoveOne");
public static final ConfigHotkey KEY_DRAG_FULL_STACKS = new ConfigHotkey("keyDragMoveStacks", "LEFT_SHIFT,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.keyDragMoveStacks").translatedName("itemscroller.config.hotkeys.name.keyDragMoveStacks");

public static final ConfigHotkey KEY_MOVE_EVERYTHING = new ConfigHotkey("keyMoveEverything", "LEFT_ALT,LEFT_SHIFT,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.keyMoveEverything").translatedName("itemscroller.config.hotkeys.name.keyMoveEverything");

public static final ConfigHotkey KEY_WS_MOVE_DOWN_LEAVE_ONE = new ConfigHotkey("wsMoveDownLeaveOne", "S,BUTTON_2", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.wsMoveDownLeaveOne").translatedName("itemscroller.config.hotkeys.name.wsMoveDownLeaveOne");
public static final ConfigHotkey KEY_WS_MOVE_DOWN_MATCHING = new ConfigHotkey("wsMoveDownMatching", "LEFT_ALT,S,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.wsMoveDownMatching").translatedName("itemscroller.config.hotkeys.name.wsMoveDownMatching");
public static final ConfigHotkey KEY_WS_MOVE_DOWN_SINGLE = new ConfigHotkey("wsMoveDownSingle", "S,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.wsMoveDownSingle").translatedName("itemscroller.config.hotkeys.name.wsMoveDownSingle");
public static final ConfigHotkey KEY_WS_MOVE_DOWN_STACKS = new ConfigHotkey("wsMoveDownStacks", "LEFT_SHIFT,S,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.wsMoveDownStacks").translatedName("itemscroller.config.hotkeys.name.wsMoveDownStacks");
public static final ConfigHotkey KEY_WS_MOVE_UP_LEAVE_ONE = new ConfigHotkey("wsMoveUpLeaveOne", "W,BUTTON_2", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.wsMoveUpLeaveOne").translatedName("itemscroller.config.hotkeys.name.wsMoveUpLeaveOne");
public static final ConfigHotkey KEY_WS_MOVE_UP_MATCHING = new ConfigHotkey("wsMoveUpMatching", "LEFT_ALT,W,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.wsMoveUpMatching").translatedName("itemscroller.config.hotkeys.name.wsMoveUpMatching");
public static final ConfigHotkey KEY_WS_MOVE_UP_SINGLE = new ConfigHotkey("wsMoveUpSingle", "W,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.wsMoveUpSingle").translatedName("itemscroller.config.hotkeys.name.wsMoveUpSingle");
public static final ConfigHotkey KEY_WS_MOVE_UP_STACKS = new ConfigHotkey("wsMoveUpStacks", "LEFT_SHIFT,W,BUTTON_1", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.wsMoveUpStacks").translatedName("itemscroller.config.hotkeys.name.wsMoveUpStacks");

public static final ConfigHotkey MODIFIER_MOVE_EVERYTHING = new ConfigHotkey("modifierMoveEverything", "LEFT_ALT,LEFT_SHIFT", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.modifierMoveEverything").translatedName("itemscroller.config.hotkeys.name.modifierMoveEverything");
public static final ConfigHotkey MODIFIER_MOVE_MATCHING = new ConfigHotkey("modifierMoveMatching", "LEFT_ALT", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.modifierMoveMatching").translatedName("itemscroller.config.hotkeys.name.modifierMoveMatching");
public static final ConfigHotkey MODIFIER_MOVE_STACK = new ConfigHotkey("modifierMoveStack", "LEFT_SHIFT", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.modifierMoveStack").translatedName("itemscroller.config.hotkeys.name.modifierMoveStack");
public static final ConfigHotkey MODIFIER_TOGGLE_VILLAGER_GLOBAL_FAVORITE = new ConfigHotkey("modifierToggleVillagerGlobalFavorite", "LEFT_SHIFT", GUI_RELAXED, "itemscroller.config.hotkeys.comment.modifierToggleVillagerGlobalFavorite").translatedName("itemscroller.config.hotkeys.name.modifierToggleVillagerGlobalFavorite");

public static final ConfigHotkey SORT_INVENTORY = new ConfigHotkey("sortInventory", "R", GUI_NO_ORDER, "itemscroller.config.hotkeys.comment.sortInventory").translatedName("itemscroller.config.hotkeys.name.sortInventory");
private static final String HOTKEYS_KEY = Reference.ID+".config.hotkeys";

public static final ConfigHotkey OPEN_CONFIG_GUI = new ConfigHotkey("openConfigGui", "I,C").apply(HOTKEYS_KEY);

public static final ConfigHotkey CRAFT_EVERYTHING = new ConfigHotkey("craftEverything", "LEFT_CONTROL,C", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey DROP_ALL_MATCHING = new ConfigHotkey("dropAllMatching", "LEFT_CONTROL,LEFT_SHIFT,Q", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey MASS_CRAFT = new ConfigHotkey("massCraft", "LEFT_CONTROL,LEFT_ALT,C", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey MOVE_CRAFT_RESULTS = new ConfigHotkey("moveCraftResults", "LEFT_CONTROL,M", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey RECIPE_VIEW = new ConfigHotkey("recipeView", "A", GUI_RELAXED).apply(HOTKEYS_KEY);
public static final ConfigHotkey SLOT_DEBUG = new ConfigHotkey("slotDebug", "LEFT_CONTROL,LEFT_ALT,LEFT_SHIFT,I", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey STORE_RECIPE = new ConfigHotkey("storeRecipe", "BUTTON_3", GUI_RELAXED_CANCEL).apply(HOTKEYS_KEY);
public static final ConfigHotkey THROW_CRAFT_RESULTS = new ConfigHotkey("throwCraftResults", "LEFT_CONTROL,T", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey TOGGLE_MOD_ON_OFF = new ConfigHotkey("toggleModOnOff", "", KeybindSettings.GUI).apply(HOTKEYS_KEY);
public static final ConfigHotkey VILLAGER_TRADE_FAVORITES = new ConfigHotkey("villagerTradeFavorites","", KeybindSettings.GUI).apply(HOTKEYS_KEY);

public static final ConfigHotkey KEY_DRAG_DROP_LEAVE_ONE = new ConfigHotkey("keyDragDropLeaveOne", "LEFT_SHIFT,Q,BUTTON_2", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_DRAG_DROP_SINGLE = new ConfigHotkey("keyDragDropSingle", "Q,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_DRAG_DROP_STACKS = new ConfigHotkey("keyDragDropStacks", "LEFT_SHIFT,Q,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);

public static final ConfigHotkey KEY_DRAG_LEAVE_ONE = new ConfigHotkey("keyDragMoveLeaveOne", "LEFT_SHIFT,BUTTON_2", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_DRAG_MATCHING = new ConfigHotkey("keyDragMoveMatching", "LEFT_ALT,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_DRAG_MOVE_ONE = new ConfigHotkey("keyDragMoveOne", "LEFT_CONTROL,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_DRAG_FULL_STACKS = new ConfigHotkey("keyDragMoveStacks", "LEFT_SHIFT,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);

public static final ConfigHotkey KEY_MOVE_EVERYTHING = new ConfigHotkey("keyMoveEverything", "LEFT_ALT,LEFT_SHIFT,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);

public static final ConfigHotkey KEY_WS_MOVE_DOWN_LEAVE_ONE = new ConfigHotkey("wsMoveDownLeaveOne", "S,BUTTON_2", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_WS_MOVE_DOWN_MATCHING = new ConfigHotkey("wsMoveDownMatching", "LEFT_ALT,S,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_WS_MOVE_DOWN_SINGLE = new ConfigHotkey("wsMoveDownSingle", "S,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_WS_MOVE_DOWN_STACKS = new ConfigHotkey("wsMoveDownStacks", "LEFT_SHIFT,S,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_WS_MOVE_UP_LEAVE_ONE = new ConfigHotkey("wsMoveUpLeaveOne", "W,BUTTON_2", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_WS_MOVE_UP_MATCHING = new ConfigHotkey("wsMoveUpMatching", "LEFT_ALT,W,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_WS_MOVE_UP_SINGLE = new ConfigHotkey("wsMoveUpSingle", "W,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey KEY_WS_MOVE_UP_STACKS = new ConfigHotkey("wsMoveUpStacks", "LEFT_SHIFT,W,BUTTON_1", GUI_NO_ORDER).apply(HOTKEYS_KEY);

public static final ConfigHotkey MODIFIER_MOVE_EVERYTHING = new ConfigHotkey("modifierMoveEverything", "LEFT_ALT,LEFT_SHIFT", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey MODIFIER_MOVE_MATCHING = new ConfigHotkey("modifierMoveMatching", "LEFT_ALT", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey MODIFIER_MOVE_STACK = new ConfigHotkey("modifierMoveStack", "LEFT_SHIFT", GUI_NO_ORDER).apply(HOTKEYS_KEY);
public static final ConfigHotkey MODIFIER_TOGGLE_VILLAGER_GLOBAL_FAVORITE = new ConfigHotkey("modifierToggleVillagerGlobalFavorite", "LEFT_SHIFT", GUI_RELAXED).apply(HOTKEYS_KEY);

public static final ConfigHotkey SORT_INVENTORY = new ConfigHotkey("sortInventory", "R", GUI_NO_ORDER).apply(HOTKEYS_KEY);

public static final List<ConfigHotkey> HOTKEY_LIST = ImmutableList.of(
OPEN_CONFIG_GUI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ private boolean handleInputImpl(int keyCode, boolean keyState, double dWheel, Mi
// Pick-blocking over a crafting output slot with the recipe view open, store the recipe
else if (isPickBlock && InputUtils.isRecipeViewOpen() && InventoryUtils.isCraftingSlot(gui, slot))
{
recipes.storeCraftingRecipeToCurrentSelection(slot, gui, true);
recipes.storeCraftingRecipeToCurrentSelection(slot, gui, true, false, mc);
InventoryUtils.clearFirstCraftingGridOfAllItems(gui);
//InventoryUtils.clearCraftingGridCursorStack(gui, mc);
cancel = true;
}
}
Expand Down
Loading

0 comments on commit d9d0e1c

Please sign in to comment.