/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.llamalad7.mixinextras.injector.ModifyExpressionValue
 *  net.minecraft.class_1799
 *  net.minecraft.class_9276
 *  net.minecraft.class_9334
 *  net.minecraft.class_9929
 *  org.spongepowered.asm.mixin.Mixin
 *  org.spongepowered.asm.mixin.injection.At
 */
package meteordevelopment.meteorclient.mixin;

import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.misc.InventoryTweaks;
import net.minecraft.class_1799;
import net.minecraft.class_9276;
import net.minecraft.class_9334;
import net.minecraft.class_9929;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

@Mixin(value={class_9929.class})
public class BundleTooltipSubmenuHandlerMixin {
    @ModifyExpressionValue(method={"method_61976"}, at={@At(value="INVOKE", target="Lnet/minecraft/class_5537;method_61645(Lnet/minecraft/class_1799;)I")})
    private int uncapBundleScrolling1(int original, class_1799 item, int slotId, int selectedItemIndex) {
        if (Modules.get().get(InventoryTweaks.class).uncapBundleScrolling()) {
            return ((class_9276)item.method_58695(class_9334.field_49650, (Object)class_9276.field_49289)).method_57426();
        }
        return original;
    }

    @ModifyExpressionValue(method={"method_61973"}, at={@At(value="INVOKE", target="Lnet/minecraft/class_5537;method_61645(Lnet/minecraft/class_1799;)I")})
    private int uncapBundleScrolling2(int original, double horizontal, double vertical, int slotId, class_1799 item) {
        if (Modules.get().get(InventoryTweaks.class).uncapBundleScrolling()) {
            return ((class_9276)item.method_58695(class_9334.field_49650, (Object)class_9276.field_49289)).method_57426();
        }
        return original;
    }
}

