Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Часть функционала ItemScroller | 3.1

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
22 Ноя 2025
Сообщения
43
Реакции
0
Выберите загрузчик игры
  1. OptiFine
  2. Прочие моды

всем ку держите фикс itemscroller в exp 3.1 она не работает зафиксил держите
Код:
Expand Collapse Copy
//Zalupo3001
package im.expensive.functions.impl.misc;

import com.google.common.eventbus.Subscribe;
import im.expensive.events.EventScroll;
import im.expensive.functions.api.Category;
import im.expensive.functions.api.Function;
import im.expensive.functions.api.FunctionRegister;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.inventory.container.Slot;

import java.lang.reflect.Field;

@FunctionRegister(name = "ItemScroller", type = Category.Misc)
public class ItemScroller extends Function {

    @Subscribe
    private void onScroll(EventScroll e) {
        if (e.getDelta() == 0 || mc.player == null || !(mc.currentScreen instanceof ContainerScreen)) return;

        ContainerScreen<?> screen = (ContainerScreen<?>) mc.currentScreen;
        Slot slot = getSlotUnderMouse(screen);
        if (slot != null && slot.getHasStack()) {

            mc.playerController.windowClick(
                    screen.getContainer().windowId,
                    slot.slotNumber,
                    0,
                    ClickType.QUICK_MOVE,
                    mc.player
            );
            e.setCancelled(true);
        }
    }

    private Slot getSlotUnderMouse(ContainerScreen<?> screen) {
        try {
            Field field = null;
            try {
                field = ContainerScreen.class.getDeclaredField("hoveredSlot");
            } catch (NoSuchFieldException ex) {
                field = ContainerScreen.class.getDeclaredField("field_147006_u");
            }

            if (field != null) {
                field.setAccessible(true);
                return (Slot) field.get(screen);
            }
        } catch (Exception ignored) {
        }
        return null;
    }
}
 

всем ку держите фикс itemscroller в exp 3.1 она не работает зафиксил держите
Код:
Expand Collapse Copy
//Zalupo3001
package im.expensive.functions.impl.misc;

import com.google.common.eventbus.Subscribe;
import im.expensive.events.EventScroll;
import im.expensive.functions.api.Category;
import im.expensive.functions.api.Function;
import im.expensive.functions.api.FunctionRegister;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.inventory.container.Slot;

import java.lang.reflect.Field;

@FunctionRegister(name = "ItemScroller", type = Category.Misc)
public class ItemScroller extends Function {

    @Subscribe
    private void onScroll(EventScroll e) {
        if (e.getDelta() == 0 || mc.player == null || !(mc.currentScreen instanceof ContainerScreen)) return;

        ContainerScreen<?> screen = (ContainerScreen<?>) mc.currentScreen;
        Slot slot = getSlotUnderMouse(screen);
        if (slot != null && slot.getHasStack()) {

            mc.playerController.windowClick(
                    screen.getContainer().windowId,
                    slot.slotNumber,
                    0,
                    ClickType.QUICK_MOVE,
                    mc.player
            );
            e.setCancelled(true);
        }
    }

    private Slot getSlotUnderMouse(ContainerScreen<?> screen) {
        try {
            Field field = null;
            try {
                field = ContainerScreen.class.getDeclaredField("hoveredSlot");
            } catch (NoSuchFieldException ex) {
                field = ContainerScreen.class.getDeclaredField("field_147006_u");
            }

            if (field != null) {
                field.setAccessible(true);
                return (Slot) field.get(screen);
            }
        } catch (Exception ignored) {
        }
        return null;
    }
}
и нахуя оно?
 

всем ку держите фикс itemscroller в exp 3.1 она не работает зафиксил держите
Код:
Expand Collapse Copy
//Zalupo3001
package im.expensive.functions.impl.misc;

import com.google.common.eventbus.Subscribe;
import im.expensive.events.EventScroll;
import im.expensive.functions.api.Category;
import im.expensive.functions.api.Function;
import im.expensive.functions.api.FunctionRegister;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.inventory.container.Slot;

import java.lang.reflect.Field;

@FunctionRegister(name = "ItemScroller", type = Category.Misc)
public class ItemScroller extends Function {

