Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

Красивое отображение название AutoBuy на аукционе | Expensive 3.1

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
3 Май 2024
Сообщения
61
Реакции
0
SS -

Пожалуйста, зарегистрируйтесь или авторизуйтесь, чтобы увидеть содержимое.



Ну что приступим заходим в ChestScreen

Идем на 74 строку и вставляем это:
ChestScreen:
Expand Collapse Copy
button.setMessage(new StringTextComponent("" + (ActivationLogic.isActive() ? TextFormatting.GREEN + "AutoBuy: ON" : TextFormatting.RED + "AutoBuy: OFF")));

Дальше идем в ActivationLogic и заменяем все на этот код:
ActivationLogic:
Expand Collapse Copy
package im.expensive.ui.ab.logic;

import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import im.expensive.ui.ab.model.ItemStorage;
import im.expensive.events.EventUpdate;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.inventory.ChestScreen;
import net.minecraft.item.ItemStack;

import java.util.LinkedList;
import java.util.List;

@FieldDefaults(level = AccessLevel.PRIVATE)
public class ActivationLogic {
    final Minecraft mc;
    [USER=270918]@Getter[/USER]
    [USER=1132491]@setter[/USER]
    public static State currentState;
    protected final ItemStorage itemStorage;
    public final List<ItemStack> itemList = new LinkedList<>();
    private final AuctionLogic auctionLogic;

    public ActivationLogic(ItemStorage itemStorage, EventBus eventBus) {
        this.itemStorage = itemStorage;
        this.currentState = State.INACTIVE;
        this.auctionLogic = new AuctionLogic(this);
        this.mc = Minecraft.getInstance();
        eventBus.register(this);
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        switch (currentState) {
            case ACTIVE:
                processActive();
                break;
            case INACTIVE:
                break;
        }
    }

    private void processActive() {
        if (mc.currentScreen instanceof ChestScreen chestScreen) {
            auctionLogic.processBuy(chestScreen);
        }
    }

    public void toggleState() {
        currentState = (currentState == State.ACTIVE) ? State.INACTIVE : State.ACTIVE;
    }

    public static boolean isActive() {
        return currentState == State.ACTIVE;
    }

    public enum State {
        ACTIVE,
        INACTIVE
    }
}

Думаю пастером помог улучшить свой пенис клиент
Если что пишите всегда рад помочь)
 
ебуч.. случай. это че такое бл...

1723864064045.png
 
SS - Скрытое содержимое

Ну что приступим заходим в ChestScreen

Идем на 74 строку и вставляем это:
ChestScreen:
Expand Collapse Copy
button.setMessage(new StringTextComponent("" + (ActivationLogic.isActive() ? TextFormatting.GREEN + "AutoBuy: ON" : TextFormatting.RED + "AutoBuy: OFF")));

Дальше идем в ActivationLogic и заменяем все на этот код:
ActivationLogic:
Expand Collapse Copy
package im.expensive.ui.ab.logic;

import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import im.expensive.ui.ab.model.ItemStorage;
import im.expensive.events.EventUpdate;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.inventory.ChestScreen;
import net.minecraft.item.ItemStack;

import java.util.LinkedList;
import java.util.List;

@FieldDefaults(level = AccessLevel.PRIVATE)
public class ActivationLogic {
    final Minecraft mc;
    [USER=270918]@Getter[/USER]
    [USER=1132491]@setter[/USER]
    public static State currentState;
    protected final ItemStorage itemStorage;
    public final List<ItemStack> itemList = new LinkedList<>();
    private final AuctionLogic auctionLogic;

    public ActivationLogic(ItemStorage itemStorage, EventBus eventBus) {
        this.itemStorage = itemStorage;
        this.currentState = State.INACTIVE;
        this.auctionLogic = new AuctionLogic(this);
        this.mc = Minecraft.getInstance();
        eventBus.register(this);
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        switch (currentState) {
            case ACTIVE:
                processActive();
                break;
            case INACTIVE:
                break;
        }
    }

    private void processActive() {
        if (mc.currentScreen instanceof ChestScreen chestScreen) {
            auctionLogic.processBuy(chestScreen);
        }
    }

    public void toggleState() {
        currentState = (currentState == State.ACTIVE) ? State.INACTIVE : State.ACTIVE;
    }

    public static boolean isActive() {
        return currentState == State.ACTIVE;
    }

    public enum State {
        ACTIVE,
        INACTIVE
    }
}

Думаю пастером помог улучшить свой пенис клиент
Если что пишите всегда рад помочь)
стоп а что изменилось с обычного на этот:FailFish:
 
помогите тут ошибки
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
 
помогите тут ошибки
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
но всё же работает,сойдёт и так)
 
SS - Скрытое содержимое

Ну что приступим заходим в ChestScreen

