Skip to content

Commit

Permalink
sync with sakura-ryoko/itemscroller 1.21-0.24.55
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Dec 22, 2024
1 parent 00e9d0e commit 79865cd
Show file tree
Hide file tree
Showing 23 changed files with 1,233 additions and 630 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ id-modrinth="hYq29QmW"
id-curseforge="916852"

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

# Libraries
Expand Down
14 changes: 10 additions & 4 deletions src/main/java/fi/dy/masa/itemscroller/InitHandler.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
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.malilib.registry.Registry;
import fi.dy.masa.malilib.util.data.ModInfo;
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.itemscroller.gui.GuiConfigs;

public class InitHandler implements IInitializationHandler
{
@Override
public void registerModHandlers()
{
ConfigManager.getInstance().registerConfigHandler(Reference.MOD_ID, new Configs());
Registry.CONFIG_SCREEN.registerConfigScreenFactory(
new ModInfo(Reference.MOD_ID, Reference.MOD_NAME, GuiConfigs::new)
);

InputHandler handler = new InputHandler();
InputEventHandler.getKeybindManager().registerKeybindProvider(handler);
Expand Down
1 change: 1 addition & 0 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 Down
90 changes: 47 additions & 43 deletions src/main/java/fi/dy/masa/itemscroller/config/Configs.java

Large diffs are not rendered by default.

84 changes: 44 additions & 40 deletions src/main/java/fi/dy/masa/itemscroller/config/Hotkeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,64 @@
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 MASS_CRAFT_TOGGLE = new ConfigHotkey("massCraftToggle", "").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,
TOGGLE_MOD_ON_OFF,

CRAFT_EVERYTHING,
DROP_ALL_MATCHING,
MASS_CRAFT,
MASS_CRAFT_TOGGLE,
MOVE_CRAFT_RESULTS,
RECIPE_VIEW,
SLOT_DEBUG,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ 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);
cancel = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import fi.dy.masa.malilib.hotkeys.IHotkeyCallback;
import fi.dy.masa.malilib.hotkeys.IKeybind;
import fi.dy.masa.malilib.hotkeys.KeyAction;
import fi.dy.masa.malilib.hotkeys.KeyCallbackToggleBooleanConfigWithMessage;
import fi.dy.masa.malilib.interfaces.IClientTickHandler;
import fi.dy.masa.malilib.util.GuiUtils;
import fi.dy.masa.malilib.util.InfoUtils;
Expand Down Expand Up @@ -49,6 +50,8 @@ public void setCallbacks()
{
hotkey.getKeybind().setCallback(this);
}

Hotkeys.MASS_CRAFT_TOGGLE.getKeybind().setCallback(new KeyCallbackToggleBooleanConfigWithMessage(Configs.Generic.MASS_CRAFT_HOLD));
}

public boolean functionalityEnabled()
Expand Down Expand Up @@ -149,7 +152,7 @@ else if (key == Hotkeys.STORE_RECIPE.getKeybind())
{
if (InputUtils.isRecipeViewOpen() && InventoryUtils.isCraftingSlot(gui, slot))
{
recipes.storeCraftingRecipeToCurrentSelection(slot, gui, true);
recipes.storeCraftingRecipeToCurrentSelection(slot, gui, true, true, mc);
return true;
}
}
Expand Down Expand Up @@ -215,7 +218,7 @@ public void onClientTick(MinecraftClient mc)
if (GuiUtils.getCurrentScreen() instanceof HandledScreen<?> gui &&
(GuiUtils.getCurrentScreen() instanceof CreativeInventoryScreen) == false &&
Configs.GUI_BLACKLIST.contains(GuiUtils.getCurrentScreen().getClass().getName()) == false &&
Hotkeys.MASS_CRAFT.getKeybind().isKeybindHeld())
(Hotkeys.MASS_CRAFT.getKeybind().isKeybindHeld() || Configs.Generic.MASS_CRAFT_HOLD.getBooleanValue()))
{
if (++this.massCraftTicker < Configs.Generic.MASS_CRAFT_INTERVAL.getIntegerValue())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ public static RenderEventHandler instance()

public void renderRecipeView(DrawContext drawContext)
{
if (GuiUtils.getCurrentScreen() instanceof HandledScreen && InputUtils.isRecipeViewOpen())
if (GuiUtils.getCurrentScreen() instanceof HandledScreen<?> gui && InputUtils.isRecipeViewOpen())
{
HandledScreen<?> gui = (HandledScreen<?>) GuiUtils.getCurrentScreen();
RecipeStorage recipes = RecipeStorage.getInstance();
final int first = recipes.getFirstVisibleRecipeId();
final int countPerPage = recipes.getRecipeCountPerPage();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package fi.dy.masa.itemscroller.mixin;

import net.minecraft.client.MinecraftClient;
import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket;
import net.minecraft.screen.ScreenHandler;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
Expand Down
Loading

0 comments on commit 79865cd

Please sign in to comment.