Часть функционала ChestScreen кнопочки / all base

деттекс уже спастил
 

Вложения

  • 1749017387066.png
    1749017387066.png
    204 KB · Просмотры: 43
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
/up
 
Кукусики югейм юзеры (я тоже юзер xD) крч вот вам кнопочки типо Выбросить всё - Сложить всё - Забрать всё, как в нурике(noad)
Взято с моего чита AquaClient(noad)
Вот вам сс
Пожалуйста, авторизуйтесь для просмотра ссылки.

ChestScreen:
Expand Collapse Copy
package net.minecraft.client.gui.screen.inventory;

import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;

import net.minecraft.inventory.container.ClickType;
import nursultan.game.operation.wamost.api.ModuleManager;
import nursultan.system.Nursultan;
import nursultan.game.operation.misc.SelfDestruct;
import nursultan.game.advantage.advisee.IMinecraft;
import net.minecraft.client.gui.IHasContainer;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ChestContainer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;

public class ChestScreen extends ContainerScreen<ChestContainer> implements IHasContainer<ChestContainer>, IMinecraft {
/**
* The ResourceLocation containing the chest GUI texture.
*/
private static final ResourceLocation CHEST_GUI_TEXTURE = new ResourceLocation("textures/gui/container/generic_54.png");

/**
* Window height is calculated with these values; the more rows, the higher
*/
private final int inventoryRows;
private final ITextComponent title;

public ChestScreen(ChestContainer container, PlayerInventory playerInventory, ITextComponent title) {
super(container, playerInventory, title);
this.title = title;
this.passEvents = false;
int i = 222;
int j = 114;
this.inventoryRows = container.getNumRows();
this.ySize = 114 + this.inventoryRows * 18;
this.playerInventoryTitleY = this.ySize - 94;
}

Button button;
ModuleManager moduleManager = Nursultan.getInst().getModuleManager();
SelfDestruct selfDestruct = moduleManager.getSelfDestruct();
[USER=1367676]@override[/USER]
protected void init() {
super.init();
if (!selfDestruct.unhooked) {
this.addButton(new Button(width / 2 + 90, height / 2 - 84, 90, 20,
new StringTextComponent("Сложить всё"), (button) -> {
if (mc.player != null && mc.playerController != null) {
dropItems();
}
}));
}
if (!selfDestruct.unhooked) {
this.addButton(new Button(width / 2 + 90, height / 2 - 62, 90, 20,
new StringTextComponent("Забрать всё"), (button) -> {
if (mc.player != null && mc.playerController != null) {
takeItems();
}
}));
}
if (!selfDestruct.unhooked) {
this.addButton(new Button(width / 2 + 90, height / 2 - 40, 90, 20,
new StringTextComponent("Выбросить всё"), (button) -> {
if (mc.player != null && mc.playerController != null) {
throwItems();
}
}));
}
}

public void dropItems() {
for (int i = 0; i < this.container.getInventory().size() && this.mc.currentScreen == this; ++i) {
mc.playerController.windowClick(this.container.windowId, i, 0, ClickType.QUICK_MOVE, mc.player);
}
}

public void takeItems() {
int chestSlots = this.inventoryRows * 9;
for (int i = 0; i < chestSlots && this.mc.currentScreen == this; ++i) {
mc.playerController.windowClick(this.container.windowId, i, 0, ClickType.QUICK_MOVE, mc.player);
}
}

public void throwItems() {
int chestSlots = this.inventoryRows * 9;
for (int i = 0; i < chestSlots && this.mc.currentScreen == this; ++i) {
mc.playerController.windowClick(this.container.windowId, i, 1, ClickType.THROW, mc.player);
}
}

[USER=1367676]@override[/USER]
public void closeScreen() {
super.closeScreen();
}

[USER=1367676]@override[/USER]
public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
this.renderBackground(matrixStack);
super.render(matrixStack, mouseX, mouseY, partialTicks);
this.renderHoveredTooltip(matrixStack, mouseX, mouseY);
}

[USER=1367676]@override[/USER]
protected void drawGuiContainerBackgroundLayer(MatrixStack matrixStack, float partialTicks, int x, int y) {
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.minecraft.getTextureManager().bindTexture(CHEST_GUI_TEXTURE);
int i = (this.width - this.xSize) / 2;
int j = (this.height - this.ySize) / 2;
this.blit(matrixStack, i, j, 0, 0, this.xSize, this.inventoryRows * 18 + 17);
this.blit(matrixStack, i, j + this.inventoryRows * 18 + 17, 0, 126, this.xSize, 96);
}
}
одобрите пока бабка не повесилась
это разве сложно зделать? /del
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
peni$ $$$$$$elfcode
 
спасибо спастил в свой Supermegaultrapuperselfcode Client
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
я нее понял нехуя
1749816814861.png
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Назад
Сверху Снизу