Идем на 74 строку и вставляем это:
ChestScreen:
Expand Collapse Copy
button.setMessage(new StringTextComponent("" + (ActivationLogic.isActive() ? TextFormatting.GREEN + "AutoBuy: ON" : TextFormatting.RED + "AutoBuy: OFF")));

Дальше идем в ActivationLogic и заменяем все на этот код:
ActivationLogic:
Expand Collapse Copy
package im.expensive.ui.ab.logic;

import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import im.expensive.ui.ab.model.ItemStorage;
import im.expensive.events.EventUpdate;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.inventory.ChestScreen;
import net.minecraft.item.ItemStack;

import java.util.LinkedList;
import java.util.List;

@FieldDefaults(level = AccessLevel.PRIVATE)
public class ActivationLogic {
    final Minecraft mc;
    [USER=270918]@Getter[/USER]
    [USER=1132491]@setter[/USER]
    public static State currentState;
    protected final ItemStorage itemStorage;
    public final List<ItemStack> itemList = new LinkedList<>();
    private final AuctionLogic auctionLogic;

    public ActivationLogic(ItemStorage itemStorage, EventBus eventBus) {
        this.itemStorage = itemStorage;
        this.currentState = State.INACTIVE;
        this.auctionLogic = new AuctionLogic(this);
        this.mc = Minecraft.getInstance();
        eventBus.register(this);
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        switch (currentState) {
            case ACTIVE:
                processActive();
                break;
            case INACTIVE:
                break;
        }
    }

    private void processActive() {
        if (mc.currentScreen instanceof ChestScreen chestScreen) {
            auctionLogic.processBuy(chestScreen);
        }
    }

    public void toggleState() {
        currentState = (currentState == State.ACTIVE) ? State.INACTIVE : State.ACTIVE;
    }

    public static boolean isActive() {
        return currentState == State.ACTIVE;
    }

    public enum State {
        ACTIVE,
        INACTIVE
    }
}

Думаю пастером помог улучшить свой пенис клиент
Если что пишите всегда рад помочь)
ебать красиво ыыы
 
помогите тут ошибки
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
[14:53:23] [Client thread/ERROR]: @ Post render
[14:53:23] [Client thread/ERROR]: 1284: Stack underflow
[14:53:23] [Client thread/ERROR]: ########## GL ERROR ##########
Научись пастить
ебуч.. случай. это че такое бл...

Посмотреть вложение 283506
убери все кроме @Getter и @setter
 
Последнее редактирование:
всё сделал по гайду не робит :(
 
Так а смысл? если в дефолт экспе такое же
 
SS - Скрытое содержимое

Ну что приступим заходим в ChestScreen

Идем на 74 строку и вставляем это:
ChestScreen:
Expand Collapse Copy
button.setMessage(new StringTextComponent("" + (ActivationLogic.isActive() ? TextFormatting.GREEN + "AutoBuy: ON" : TextFormatting.RED + "AutoBuy: OFF")));

Дальше идем в ActivationLogic и заменяем все на этот код:
ActivationLogic:
Expand Collapse Copy
package im.expensive.ui.ab.logic;

import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import im.expensive.ui.ab.model.ItemStorage;
import im.expensive.events.EventUpdate;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.FieldDefaults;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.inventory.ChestScreen;
import net.minecraft.item.ItemStack;

import java.util.LinkedList;
import java.util.List;

@FieldDefaults(level = AccessLevel.PRIVATE)
public class ActivationLogic {
    final Minecraft mc;
    [USER=270918]@Getter[/USER]
    [USER=1132491]@setter[/USER]
    public static State currentState;
    protected final ItemStorage itemStorage;
    public final List<ItemStack> itemList = new LinkedList<>();
    private final AuctionLogic auctionLogic;

    public ActivationLogic(ItemStorage itemStorage, EventBus eventBus) {
        this.itemStorage = itemStorage;
        this.currentState = State.INACTIVE;
        this.auctionLogic = new AuctionLogic(this);
        this.mc = Minecraft.getInstance();
        eventBus.register(this);
    }

    @Subscribe
    private void onUpdate(EventUpdate e) {
        switch (currentState) {
            case ACTIVE:
                processActive();
                break;
            case INACTIVE:
                break;
        }
    }

    private void processActive() {
        if (mc.currentScreen instanceof ChestScreen chestScreen) {
            auctionLogic.processBuy(chestScreen);
        }
    }

    public void toggleState() {
        currentState = (currentState == State.ACTIVE) ? State.INACTIVE : State.ACTIVE;
    }

    public static boolean isActive() {
        return currentState == State.ACTIVE;
    }

    public enum State {
        ACTIVE,
        INACTIVE
    }
}

Думаю пастером помог улучшить свой пенис клиент
Если что пишите всегда рад помочь)
не ровно, позор
 
Назад
Сверху Снизу