    @Subscribe
    private void onScroll(EventScroll e) {
        if (e.getDelta() == 0 || mc.player == null || !(mc.currentScreen instanceof ContainerScreen)) return;

        ContainerScreen<?> screen = (ContainerScreen<?>) mc.currentScreen;
        Slot slot = getSlotUnderMouse(screen);
        if (slot != null && slot.getHasStack()) {

            mc.playerController.windowClick(
                    screen.getContainer().windowId,
                    slot.slotNumber,
                    0,
                    ClickType.QUICK_MOVE,
                    mc.player
            );
            e.setCancelled(true);
        }
    }

    private Slot getSlotUnderMouse(ContainerScreen<?> screen) {
        try {
            Field field = null;
            try {
                field = ContainerScreen.class.getDeclaredField("hoveredSlot");
            } catch (NoSuchFieldException ex) {
                field = ContainerScreen.class.getDeclaredField("field_147006_u");
            }

            if (field != null) {
                field.setAccessible(true);
                return (Slot) field.get(screen);
            }
        } catch (Exception ignored) {
        }
        return null;
    }
}
хватит ориг код экспы в чат лгбт кидать и заливать сюда пж
 

всем ку держите фикс itemscroller в exp 3.1 она не работает зафиксил держите
Код:
Expand Collapse Copy
//Zalupo3001
package im.expensive.functions.impl.misc;

import com.google.common.eventbus.Subscribe;
import im.expensive.events.EventScroll;
import im.expensive.functions.api.Category;
import im.expensive.functions.api.Function;
import im.expensive.functions.api.FunctionRegister;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.inventory.container.Slot;

import java.lang.reflect.Field;

@FunctionRegister(name = "ItemScroller", type = Category.Misc)
public class ItemScroller extends Function {

    @Subscribe
    private void onScroll(EventScroll e) {
        if (e.getDelta() == 0 || mc.player == null || !(mc.currentScreen instanceof ContainerScreen)) return;

        ContainerScreen<?> screen = (ContainerScreen<?>) mc.currentScreen;
        Slot slot = getSlotUnderMouse(screen);
        if (slot != null && slot.getHasStack()) {

            mc.playerController.windowClick(
                    screen.getContainer().windowId,
                    slot.slotNumber,
                    0,
                    ClickType.QUICK_MOVE,
                    mc.player
            );
            e.setCancelled(true);
        }
    }

    private Slot getSlotUnderMouse(ContainerScreen<?> screen) {
        try {
            Field field = null;
            try {
                field = ContainerScreen.class.getDeclaredField("hoveredSlot");
            } catch (NoSuchFieldException ex) {
                field = ContainerScreen.class.getDeclaredField("field_147006_u");
            }

            if (field != null) {
                field.setAccessible(true);
                return (Slot) field.get(screen);
            }
        } catch (Exception ignored) {
        }
        return null;
    }
}
в обычной экспе он работает а ещё:
зачем через эвент делать? это точно под 3.1? смысл тогда через field делать
 

всем ку держите фикс itemscroller в exp 3.1 она не работает зафиксил держите
Код:
Expand Collapse Copy
//Zalupo3001
package im.expensive.functions.impl.misc;

import com.google.common.eventbus.Subscribe;
import im.expensive.events.EventScroll;
import im.expensive.functions.api.Category;
import im.expensive.functions.api.Function;
import im.expensive.functions.api.FunctionRegister;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.inventory.container.Slot;

import java.lang.reflect.Field;

@FunctionRegister(name = "ItemScroller", type = Category.Misc)
public class ItemScroller extends Function {

    @Subscribe
    private void onScroll(EventScroll e) {
        if (e.getDelta() == 0 || mc.player == null || !(mc.currentScreen instanceof ContainerScreen)) return;

        ContainerScreen<?> screen = (ContainerScreen<?>) mc.currentScreen;
        Slot slot = getSlotUnderMouse(screen);
        if (slot != null && slot.getHasStack()) {

            mc.playerController.windowClick(
                    screen.getContainer().windowId,
                    slot.slotNumber,
                    0,
                    ClickType.QUICK_MOVE,
                    mc.player
            );
            e.setCancelled(true);
        }
    }

    private Slot getSlotUnderMouse(ContainerScreen<?> screen) {
        try {
            Field field = null;
            try {
                field = ContainerScreen.class.getDeclaredField("hoveredSlot");
            } catch (NoSuchFieldException ex) {
                field = ContainerScreen.class.getDeclaredField("field_147006_u");
            }

            if (field != null) {
                field.setAccessible(true);
                return (Slot) field.get(screen);
            }
        } catch (Exception ignored) {
        }
        return null;
    }
}
ебанный бред нахуя такое говно выкладывать? /del.......
 
Назад
Сверху Снизу