The Great Renamening of 2020
This commit is contained in:
+28
-28
@@ -11,29 +11,29 @@ import net.minecraft.item.ItemStack;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
import appeng.api.definitions.IParts;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerChest;
|
||||
import appeng.container.implementations.ContainerCraftingTerm;
|
||||
import appeng.container.implementations.ContainerMEMonitorable;
|
||||
import appeng.container.implementations.ContainerPatternTerm;
|
||||
import appeng.container.implementations.ContainerWirelessTerm;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.TabButton;
|
||||
import appeng.container.implementations.ChestContainer;
|
||||
import appeng.container.implementations.CraftingTermContainer;
|
||||
import appeng.container.implementations.MEMonitorableContainer;
|
||||
import appeng.container.implementations.PatternTermContainer;
|
||||
import appeng.container.implementations.WirelessTermContainer;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import appeng.helpers.WirelessTerminalGuiObject;
|
||||
import appeng.parts.reporting.PartCraftingTerminal;
|
||||
import appeng.parts.reporting.PartPatternTerminal;
|
||||
import appeng.parts.reporting.PartTerminal;
|
||||
import appeng.tile.storage.TileChest;
|
||||
import appeng.parts.reporting.CraftingTerminalPart;
|
||||
import appeng.parts.reporting.PatternTerminalPart;
|
||||
import appeng.parts.reporting.TerminalPart;
|
||||
import appeng.tile.storage.ChestTileEntity;
|
||||
|
||||
/**
|
||||
* Utility class for sub-screens of other containers that allow returning to the
|
||||
* primary container UI.
|
||||
*/
|
||||
final class AESubGui {
|
||||
final class AESubScreen {
|
||||
|
||||
private final AEBaseGui<?> gui;
|
||||
private final AEBaseScreen<?> gui;
|
||||
private final ContainerType<?> previousContainerType;
|
||||
private final ItemStack previousContainerIcon;
|
||||
|
||||
@@ -41,19 +41,19 @@ final class AESubGui {
|
||||
* Based on the container we're opening for, try to determine what it's
|
||||
* "primary" GUI would be so that we can go back to it.
|
||||
*/
|
||||
public AESubGui(AEBaseGui<?> gui, Object containerTarget) {
|
||||
public AESubScreen(AEBaseScreen<?> gui, Object containerTarget) {
|
||||
this.gui = gui;
|
||||
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
final IParts parts = definitions.parts();
|
||||
|
||||
if (containerTarget instanceof TileChest) {
|
||||
if (containerTarget instanceof ChestTileEntity) {
|
||||
// A chest is also a priority host, but the priority _interface_ can only be
|
||||
// opened from the
|
||||
// chest ui that doesn't actually show the contents of the inserted cell.
|
||||
IPriorityHost priorityHost = (IPriorityHost) containerTarget;
|
||||
this.previousContainerIcon = priorityHost.getItemStackRepresentation();
|
||||
this.previousContainerType = ContainerChest.TYPE;
|
||||
this.previousContainerType = ChestContainer.TYPE;
|
||||
}
|
||||
|
||||
else if (containerTarget instanceof IPriorityHost) {
|
||||
@@ -64,22 +64,22 @@ final class AESubGui {
|
||||
|
||||
else if (containerTarget instanceof WirelessTerminalGuiObject) {
|
||||
this.previousContainerIcon = definitions.items().wirelessTerminal().maybeStack(1).orElse(ItemStack.EMPTY);
|
||||
this.previousContainerType = ContainerWirelessTerm.TYPE;
|
||||
this.previousContainerType = WirelessTermContainer.TYPE;
|
||||
}
|
||||
|
||||
else if (containerTarget instanceof PartTerminal) {
|
||||
else if (containerTarget instanceof TerminalPart) {
|
||||
this.previousContainerIcon = parts.terminal().maybeStack(1).orElse(ItemStack.EMPTY);
|
||||
this.previousContainerType = ContainerMEMonitorable.TYPE;
|
||||
this.previousContainerType = MEMonitorableContainer.TYPE;
|
||||
}
|
||||
|
||||
else if (containerTarget instanceof PartCraftingTerminal) {
|
||||
else if (containerTarget instanceof CraftingTerminalPart) {
|
||||
this.previousContainerIcon = parts.craftingTerminal().maybeStack(1).orElse(ItemStack.EMPTY);
|
||||
this.previousContainerType = ContainerCraftingTerm.TYPE;
|
||||
this.previousContainerType = CraftingTermContainer.TYPE;
|
||||
}
|
||||
|
||||
else if (containerTarget instanceof PartPatternTerminal) {
|
||||
else if (containerTarget instanceof PatternTerminalPart) {
|
||||
this.previousContainerIcon = parts.patternTerminal().maybeStack(1).orElse(ItemStack.EMPTY);
|
||||
this.previousContainerType = ContainerPatternTerm.TYPE;
|
||||
this.previousContainerType = PatternTermContainer.TYPE;
|
||||
}
|
||||
|
||||
else {
|
||||
@@ -88,17 +88,17 @@ final class AESubGui {
|
||||
}
|
||||
}
|
||||
|
||||
public final GuiTabButton addBackButton(Consumer<GuiTabButton> buttonAdder, int x, int y) {
|
||||
public final TabButton addBackButton(Consumer<TabButton> buttonAdder, int x, int y) {
|
||||
return addBackButton(buttonAdder, x, y, null);
|
||||
}
|
||||
|
||||
public final GuiTabButton addBackButton(Consumer<GuiTabButton> buttonAdder, int x, int y, @Nullable String label) {
|
||||
public final TabButton addBackButton(Consumer<TabButton> buttonAdder, int x, int y, @Nullable String label) {
|
||||
if (this.previousContainerType != null && !previousContainerIcon.isEmpty()) {
|
||||
if (label == null) {
|
||||
label = previousContainerIcon.getDisplayName().getString();
|
||||
}
|
||||
ItemRenderer itemRenderer = gui.getMinecraft().getItemRenderer();
|
||||
GuiTabButton button = new GuiTabButton(gui.getGuiLeft() + x, gui.getGuiTop() + y, previousContainerIcon,
|
||||
TabButton button = new TabButton(gui.getGuiLeft() + x, gui.getGuiTop() + y, previousContainerIcon,
|
||||
label, itemRenderer, btn -> goBack());
|
||||
buttonAdder.accept(button);
|
||||
return button;
|
||||
@@ -107,7 +107,7 @@ final class AESubGui {
|
||||
}
|
||||
|
||||
public final void goBack() {
|
||||
NetworkHandler.instance().sendToServer(new PacketSwitchGuis(this.previousContainerType));
|
||||
NetworkHandler.instance().sendToServer(new SwitchGuisPacket(this.previousContainerType));
|
||||
}
|
||||
|
||||
}
|
||||
+15
-15
@@ -30,32 +30,32 @@ import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.items.IUpgradeModule;
|
||||
import appeng.client.gui.widgets.GuiActionButton;
|
||||
import appeng.client.gui.widgets.GuiSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiToggleButton;
|
||||
import appeng.container.implementations.ContainerCellWorkbench;
|
||||
import appeng.client.gui.widgets.ActionButton;
|
||||
import appeng.client.gui.widgets.SettingToggleButton;
|
||||
import appeng.client.gui.widgets.ToggleButton;
|
||||
import appeng.container.implementations.CellWorkbenchContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
|
||||
public class GuiCellWorkbench extends GuiUpgradeable<ContainerCellWorkbench> {
|
||||
public class CellWorkbenchScreen extends UpgradeableScreen<CellWorkbenchContainer> {
|
||||
|
||||
private GuiToggleButton copyMode;
|
||||
private ToggleButton copyMode;
|
||||
|
||||
public GuiCellWorkbench(ContainerCellWorkbench container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CellWorkbenchScreen(CellWorkbenchContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 251;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons() {
|
||||
this.fuzzyMode = this.addButton(new GuiSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 68,
|
||||
this.fuzzyMode = this.addButton(new SettingToggleButton<>(this.guiLeft - 18, this.guiTop + 68,
|
||||
Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL, this::toggleFuzzyMode));
|
||||
this.addButton(new GuiActionButton(this.guiLeft - 18, this.guiTop + 28, ActionItems.WRENCH,
|
||||
this.addButton(new ActionButton(this.guiLeft - 18, this.guiTop + 28, ActionItems.WRENCH,
|
||||
act1 -> action("Partition")));
|
||||
this.addButton(
|
||||
new GuiActionButton(this.guiLeft - 18, this.guiTop + 8, ActionItems.CLOSE, act -> action("Clear")));
|
||||
this.copyMode = this.addButton(new GuiToggleButton(this.guiLeft - 18, this.guiTop + 48, 11 * 16 + 5,
|
||||
new ActionButton(this.guiLeft - 18, this.guiTop + 8, ActionItems.CLOSE, act -> action("Clear")));
|
||||
this.copyMode = this.addButton(new ToggleButton(this.guiLeft - 18, this.guiTop + 48, 11 * 16 + 5,
|
||||
12 * 16 + 5, GuiText.CopyMode.getLocal(), GuiText.CopyModeDesc.getLocal(), act -> action("CopyMode")));
|
||||
}
|
||||
|
||||
@@ -146,12 +146,12 @@ public class GuiCellWorkbench extends GuiUpgradeable<ContainerCellWorkbench> {
|
||||
}
|
||||
|
||||
private void action(String type) {
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("CellWorkbench.Action", type));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("CellWorkbench.Action", type));
|
||||
}
|
||||
|
||||
private void toggleFuzzyMode(GuiSettingToggleButton<FuzzyMode> button, boolean backwards) {
|
||||
private void toggleFuzzyMode(SettingToggleButton<FuzzyMode> button, boolean backwards) {
|
||||
FuzzyMode fz = button.getNextValue(backwards);
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("CellWorkbench.Fuzzy", fz.name()));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("CellWorkbench.Fuzzy", fz.name()));
|
||||
}
|
||||
|
||||
}
|
||||
+9
-9
@@ -22,17 +22,17 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerChest;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.TabButton;
|
||||
import appeng.container.implementations.ChestContainer;
|
||||
import appeng.container.implementations.PriorityContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
|
||||
public class GuiChest extends AEBaseGui<ContainerChest> {
|
||||
public class ChestScreen extends AEBaseScreen<ChestContainer> {
|
||||
|
||||
public GuiChest(ContainerChest container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public ChestScreen(ChestContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
@@ -41,12 +41,12 @@ public class GuiChest extends AEBaseGui<ContainerChest> {
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.addButton(new GuiTabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.itemRenderer, btn -> openPriority()));
|
||||
}
|
||||
|
||||
private void openPriority() {
|
||||
NetworkHandler.instance().sendToServer(new PacketSwitchGuis(ContainerPriority.TYPE));
|
||||
NetworkHandler.instance().sendToServer(new SwitchGuisPacket(PriorityContainer.TYPE));
|
||||
}
|
||||
|
||||
@Override
|
||||
+11
-11
@@ -24,19 +24,19 @@ import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.api.config.CondenserOutput;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiProgressBar;
|
||||
import appeng.client.gui.widgets.GuiProgressBar.Direction;
|
||||
import appeng.client.gui.widgets.GuiServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiSettingToggleButton;
|
||||
import appeng.container.implementations.ContainerCondenser;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.ProgressBar;
|
||||
import appeng.client.gui.widgets.ProgressBar.Direction;
|
||||
import appeng.client.gui.widgets.ServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.SettingToggleButton;
|
||||
import appeng.container.implementations.CondenserContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
public class GuiCondenser extends AEBaseGui<ContainerCondenser> {
|
||||
public class CondenserScreen extends AEBaseScreen<CondenserContainer> {
|
||||
|
||||
private GuiSettingToggleButton<CondenserOutput> mode;
|
||||
private SettingToggleButton<CondenserOutput> mode;
|
||||
|
||||
public GuiCondenser(ContainerCondenser container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CondenserScreen(CondenserContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 197;
|
||||
}
|
||||
@@ -45,10 +45,10 @@ public class GuiCondenser extends AEBaseGui<ContainerCondenser> {
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.mode = new GuiServerSettingToggleButton<>(128 + this.guiLeft, 52 + this.guiTop, Settings.CONDENSER_OUTPUT,
|
||||
this.mode = new ServerSettingToggleButton<>(128 + this.guiLeft, 52 + this.guiTop, Settings.CONDENSER_OUTPUT,
|
||||
this.container.getOutput());
|
||||
|
||||
this.addButton(new GuiProgressBar(this.container, "guis/condenser.png", 120 + this.guiLeft, 25 + this.guiTop,
|
||||
this.addButton(new ProgressBar(this.container, "guis/condenser.png", 120 + this.guiLeft, 25 + this.guiTop,
|
||||
178, 25, 6, 18, Direction.VERTICAL, GuiText.StoredEnergy.getLocal()));
|
||||
this.addButton(this.mode);
|
||||
}
|
||||
+11
-11
@@ -24,24 +24,24 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiNumberBox;
|
||||
import appeng.container.implementations.ContainerCraftAmount;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.NumberBox;
|
||||
import appeng.container.implementations.CraftAmountContainer;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketCraftRequest;
|
||||
import appeng.core.sync.packets.CraftRequestPacket;
|
||||
|
||||
public class GuiCraftAmount extends AEBaseGui<ContainerCraftAmount> {
|
||||
private final AESubGui subGui;
|
||||
public class CraftAmountScreen extends AEBaseScreen<CraftAmountContainer> {
|
||||
private final AESubScreen subGui;
|
||||
|
||||
private GuiNumberBox amountToCraft;
|
||||
private NumberBox amountToCraft;
|
||||
|
||||
private Button next;
|
||||
|
||||
public GuiCraftAmount(ContainerCraftAmount container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CraftAmountScreen(CraftAmountContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.subGui = new AESubGui(this, container.getTarget());
|
||||
this.subGui = new AESubScreen(this, container.getTarget());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -68,7 +68,7 @@ public class GuiCraftAmount extends AEBaseGui<ContainerCraftAmount> {
|
||||
|
||||
subGui.addBackButton(this::addButton, 154, 0);
|
||||
|
||||
this.amountToCraft = new GuiNumberBox(this.font, this.guiLeft + 62, this.guiTop + 57, 59, this.font.FONT_HEIGHT,
|
||||
this.amountToCraft = new NumberBox(this.font, this.guiLeft + 62, this.guiTop + 57, 59, this.font.FONT_HEIGHT,
|
||||
Integer.class);
|
||||
this.amountToCraft.setEnableBackgroundDrawing(false);
|
||||
this.amountToCraft.setMaxStringLength(16);
|
||||
@@ -80,7 +80,7 @@ public class GuiCraftAmount extends AEBaseGui<ContainerCraftAmount> {
|
||||
|
||||
private void confirm(Button button) {
|
||||
NetworkHandler.instance()
|
||||
.sendToServer(new PacketCraftRequest(Integer.parseInt(this.amountToCraft.getText()), hasShiftDown()));
|
||||
.sendToServer(new CraftRequestPacket(Integer.parseInt(this.amountToCraft.getText()), hasShiftDown()));
|
||||
}
|
||||
|
||||
@Override
|
||||
+11
-11
@@ -37,17 +37,17 @@ import appeng.api.AEApi;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiScrollbar;
|
||||
import appeng.container.implementations.ContainerCraftConfirm;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.Scrollbar;
|
||||
import appeng.container.implementations.CraftConfirmContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class GuiCraftConfirm extends AEBaseGui<ContainerCraftConfirm> {
|
||||
public class CraftConfirmScreen extends AEBaseScreen<CraftConfirmContainer> {
|
||||
|
||||
private final AESubGui subGui;
|
||||
private final AESubScreen subGui;
|
||||
|
||||
private final int rows = 5;
|
||||
|
||||
@@ -64,13 +64,13 @@ public class GuiCraftConfirm extends AEBaseGui<ContainerCraftConfirm> {
|
||||
private Button selectCPU;
|
||||
private int tooltip = -1;
|
||||
|
||||
public GuiCraftConfirm(ContainerCraftConfirm container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CraftConfirmScreen(CraftConfirmContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.subGui = new AESubGui(this, container.getTarget());
|
||||
this.subGui = new AESubScreen(this, container.getTarget());
|
||||
this.xSize = 238;
|
||||
this.ySize = 206;
|
||||
|
||||
final GuiScrollbar scrollbar = new GuiScrollbar();
|
||||
final Scrollbar scrollbar = new Scrollbar();
|
||||
this.setScrollBar(scrollbar);
|
||||
}
|
||||
|
||||
@@ -450,11 +450,11 @@ public class GuiCraftConfirm extends AEBaseGui<ContainerCraftConfirm> {
|
||||
|
||||
private void selectNextCpu() {
|
||||
final boolean backwards = minecraft.mouseHelper.isRightDown();
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("Terminal.Cpu", backwards ? "Prev" : "Next"));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("Terminal.Cpu", backwards ? "Prev" : "Next"));
|
||||
}
|
||||
|
||||
private void start() {
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("Terminal.Start", "Start"));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("Terminal.Start", "Start"));
|
||||
}
|
||||
|
||||
}
|
||||
+8
-8
@@ -42,18 +42,18 @@ import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiScrollbar;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.Scrollbar;
|
||||
import appeng.client.gui.widgets.ISortSource;
|
||||
import appeng.container.implementations.ContainerCraftingCPU;
|
||||
import appeng.container.implementations.CraftingCPUContainer;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.ReadableNumberConverter;
|
||||
|
||||
public class GuiCraftingCPU<T extends ContainerCraftingCPU> extends AEBaseGui<T> implements ISortSource {
|
||||
public class CraftingCPUScreen<T extends CraftingCPUContainer> extends AEBaseScreen<T> implements ISortSource {
|
||||
private static final int GUI_HEIGHT = 184;
|
||||
private static final int GUI_WIDTH = 238;
|
||||
|
||||
@@ -90,12 +90,12 @@ public class GuiCraftingCPU<T extends ContainerCraftingCPU> extends AEBaseGui<T>
|
||||
private Button cancel;
|
||||
private int tooltip = -1;
|
||||
|
||||
public GuiCraftingCPU(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CraftingCPUScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = GUI_HEIGHT;
|
||||
this.xSize = GUI_WIDTH;
|
||||
|
||||
final GuiScrollbar scrollbar = new GuiScrollbar();
|
||||
final Scrollbar scrollbar = new Scrollbar();
|
||||
this.setScrollBar(scrollbar);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class GuiCraftingCPU<T extends ContainerCraftingCPU> extends AEBaseGui<T>
|
||||
}
|
||||
|
||||
private void cancel() {
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("TileCrafting.Cancel", "Cancel"));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("TileCrafting.Cancel", "Cancel"));
|
||||
}
|
||||
|
||||
@Override
|
||||
+7
-7
@@ -26,20 +26,20 @@ import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.container.implementations.ContainerCraftingStatus;
|
||||
import appeng.container.implementations.CraftingStatusContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
|
||||
public class GuiCraftingStatus extends GuiCraftingCPU<ContainerCraftingStatus> {
|
||||
public class CraftingStatusScreen extends CraftingCPUScreen<CraftingStatusContainer> {
|
||||
|
||||
private final AESubGui subGui;
|
||||
private final AESubScreen subGui;
|
||||
|
||||
private Button selectCPU;
|
||||
|
||||
public GuiCraftingStatus(ContainerCraftingStatus container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CraftingStatusScreen(CraftingStatusContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.subGui = new AESubGui(this, container.getTarget());
|
||||
this.subGui = new AESubScreen(this, container.getTarget());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,7 +90,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU<ContainerCraftingStatus> {
|
||||
// FIXME: Extract to separate class? Shared with GuiCraftConfirm
|
||||
private void selectNextCpu() {
|
||||
final boolean backwards = minecraft.mouseHelper.isRightDown();
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("Terminal.Cpu", backwards ? "Prev" : "Next"));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("Terminal.Cpu", backwards ? "Prev" : "Next"));
|
||||
}
|
||||
|
||||
}
|
||||
+9
-9
@@ -23,17 +23,17 @@ import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.client.gui.widgets.GuiActionButton;
|
||||
import appeng.container.implementations.ContainerCraftingTerm;
|
||||
import appeng.container.slot.SlotCraftingMatrix;
|
||||
import appeng.client.gui.widgets.ActionButton;
|
||||
import appeng.container.implementations.CraftingTermContainer;
|
||||
import appeng.container.slot.CraftingMatrixSlot;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketInventoryAction;
|
||||
import appeng.core.sync.packets.InventoryActionPacket;
|
||||
import appeng.helpers.InventoryAction;
|
||||
|
||||
public class GuiCraftingTerm extends GuiMEMonitorable<ContainerCraftingTerm> {
|
||||
public class CraftingTermScreen extends MEMonitorableScreen<CraftingTermContainer> {
|
||||
|
||||
public GuiCraftingTerm(ContainerCraftingTerm container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public CraftingTermScreen(CraftingTermContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.setReservedSpace(73);
|
||||
}
|
||||
@@ -41,13 +41,13 @@ public class GuiCraftingTerm extends GuiMEMonitorable<ContainerCraftingTerm> {
|
||||
private void clear() {
|
||||
Slot s = null;
|
||||
for (final Object j : this.container.inventorySlots) {
|
||||
if (j instanceof SlotCraftingMatrix) {
|
||||
if (j instanceof CraftingMatrixSlot) {
|
||||
s = (Slot) j;
|
||||
}
|
||||
}
|
||||
|
||||
if (s != null) {
|
||||
final PacketInventoryAction p = new PacketInventoryAction(InventoryAction.MOVE_REGION, s.slotNumber, 0);
|
||||
final InventoryActionPacket p = new InventoryActionPacket(InventoryAction.MOVE_REGION, s.slotNumber, 0);
|
||||
NetworkHandler.instance().sendToServer(p);
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable<ContainerCraftingTerm> {
|
||||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
GuiActionButton clearBtn = this.addButton(new GuiActionButton(this.guiLeft + 92, this.guiTop + this.ySize - 156,
|
||||
ActionButton clearBtn = this.addButton(new ActionButton(this.guiLeft + 92, this.guiTop + this.ySize - 156,
|
||||
ActionItems.STASH, btn -> clear()));
|
||||
clearBtn.setHalfSize(true);
|
||||
}
|
||||
+9
-9
@@ -22,17 +22,17 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerDrive;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.TabButton;
|
||||
import appeng.container.implementations.DriveContainer;
|
||||
import appeng.container.implementations.PriorityContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
|
||||
public class GuiDrive extends AEBaseGui<ContainerDrive> {
|
||||
public class DriveScreen extends AEBaseScreen<DriveContainer> {
|
||||
|
||||
public GuiDrive(ContainerDrive container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public DriveScreen(DriveContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 199;
|
||||
}
|
||||
@@ -41,12 +41,12 @@ public class GuiDrive extends AEBaseGui<ContainerDrive> {
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.addButton(new GuiTabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.itemRenderer, btn -> openPriorityGui()));
|
||||
}
|
||||
|
||||
private void openPriorityGui() {
|
||||
NetworkHandler.instance().sendToServer(new PacketSwitchGuis(ContainerPriority.TYPE));
|
||||
NetworkHandler.instance().sendToServer(new SwitchGuisPacket(PriorityContainer.TYPE));
|
||||
}
|
||||
|
||||
@Override
|
||||
+14
-14
@@ -24,32 +24,32 @@ import net.minecraft.util.text.ITextComponent;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.client.gui.widgets.GuiServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerFormationPlane;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.client.gui.widgets.ServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.SettingToggleButton;
|
||||
import appeng.client.gui.widgets.TabButton;
|
||||
import appeng.container.implementations.FormationPlaneContainer;
|
||||
import appeng.container.implementations.PriorityContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
|
||||
public class GuiFormationPlane extends GuiUpgradeable<ContainerFormationPlane> {
|
||||
public class FormationPlaneScreen extends UpgradeableScreen<FormationPlaneContainer> {
|
||||
|
||||
private GuiSettingToggleButton<YesNo> placeMode;
|
||||
private SettingToggleButton<YesNo> placeMode;
|
||||
|
||||
public GuiFormationPlane(ContainerFormationPlane container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public FormationPlaneScreen(FormationPlaneContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 251;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons() {
|
||||
this.placeMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 28, Settings.PLACE_BLOCK,
|
||||
this.placeMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 28, Settings.PLACE_BLOCK,
|
||||
YesNo.YES);
|
||||
this.fuzzyMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 48, Settings.FUZZY_MODE,
|
||||
this.fuzzyMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 48, Settings.FUZZY_MODE,
|
||||
FuzzyMode.IGNORE_ALL);
|
||||
|
||||
this.addButton(new GuiTabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.itemRenderer, btn -> openPriorityGui()));
|
||||
|
||||
this.addButton(this.placeMode);
|
||||
@@ -66,7 +66,7 @@ public class GuiFormationPlane extends GuiUpgradeable<ContainerFormationPlane> {
|
||||
}
|
||||
|
||||
if (this.placeMode != null) {
|
||||
this.placeMode.set(((ContainerFormationPlane) this.cvb).getPlaceMode());
|
||||
this.placeMode.set(((FormationPlaneContainer) this.cvb).getPlaceMode());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class GuiFormationPlane extends GuiUpgradeable<ContainerFormationPlane> {
|
||||
}
|
||||
|
||||
private void openPriorityGui() {
|
||||
NetworkHandler.instance().sendToServer(new PacketSwitchGuis(ContainerPriority.TYPE));
|
||||
NetworkHandler.instance().sendToServer(new SwitchGuisPacket(PriorityContainer.TYPE));
|
||||
}
|
||||
|
||||
}
|
||||
+4
-4
@@ -22,13 +22,13 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.container.implementations.ContainerGrinder;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.container.implementations.GrinderContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
public class GuiGrinder extends AEBaseGui<ContainerGrinder> {
|
||||
public class GrinderScreen extends AEBaseScreen<GrinderContainer> {
|
||||
|
||||
public GuiGrinder(ContainerGrinder container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public GrinderScreen(GrinderContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 176;
|
||||
}
|
||||
+12
-12
@@ -27,31 +27,31 @@ import appeng.api.config.OperationMode;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
import appeng.client.gui.widgets.GuiServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiSettingToggleButton;
|
||||
import appeng.container.implementations.ContainerIOPort;
|
||||
import appeng.client.gui.widgets.ServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.SettingToggleButton;
|
||||
import appeng.container.implementations.IOPortContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
public class GuiIOPort extends GuiUpgradeable<ContainerIOPort> {
|
||||
public class IOPortScreen extends UpgradeableScreen<IOPortContainer> {
|
||||
|
||||
private GuiSettingToggleButton<FullnessMode> fullMode;
|
||||
private GuiSettingToggleButton<OperationMode> operationMode;
|
||||
private SettingToggleButton<FullnessMode> fullMode;
|
||||
private SettingToggleButton<OperationMode> operationMode;
|
||||
|
||||
public GuiIOPort(ContainerIOPort container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public IOPortScreen(IOPortContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons() {
|
||||
this.fullMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8, Settings.FULLNESS_MODE,
|
||||
this.fullMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8, Settings.FULLNESS_MODE,
|
||||
FullnessMode.EMPTY);
|
||||
this.operationMode = new GuiServerSettingToggleButton<>(this.guiLeft + 80, this.guiTop + 17,
|
||||
this.operationMode = new ServerSettingToggleButton<>(this.guiLeft + 80, this.guiTop + 17,
|
||||
Settings.OPERATION_MODE, OperationMode.EMPTY);
|
||||
|
||||
this.addButton(this.operationMode);
|
||||
this.addButton(this.fullMode);
|
||||
this.redstoneMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 28,
|
||||
this.redstoneMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 28,
|
||||
Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE);
|
||||
addButton(this.redstoneMode);
|
||||
}
|
||||
@@ -66,11 +66,11 @@ public class GuiIOPort extends GuiUpgradeable<ContainerIOPort> {
|
||||
}
|
||||
|
||||
if (this.operationMode != null) {
|
||||
this.operationMode.set(((ContainerIOPort) this.cvb).getOperationMode());
|
||||
this.operationMode.set(((IOPortContainer) this.cvb).getOperationMode());
|
||||
}
|
||||
|
||||
if (this.fullMode != null) {
|
||||
this.fullMode.set(((ContainerIOPort) this.cvb).getFullMode());
|
||||
this.fullMode.set(((IOPortContainer) this.cvb).getFullMode());
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -22,17 +22,17 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiProgressBar;
|
||||
import appeng.client.gui.widgets.GuiProgressBar.Direction;
|
||||
import appeng.container.implementations.ContainerInscriber;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.ProgressBar;
|
||||
import appeng.client.gui.widgets.ProgressBar.Direction;
|
||||
import appeng.container.implementations.InscriberContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
public class GuiInscriber extends AEBaseGui<ContainerInscriber> {
|
||||
public class InscriberScreen extends AEBaseScreen<InscriberContainer> {
|
||||
|
||||
private GuiProgressBar pb;
|
||||
private ProgressBar pb;
|
||||
|
||||
public GuiInscriber(ContainerInscriber container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public InscriberScreen(InscriberContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 176;
|
||||
this.xSize = this.hasToolbox() ? 246 : 211;
|
||||
@@ -46,7 +46,7 @@ public class GuiInscriber extends AEBaseGui<ContainerInscriber> {
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.pb = new GuiProgressBar(this.container, "guis/inscriber.png", 135, 39, 135, 177, 6, 18,
|
||||
this.pb = new ProgressBar(this.container, "guis/inscriber.png", 135, 39, 135, 177, 6, 18,
|
||||
Direction.VERTICAL);
|
||||
this.addButton(this.pb);
|
||||
}
|
||||
+19
-19
@@ -23,37 +23,37 @@ import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.client.gui.widgets.GuiServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.client.gui.widgets.GuiToggleButton;
|
||||
import appeng.container.implementations.ContainerInterface;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.client.gui.widgets.ServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.SettingToggleButton;
|
||||
import appeng.client.gui.widgets.TabButton;
|
||||
import appeng.client.gui.widgets.ToggleButton;
|
||||
import appeng.container.implementations.InterfaceContainer;
|
||||
import appeng.container.implementations.PriorityContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketConfigButton;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.core.sync.packets.ConfigButtonPacket;
|
||||
import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
|
||||
public class GuiInterface extends GuiUpgradeable<ContainerInterface> {
|
||||
public class InterfaceScreen extends UpgradeableScreen<InterfaceContainer> {
|
||||
|
||||
private GuiSettingToggleButton<YesNo> blockMode;
|
||||
private GuiToggleButton interfaceMode;
|
||||
private SettingToggleButton<YesNo> blockMode;
|
||||
private ToggleButton interfaceMode;
|
||||
|
||||
public GuiInterface(ContainerInterface container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public InterfaceScreen(InterfaceContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 211;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons() {
|
||||
this.addButton(new GuiTabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.itemRenderer, btn -> openPriorityGui()));
|
||||
|
||||
this.blockMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8, Settings.BLOCK,
|
||||
this.blockMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8, Settings.BLOCK,
|
||||
YesNo.NO);
|
||||
this.addButton(this.blockMode);
|
||||
|
||||
this.interfaceMode = new GuiToggleButton(this.guiLeft - 18, this.guiTop + 26, 84, 85,
|
||||
this.interfaceMode = new ToggleButton(this.guiLeft - 18, this.guiTop + 26, 84, 85,
|
||||
GuiText.InterfaceTerminal.getLocal(), GuiText.InterfaceTerminalHint.getLocal(),
|
||||
btn -> selectNextInterfaceMode());
|
||||
this.addButton(this.interfaceMode);
|
||||
@@ -62,11 +62,11 @@ public class GuiInterface extends GuiUpgradeable<ContainerInterface> {
|
||||
@Override
|
||||
public void drawFG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
|
||||
if (this.blockMode != null) {
|
||||
this.blockMode.set(((ContainerInterface) this.cvb).getBlockingMode());
|
||||
this.blockMode.set(((InterfaceContainer) this.cvb).getBlockingMode());
|
||||
}
|
||||
|
||||
if (this.interfaceMode != null) {
|
||||
this.interfaceMode.setState(((ContainerInterface) this.cvb).getInterfaceTerminalMode() == YesNo.YES);
|
||||
this.interfaceMode.setState(((InterfaceContainer) this.cvb).getInterfaceTerminalMode() == YesNo.YES);
|
||||
}
|
||||
|
||||
this.font.drawString(this.getGuiDisplayName(GuiText.Interface.getLocal()), 8, 6, 4210752);
|
||||
@@ -84,12 +84,12 @@ public class GuiInterface extends GuiUpgradeable<ContainerInterface> {
|
||||
}
|
||||
|
||||
private void openPriorityGui() {
|
||||
NetworkHandler.instance().sendToServer(new PacketSwitchGuis(ContainerPriority.TYPE));
|
||||
NetworkHandler.instance().sendToServer(new SwitchGuisPacket(PriorityContainer.TYPE));
|
||||
}
|
||||
|
||||
private void selectNextInterfaceMode() {
|
||||
final boolean backwards = getMinecraft().mouseHelper.isRightDown();
|
||||
NetworkHandler.instance().sendToServer(new PacketConfigButton(Settings.INTERFACE_TERMINAL, backwards));
|
||||
NetworkHandler.instance().sendToServer(new ConfigButtonPacket(Settings.INTERFACE_TERMINAL, backwards));
|
||||
}
|
||||
|
||||
}
|
||||
+10
-10
@@ -43,17 +43,17 @@ import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.client.ActionKey;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiScrollbar;
|
||||
import appeng.client.gui.widgets.MEGuiTextField;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.Scrollbar;
|
||||
import appeng.client.gui.widgets.AETextField;
|
||||
import appeng.client.me.ClientDCInternalInv;
|
||||
import appeng.client.me.SlotDisconnected;
|
||||
import appeng.container.implementations.ContainerInterfaceTerminal;
|
||||
import appeng.container.implementations.InterfaceTerminalContainer;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class GuiInterfaceTerminal extends AEBaseGui<ContainerInterfaceTerminal> {
|
||||
public class InterfaceTerminalScreen extends AEBaseScreen<InterfaceTerminalContainer> {
|
||||
|
||||
private static final int LINES_ON_PAGE = 6;
|
||||
|
||||
@@ -65,12 +65,12 @@ public class GuiInterfaceTerminal extends AEBaseGui<ContainerInterfaceTerminal>
|
||||
private final Map<String, Set<Object>> cachedSearches = new WeakHashMap<>();
|
||||
|
||||
private boolean refreshList = false;
|
||||
private MEGuiTextField searchField;
|
||||
private AETextField searchField;
|
||||
|
||||
public GuiInterfaceTerminal(ContainerInterfaceTerminal container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
public InterfaceTerminalScreen(InterfaceTerminalContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
final GuiScrollbar scrollbar = new GuiScrollbar();
|
||||
final Scrollbar scrollbar = new Scrollbar();
|
||||
this.setScrollBar(scrollbar);
|
||||
this.xSize = 195;
|
||||
this.ySize = 222;
|
||||
@@ -84,7 +84,7 @@ public class GuiInterfaceTerminal extends AEBaseGui<ContainerInterfaceTerminal>
|
||||
this.getScrollBar().setHeight(106);
|
||||
this.getScrollBar().setTop(18);
|
||||
|
||||
this.searchField = new MEGuiTextField(this.font, this.guiLeft + 104, this.guiTop + 4, 65, 12);
|
||||
this.searchField = new AETextField(this.font, this.guiLeft + 104, this.guiTop + 4, 65, 12);
|
||||
this.searchField.setEnableBackgroundDrawing(false);
|
||||
this.searchField.setMaxStringLength(25);
|
||||
this.searchField.setTextColor(0xFFFFFF);
|
||||
+18
-18
@@ -29,18 +29,18 @@ import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.client.gui.widgets.GuiNumberBox;
|
||||
import appeng.client.gui.widgets.GuiServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiSettingToggleButton;
|
||||
import appeng.container.implementations.ContainerLevelEmitter;
|
||||
import appeng.client.gui.widgets.NumberBox;
|
||||
import appeng.client.gui.widgets.ServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.SettingToggleButton;
|
||||
import appeng.container.implementations.LevelEmitterContainer;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
|
||||
public class GuiLevelEmitter extends GuiUpgradeable<ContainerLevelEmitter> {
|
||||
public class LevelEmitterScreen extends UpgradeableScreen<LevelEmitterContainer> {
|
||||
|
||||
private GuiNumberBox level;
|
||||
private NumberBox level;
|
||||
|
||||
private Button plus1;
|
||||
private Button plus10;
|
||||
@@ -51,10 +51,10 @@ public class GuiLevelEmitter extends GuiUpgradeable<ContainerLevelEmitter> {
|
||||
private Button minus100;
|
||||
private Button minus1000;
|
||||
|
||||
private GuiSettingToggleButton<LevelType> levelMode;
|
||||
private GuiSettingToggleButton<YesNo> craftingMode;
|
||||
private SettingToggleButton<LevelType> levelMode;
|
||||
private SettingToggleButton<YesNo> craftingMode;
|
||||
|
||||
public GuiLevelEmitter(ContainerLevelEmitter container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public LevelEmitterScreen(LevelEmitterContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class GuiLevelEmitter extends GuiUpgradeable<ContainerLevelEmitter> {
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.level = new GuiNumberBox(this.font, this.guiLeft + 24, this.guiTop + 43, 79, this.font.FONT_HEIGHT,
|
||||
this.level = new NumberBox(this.font, this.guiLeft + 24, this.guiTop + 43, 79, this.font.FONT_HEIGHT,
|
||||
Long.class);
|
||||
this.level.setEnableBackgroundDrawing(false);
|
||||
this.level.setMaxStringLength(16);
|
||||
@@ -74,13 +74,13 @@ public class GuiLevelEmitter extends GuiUpgradeable<ContainerLevelEmitter> {
|
||||
|
||||
@Override
|
||||
protected void addButtons() {
|
||||
this.levelMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8, Settings.LEVEL_TYPE,
|
||||
this.levelMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8, Settings.LEVEL_TYPE,
|
||||
LevelType.ITEM_LEVEL);
|
||||
this.redstoneMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 28,
|
||||
this.redstoneMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 28,
|
||||
Settings.REDSTONE_EMITTER, RedstoneMode.LOW_SIGNAL);
|
||||
this.fuzzyMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 48, Settings.FUZZY_MODE,
|
||||
this.fuzzyMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 48, Settings.FUZZY_MODE,
|
||||
FuzzyMode.IGNORE_ALL);
|
||||
this.craftingMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 48,
|
||||
this.craftingMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 48,
|
||||
Settings.CRAFT_VIA_REDSTONE, YesNo.NO);
|
||||
|
||||
final int a = AEConfig.instance().levelByStackAmounts(0);
|
||||
@@ -134,7 +134,7 @@ public class GuiLevelEmitter extends GuiUpgradeable<ContainerLevelEmitter> {
|
||||
}
|
||||
|
||||
if (this.levelMode != null) {
|
||||
this.levelMode.set(((ContainerLevelEmitter) this.cvb).getLevelMode());
|
||||
this.levelMode.set(((LevelEmitterContainer) this.cvb).getLevelMode());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ public class GuiLevelEmitter extends GuiUpgradeable<ContainerLevelEmitter> {
|
||||
|
||||
this.level.setText(Out = Long.toString(result));
|
||||
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("LevelEmitter.Value", Out));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("LevelEmitter.Value", Out));
|
||||
} catch (final NumberFormatException e) {
|
||||
// nope..
|
||||
this.level.setText("0");
|
||||
@@ -219,7 +219,7 @@ public class GuiLevelEmitter extends GuiUpgradeable<ContainerLevelEmitter> {
|
||||
Out = "0";
|
||||
}
|
||||
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("LevelEmitter.Value", Out));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("LevelEmitter.Value", Out));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+36
-36
@@ -36,29 +36,29 @@ import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
import appeng.client.ActionKey;
|
||||
import appeng.client.gui.AEBaseMEGui;
|
||||
import appeng.client.gui.AEBaseMEScreen;
|
||||
import appeng.client.gui.widgets.*;
|
||||
import appeng.client.me.InternalSlotME;
|
||||
import appeng.client.me.ItemRepo;
|
||||
import appeng.container.implementations.ContainerCraftingStatus;
|
||||
import appeng.container.implementations.ContainerMEMonitorable;
|
||||
import appeng.container.implementations.CraftingStatusContainer;
|
||||
import appeng.container.implementations.MEMonitorableContainer;
|
||||
import appeng.container.slot.AppEngSlot;
|
||||
import appeng.container.slot.SlotCraftingMatrix;
|
||||
import appeng.container.slot.SlotFakeCraftingMatrix;
|
||||
import appeng.container.slot.CraftingMatrixSlot;
|
||||
import appeng.container.slot.FakeCraftingMatrixSlot;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
import appeng.helpers.WirelessTerminalGuiObject;
|
||||
import appeng.integration.abstraction.JEIFacade;
|
||||
import appeng.parts.reporting.AbstractPartTerminal;
|
||||
import appeng.tile.misc.TileSecurityStation;
|
||||
import appeng.parts.reporting.AbstractTerminalPart;
|
||||
import appeng.tile.misc.SecurityStationTileEntity;
|
||||
import appeng.util.IConfigManagerHost;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseMEGui<T>
|
||||
public class MEMonitorableScreen<T extends MEMonitorableContainer> extends AEBaseMEScreen<T>
|
||||
implements ISortSource, IConfigManagerHost {
|
||||
|
||||
private static int craftingGridOffsetX;
|
||||
@@ -71,8 +71,8 @@ public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseME
|
||||
private final IConfigManager configSrc;
|
||||
private final boolean viewCell;
|
||||
private final ItemStack[] myCurrentViewCells = new ItemStack[5];
|
||||
private GuiTabButton craftingStatusBtn;
|
||||
private MEGuiTextField searchField;
|
||||
private TabButton craftingStatusBtn;
|
||||
private AETextField searchField;
|
||||
private GuiText myName;
|
||||
private int perRow = 9;
|
||||
private int reservedSpace = 0;
|
||||
@@ -80,17 +80,17 @@ public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseME
|
||||
private int rows = 0;
|
||||
private int maxRows = Integer.MAX_VALUE;
|
||||
private int standardSize;
|
||||
private GuiSettingToggleButton<ViewItems> viewModeToggle;
|
||||
private GuiSettingToggleButton<SortOrder> sortByToggle;
|
||||
private GuiSettingToggleButton<SortDir> sortDirToggle;
|
||||
private SettingToggleButton<ViewItems> viewModeToggle;
|
||||
private SettingToggleButton<SortOrder> sortByToggle;
|
||||
private SettingToggleButton<SortDir> sortDirToggle;
|
||||
private boolean isAutoFocus = false;
|
||||
private int currentMouseX = 0;
|
||||
private int currentMouseY = 0;
|
||||
|
||||
public GuiMEMonitorable(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public MEMonitorableScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
|
||||
final GuiScrollbar scrollbar = new GuiScrollbar();
|
||||
final Scrollbar scrollbar = new Scrollbar();
|
||||
this.setScrollBar(scrollbar);
|
||||
this.repo = new ItemRepo(scrollbar, this);
|
||||
setScrollBar();
|
||||
@@ -110,7 +110,7 @@ public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseME
|
||||
|
||||
this.viewCell = te instanceof IViewCellStorage;
|
||||
|
||||
if (te instanceof TileSecurityStation) {
|
||||
if (te instanceof SecurityStationTileEntity) {
|
||||
this.myName = GuiText.Security;
|
||||
} else if (te instanceof WirelessTerminalGuiObject) {
|
||||
this.myName = GuiText.WirelessTerminal;
|
||||
@@ -118,7 +118,7 @@ public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseME
|
||||
this.myName = GuiText.PortableCell;
|
||||
} else if (te instanceof IMEChest) {
|
||||
this.myName = GuiText.Chest;
|
||||
} else if (te instanceof AbstractPartTerminal) {
|
||||
} else if (te instanceof AbstractTerminalPart) {
|
||||
this.myName = GuiText.Terminal;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Invalid GUI target given: " + te);
|
||||
@@ -141,7 +141,7 @@ public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseME
|
||||
}
|
||||
|
||||
private void showCraftingStatus() {
|
||||
NetworkHandler.instance().sendToServer(new PacketSwitchGuis(ContainerCraftingStatus.TYPE));
|
||||
NetworkHandler.instance().sendToServer(new SwitchGuisPacket(CraftingStatusContainer.TYPE));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -189,33 +189,33 @@ public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseME
|
||||
int offset = this.guiTop + 8;
|
||||
|
||||
if (this.customSortOrder) {
|
||||
this.sortByToggle = this.addButton(new GuiSettingToggleButton<>(this.guiLeft - 18, offset, Settings.SORT_BY,
|
||||
this.sortByToggle = this.addButton(new SettingToggleButton<>(this.guiLeft - 18, offset, Settings.SORT_BY,
|
||||
getSortBy(), Platform::isSortOrderAvailable, this::toggleServerSetting));
|
||||
offset += 20;
|
||||
}
|
||||
|
||||
if (this.viewCell || this instanceof GuiWirelessTerm) {
|
||||
this.viewModeToggle = this.addButton(new GuiSettingToggleButton<>(this.guiLeft - 18, offset,
|
||||
if (this.viewCell || this instanceof WirelessTermScreen) {
|
||||
this.viewModeToggle = this.addButton(new SettingToggleButton<>(this.guiLeft - 18, offset,
|
||||
Settings.VIEW_MODE, getSortDisplay(), this::toggleServerSetting));
|
||||
offset += 20;
|
||||
}
|
||||
|
||||
this.addButton(this.sortDirToggle = new GuiSettingToggleButton<>(this.guiLeft - 18, offset,
|
||||
this.addButton(this.sortDirToggle = new SettingToggleButton<>(this.guiLeft - 18, offset,
|
||||
Settings.SORT_DIRECTION, getSortDir(), this::toggleServerSetting));
|
||||
offset += 20;
|
||||
|
||||
SearchBoxMode searchMode = AEConfig.instance().getTerminalSearchMode();
|
||||
this.addButton(new GuiSettingToggleButton<>(this.guiLeft - 18, offset, Settings.SEARCH_MODE, searchMode,
|
||||
this.addButton(new SettingToggleButton<>(this.guiLeft - 18, offset, Settings.SEARCH_MODE, searchMode,
|
||||
Platform::isSearchModeAvailable, this::toggleTerminalSearchMode));
|
||||
|
||||
offset += 20;
|
||||
|
||||
if (!(this instanceof GuiMEPortableCell) || this instanceof GuiWirelessTerm) {
|
||||
this.addButton(new GuiSettingToggleButton<>(this.guiLeft - 18, offset, Settings.TERMINAL_STYLE,
|
||||
if (!(this instanceof MEPortableCellScreen) || this instanceof WirelessTermScreen) {
|
||||
this.addButton(new SettingToggleButton<>(this.guiLeft - 18, offset, Settings.TERMINAL_STYLE,
|
||||
terminalStyle, this::toggleTerminalStyle));
|
||||
}
|
||||
|
||||
this.searchField = new MEGuiTextField(this.font, this.guiLeft + Math.max(80, this.offsetX), this.guiTop + 4, 90,
|
||||
this.searchField = new AETextField(this.font, this.guiLeft + Math.max(80, this.offsetX), this.guiTop + 4, 90,
|
||||
12);
|
||||
this.searchField.setEnableBackgroundDrawing(false);
|
||||
this.searchField.setMaxStringLength(25);
|
||||
@@ -223,8 +223,8 @@ public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseME
|
||||
this.searchField.setSelectionColor(0xFF008000);
|
||||
this.searchField.setVisible(true);
|
||||
|
||||
if (this.viewCell || this instanceof GuiWirelessTerm) {
|
||||
this.craftingStatusBtn = this.addButton(new GuiTabButton(this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16,
|
||||
if (this.viewCell || this instanceof WirelessTermScreen) {
|
||||
this.craftingStatusBtn = this.addButton(new TabButton(this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16,
|
||||
GuiText.CraftingStatus.getLocal(), this.itemRenderer, btn -> showCraftingStatus()));
|
||||
this.craftingStatusBtn.setHideEdge(13);
|
||||
}
|
||||
@@ -261,7 +261,7 @@ public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseME
|
||||
}
|
||||
}
|
||||
|
||||
if (s instanceof SlotCraftingMatrix || s instanceof SlotFakeCraftingMatrix) {
|
||||
if (s instanceof CraftingMatrixSlot || s instanceof FakeCraftingMatrixSlot) {
|
||||
if (s.xPos > 0 && s.yPos > 0) {
|
||||
craftingGridOffsetX = Math.min(craftingGridOffsetX, s.xPos);
|
||||
craftingGridOffsetY = Math.min(craftingGridOffsetY, s.yPos);
|
||||
@@ -312,7 +312,7 @@ public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseME
|
||||
final int x_width = 197;
|
||||
blit(offsetX, offsetY, 0, 0, x_width, 18);
|
||||
|
||||
if (this.viewCell || (this instanceof GuiSecurityStation)) {
|
||||
if (this.viewCell || (this instanceof SecurityStationScreen)) {
|
||||
blit(offsetX + x_width, offsetY, x_width, 0, 46, 128);
|
||||
}
|
||||
|
||||
@@ -482,23 +482,23 @@ public class GuiMEMonitorable<T extends ContainerMEMonitorable> extends AEBaseME
|
||||
this.standardSize = standardSize;
|
||||
}
|
||||
|
||||
private void toggleTerminalSearchMode(GuiSettingToggleButton<SearchBoxMode> btn, boolean backwards) {
|
||||
private void toggleTerminalSearchMode(SettingToggleButton<SearchBoxMode> btn, boolean backwards) {
|
||||
SearchBoxMode next = btn.getNextValue(backwards);
|
||||
AEConfig.instance().setTerminalSearchMode(next);
|
||||
btn.set(next);
|
||||
this.reinitalize();
|
||||
}
|
||||
|
||||
private void toggleTerminalStyle(GuiSettingToggleButton<TerminalStyle> btn, boolean backwards) {
|
||||
private void toggleTerminalStyle(SettingToggleButton<TerminalStyle> btn, boolean backwards) {
|
||||
TerminalStyle next = btn.getNextValue(backwards);
|
||||
AEConfig.instance().setTerminalStyle(next);
|
||||
btn.set(next);
|
||||
this.reinitalize();
|
||||
}
|
||||
|
||||
private <S extends Enum<S>> void toggleServerSetting(GuiSettingToggleButton<S> btn, boolean backwards) {
|
||||
private <S extends Enum<S>> void toggleServerSetting(SettingToggleButton<S> btn, boolean backwards) {
|
||||
S next = btn.getNextValue(backwards);
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig(btn.getSetting().name(), next.name()));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket(btn.getSetting().name(), next.name()));
|
||||
btn.set(next);
|
||||
}
|
||||
|
||||
+3
-3
@@ -21,11 +21,11 @@ package appeng.client.gui.implementations;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.container.implementations.ContainerMEPortableCell;
|
||||
import appeng.container.implementations.MEPortableCellContainer;
|
||||
|
||||
public class GuiMEPortableCell extends GuiMEMonitorable<ContainerMEPortableCell> {
|
||||
public class MEPortableCellScreen extends MEMonitorableScreen<MEPortableCellContainer> {
|
||||
|
||||
public GuiMEPortableCell(ContainerMEPortableCell container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public MEPortableCellScreen(MEPortableCellContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
}
|
||||
|
||||
+10
-10
@@ -23,18 +23,18 @@ import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.client.gui.widgets.GuiProgressBar;
|
||||
import appeng.client.gui.widgets.GuiProgressBar.Direction;
|
||||
import appeng.client.gui.widgets.GuiServerSettingToggleButton;
|
||||
import appeng.container.implementations.ContainerMolecularAssembler;
|
||||
import appeng.client.gui.widgets.ProgressBar;
|
||||
import appeng.client.gui.widgets.ProgressBar.Direction;
|
||||
import appeng.client.gui.widgets.ServerSettingToggleButton;
|
||||
import appeng.container.implementations.MolecularAssemblerContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
public class GuiMolecularAssembler extends GuiUpgradeable<ContainerMolecularAssembler> {
|
||||
public class MolecularAssemblerScreen extends UpgradeableScreen<MolecularAssemblerContainer> {
|
||||
|
||||
private GuiProgressBar pb;
|
||||
private ProgressBar pb;
|
||||
|
||||
public GuiMolecularAssembler(ContainerMolecularAssembler container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
public MolecularAssemblerScreen(MolecularAssemblerContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 197;
|
||||
}
|
||||
@@ -43,14 +43,14 @@ public class GuiMolecularAssembler extends GuiUpgradeable<ContainerMolecularAsse
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.pb = new GuiProgressBar(this.container, "guis/molecular_assembler.png", 139, 36, 148, 201, 6, 18,
|
||||
this.pb = new ProgressBar(this.container, "guis/molecular_assembler.png", 139, 36, 148, 201, 6, 18,
|
||||
Direction.VERTICAL);
|
||||
this.addButton(this.pb);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons() {
|
||||
this.redstoneMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8,
|
||||
this.redstoneMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8,
|
||||
Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE);
|
||||
addButton(this.redstoneMode);
|
||||
}
|
||||
+6
-6
@@ -32,25 +32,25 @@ import appeng.api.config.SortDir;
|
||||
import appeng.api.config.SortOrder;
|
||||
import appeng.api.config.ViewItems;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.CommonButtons;
|
||||
import appeng.client.gui.widgets.GuiScrollbar;
|
||||
import appeng.client.gui.widgets.Scrollbar;
|
||||
import appeng.client.gui.widgets.ISortSource;
|
||||
import appeng.client.me.ItemRepo;
|
||||
import appeng.client.me.SlotME;
|
||||
import appeng.container.implementations.ContainerNetworkStatus;
|
||||
import appeng.container.implementations.NetworkStatusContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class GuiNetworkStatus extends AEBaseGui<ContainerNetworkStatus> implements ISortSource {
|
||||
public class NetworkStatusScreen extends AEBaseScreen<NetworkStatusContainer> implements ISortSource {
|
||||
|
||||
private final ItemRepo repo;
|
||||
private final int rows = 4;
|
||||
private int tooltip = -1;
|
||||
|
||||
public GuiNetworkStatus(ContainerNetworkStatus container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public NetworkStatusScreen(NetworkStatusContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
final GuiScrollbar scrollbar = new GuiScrollbar();
|
||||
final Scrollbar scrollbar = new Scrollbar();
|
||||
|
||||
this.setScrollBar(scrollbar);
|
||||
this.repo = new ItemRepo(scrollbar, this);
|
||||
+9
-9
@@ -22,18 +22,18 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiToggleButton;
|
||||
import appeng.container.implementations.ContainerNetworkTool;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.ToggleButton;
|
||||
import appeng.container.implementations.NetworkToolContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
|
||||
public class GuiNetworkTool extends AEBaseGui<ContainerNetworkTool> {
|
||||
public class NetworkToolScreen extends AEBaseScreen<NetworkToolContainer> {
|
||||
|
||||
private GuiToggleButton tFacades;
|
||||
private ToggleButton tFacades;
|
||||
|
||||
public GuiNetworkTool(ContainerNetworkTool container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public NetworkToolScreen(NetworkToolContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
@@ -42,7 +42,7 @@ public class GuiNetworkTool extends AEBaseGui<ContainerNetworkTool> {
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.tFacades = new GuiToggleButton(this.guiLeft - 18, this.guiTop + 8, 23, 22,
|
||||
this.tFacades = new ToggleButton(this.guiLeft - 18, this.guiTop + 8, 23, 22,
|
||||
GuiText.TransparentFacades.getLocal(), GuiText.TransparentFacadesHint.getLocal(),
|
||||
btn -> toggleFacades());
|
||||
|
||||
@@ -50,7 +50,7 @@ public class GuiNetworkTool extends AEBaseGui<ContainerNetworkTool> {
|
||||
}
|
||||
|
||||
private void toggleFacades() {
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("NetworkTool", "Toggle"));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("NetworkTool", "Toggle"));
|
||||
}
|
||||
|
||||
@Override
|
||||
+20
-20
@@ -24,15 +24,15 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.config.ActionItems;
|
||||
import appeng.client.gui.widgets.GuiActionButton;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerPatternTerm;
|
||||
import appeng.client.gui.widgets.ActionButton;
|
||||
import appeng.client.gui.widgets.TabButton;
|
||||
import appeng.container.implementations.PatternTermContainer;
|
||||
import appeng.container.slot.AppEngSlot;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
|
||||
public class GuiPatternTerm extends GuiMEMonitorable<ContainerPatternTerm> {
|
||||
public class PatternTermScreen extends MEMonitorableScreen<PatternTermContainer> {
|
||||
|
||||
private static final String BACKGROUND_CRAFTING_MODE = "guis/pattern.png";
|
||||
private static final String BACKGROUND_PROCESSING_MODE = "guis/pattern2.png";
|
||||
@@ -43,12 +43,12 @@ public class GuiPatternTerm extends GuiMEMonitorable<ContainerPatternTerm> {
|
||||
private static final String CRAFTMODE_CRFTING = "1";
|
||||
private static final String CRAFTMODE_PROCESSING = "0";
|
||||
|
||||
private GuiTabButton tabCraftButton;
|
||||
private GuiTabButton tabProcessButton;
|
||||
private GuiActionButton substitutionsEnabledBtn;
|
||||
private GuiActionButton substitutionsDisabledBtn;
|
||||
private TabButton tabCraftButton;
|
||||
private TabButton tabProcessButton;
|
||||
private ActionButton substitutionsEnabledBtn;
|
||||
private ActionButton substitutionsDisabledBtn;
|
||||
|
||||
public GuiPatternTerm(ContainerPatternTerm container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public PatternTermScreen(PatternTermContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.setReservedSpace(81);
|
||||
}
|
||||
@@ -57,50 +57,50 @@ public class GuiPatternTerm extends GuiMEMonitorable<ContainerPatternTerm> {
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.tabCraftButton = new GuiTabButton(this.guiLeft + 173, this.guiTop + this.ySize - 177,
|
||||
this.tabCraftButton = new TabButton(this.guiLeft + 173, this.guiTop + this.ySize - 177,
|
||||
new ItemStack(Blocks.CRAFTING_TABLE), GuiText.CraftingPattern.getLocal(), this.itemRenderer,
|
||||
btn -> toggleCraftMode(CRAFTMODE_PROCESSING));
|
||||
this.addButton(this.tabCraftButton);
|
||||
|
||||
this.tabProcessButton = new GuiTabButton(this.guiLeft + 173, this.guiTop + this.ySize - 177,
|
||||
this.tabProcessButton = new TabButton(this.guiLeft + 173, this.guiTop + this.ySize - 177,
|
||||
new ItemStack(Blocks.FURNACE), GuiText.ProcessingPattern.getLocal(), this.itemRenderer,
|
||||
btn -> toggleCraftMode(CRAFTMODE_CRFTING));
|
||||
this.addButton(this.tabProcessButton);
|
||||
|
||||
this.substitutionsEnabledBtn = new GuiActionButton(this.guiLeft + 84, this.guiTop + this.ySize - 163,
|
||||
this.substitutionsEnabledBtn = new ActionButton(this.guiLeft + 84, this.guiTop + this.ySize - 163,
|
||||
ActionItems.ENABLE_SUBSTITUTION, act -> toggleSubstitutions(SUBSITUTION_DISABLE));
|
||||
this.substitutionsEnabledBtn.setHalfSize(true);
|
||||
this.addButton(this.substitutionsEnabledBtn);
|
||||
|
||||
this.substitutionsDisabledBtn = new GuiActionButton(this.guiLeft + 84, this.guiTop + this.ySize - 163,
|
||||
this.substitutionsDisabledBtn = new ActionButton(this.guiLeft + 84, this.guiTop + this.ySize - 163,
|
||||
ActionItems.DISABLE_SUBSTITUTION, act -> toggleSubstitutions(SUBSITUTION_ENABLE));
|
||||
this.substitutionsDisabledBtn.setHalfSize(true);
|
||||
this.addButton(this.substitutionsDisabledBtn);
|
||||
|
||||
GuiActionButton clearBtn = new GuiActionButton(this.guiLeft + 74, this.guiTop + this.ySize - 163,
|
||||
ActionButton clearBtn = new ActionButton(this.guiLeft + 74, this.guiTop + this.ySize - 163,
|
||||
ActionItems.CLOSE, act -> clear());
|
||||
clearBtn.setHalfSize(true);
|
||||
this.addButton(clearBtn);
|
||||
|
||||
GuiActionButton encodeBtn = new GuiActionButton(this.guiLeft + 147, this.guiTop + this.ySize - 142,
|
||||
ActionButton encodeBtn = new ActionButton(this.guiLeft + 147, this.guiTop + this.ySize - 142,
|
||||
ActionItems.ENCODE, act -> encode());
|
||||
this.addButton(encodeBtn);
|
||||
}
|
||||
|
||||
private void toggleCraftMode(String mode) {
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("PatternTerminal.CraftMode", mode));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("PatternTerminal.CraftMode", mode));
|
||||
}
|
||||
|
||||
private void toggleSubstitutions(String mode) {
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("PatternTerminal.Substitute", mode));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("PatternTerminal.Substitute", mode));
|
||||
}
|
||||
|
||||
private void encode() {
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("PatternTerminal.Encode", "1"));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("PatternTerminal.Encode", "1"));
|
||||
}
|
||||
|
||||
private void clear() {
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("PatternTerminal.Clear", "1"));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("PatternTerminal.Clear", "1"));
|
||||
}
|
||||
|
||||
@Override
|
||||
+13
-13
@@ -23,23 +23,23 @@ import net.minecraft.client.util.InputMappings;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiNumberBox;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.NumberBox;
|
||||
import appeng.container.implementations.PriorityContainer;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
|
||||
public class GuiPriority extends AEBaseGui<ContainerPriority> {
|
||||
public class PriorityScreen extends AEBaseScreen<PriorityContainer> {
|
||||
|
||||
private final AESubGui subGui;
|
||||
private final AESubScreen subGui;
|
||||
|
||||
private GuiNumberBox priority;
|
||||
private NumberBox priority;
|
||||
|
||||
public GuiPriority(ContainerPriority container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public PriorityScreen(PriorityContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.subGui = new AESubGui(this, container.getPriorityHost());
|
||||
this.subGui = new AESubScreen(this, container.getPriorityHost());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,7 +63,7 @@ public class GuiPriority extends AEBaseGui<ContainerPriority> {
|
||||
|
||||
this.subGui.addBackButton(this::addButton, 154, 0);
|
||||
|
||||
this.priority = new GuiNumberBox(this.font, this.guiLeft + 62, this.guiTop + 57, 59, this.font.FONT_HEIGHT,
|
||||
this.priority = new NumberBox(this.font, this.guiLeft + 62, this.guiTop + 57, 59, this.font.FONT_HEIGHT,
|
||||
Long.class);
|
||||
this.priority.setEnableBackgroundDrawing(false);
|
||||
this.priority.setMaxStringLength(16);
|
||||
@@ -109,7 +109,7 @@ public class GuiPriority extends AEBaseGui<ContainerPriority> {
|
||||
|
||||
this.priority.setText(out = Long.toString(result));
|
||||
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("PriorityHost.Priority", out));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("PriorityHost.Priority", out));
|
||||
} catch (final NumberFormatException e) {
|
||||
// nope..
|
||||
this.priority.setText("0");
|
||||
@@ -135,7 +135,7 @@ public class GuiPriority extends AEBaseGui<ContainerPriority> {
|
||||
out = "0";
|
||||
}
|
||||
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("PriorityHost.Priority", out));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("PriorityHost.Priority", out));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -162,7 +162,7 @@ public class GuiPriority extends AEBaseGui<ContainerPriority> {
|
||||
out = "0";
|
||||
}
|
||||
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("PriorityHost.Priority", out));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("PriorityHost.Priority", out));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -22,13 +22,13 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.container.implementations.ContainerQNB;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.container.implementations.QNBContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
public class GuiQNB extends AEBaseGui<ContainerQNB> {
|
||||
public class QNBScreen extends AEBaseScreen<QNBContainer> {
|
||||
|
||||
public GuiQNB(ContainerQNB container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public QNBScreen(QNBContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
+7
-7
@@ -27,18 +27,18 @@ import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.ActionKey;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.container.implementations.ContainerQuartzKnife;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.container.implementations.QuartzKnifeContainer;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
|
||||
public class GuiQuartzKnife extends AEBaseGui<ContainerQuartzKnife> {
|
||||
public class QuartzKnifeScreen extends AEBaseScreen<QuartzKnifeContainer> {
|
||||
|
||||
private TextFieldWidget name;
|
||||
|
||||
public GuiQuartzKnife(ContainerQuartzKnife container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public QuartzKnifeScreen(QuartzKnifeContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 184;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ public class GuiQuartzKnife extends AEBaseGui<ContainerQuartzKnife> {
|
||||
if (this.name.isFocused() && this.name.charTyped(character, key)) {
|
||||
final String Out = this.name.getText();
|
||||
container.setName(Out);
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("QuartzKnife.Name", Out));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("QuartzKnife.Name", Out));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class GuiQuartzKnife extends AEBaseGui<ContainerQuartzKnife> {
|
||||
if (this.name.keyPressed(keyCode, scanCode, p_keyPressed_3_)) {
|
||||
final String Out = this.name.getText();
|
||||
container.setName(Out);
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("QuartzKnife.Name", Out));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("QuartzKnife.Name", Out));
|
||||
return true;
|
||||
}
|
||||
|
||||
+17
-17
@@ -23,22 +23,22 @@ import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.SortOrder;
|
||||
import appeng.client.gui.widgets.GuiToggleButton;
|
||||
import appeng.container.implementations.ContainerSecurityStation;
|
||||
import appeng.client.gui.widgets.ToggleButton;
|
||||
import appeng.container.implementations.SecurityStationContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
|
||||
public class GuiSecurityStation extends GuiMEMonitorable<ContainerSecurityStation> {
|
||||
public class SecurityStationScreen extends MEMonitorableScreen<SecurityStationContainer> {
|
||||
|
||||
private GuiToggleButton inject;
|
||||
private GuiToggleButton extract;
|
||||
private GuiToggleButton craft;
|
||||
private GuiToggleButton build;
|
||||
private GuiToggleButton security;
|
||||
private ToggleButton inject;
|
||||
private ToggleButton extract;
|
||||
private ToggleButton craft;
|
||||
private ToggleButton build;
|
||||
private ToggleButton security;
|
||||
|
||||
public GuiSecurityStation(ContainerSecurityStation container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
public SecurityStationScreen(SecurityStationContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.setCustomSortOrder(false);
|
||||
this.setReservedSpace(33);
|
||||
@@ -50,7 +50,7 @@ public class GuiSecurityStation extends GuiMEMonitorable<ContainerSecurityStatio
|
||||
|
||||
private void toggleOption(SecurityPermissions permission) {
|
||||
NetworkHandler.instance()
|
||||
.sendToServer(new PacketValueConfig("TileSecurityStation.ToggleOption", permission.name()));
|
||||
.sendToServer(new ConfigValuePacket("TileSecurityStation.ToggleOption", permission.name()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,23 +58,23 @@ public class GuiSecurityStation extends GuiMEMonitorable<ContainerSecurityStatio
|
||||
super.init();
|
||||
|
||||
final int top = this.guiTop + this.ySize - 116;
|
||||
this.inject = this.addButton(new GuiToggleButton(this.guiLeft + 56, top, 11 * 16, 12 * 16,
|
||||
this.inject = this.addButton(new ToggleButton(this.guiLeft + 56, top, 11 * 16, 12 * 16,
|
||||
SecurityPermissions.INJECT.getTranslatedName(), SecurityPermissions.INJECT.getTranslatedTip(),
|
||||
btn -> toggleOption(SecurityPermissions.INJECT)));
|
||||
|
||||
this.extract = this.addButton(new GuiToggleButton(this.guiLeft + 56 + 18, top, 11 * 16 + 1, 12 * 16 + 1,
|
||||
this.extract = this.addButton(new ToggleButton(this.guiLeft + 56 + 18, top, 11 * 16 + 1, 12 * 16 + 1,
|
||||
SecurityPermissions.EXTRACT.getTranslatedName(), SecurityPermissions.EXTRACT.getTranslatedTip(),
|
||||
btn -> toggleOption(SecurityPermissions.EXTRACT)));
|
||||
|
||||
this.craft = this.addButton(new GuiToggleButton(this.guiLeft + 56 + 18 * 2, top, 11 * 16 + 2, 12 * 16 + 2,
|
||||
this.craft = this.addButton(new ToggleButton(this.guiLeft + 56 + 18 * 2, top, 11 * 16 + 2, 12 * 16 + 2,
|
||||
SecurityPermissions.CRAFT.getTranslatedName(), SecurityPermissions.CRAFT.getTranslatedTip(),
|
||||
btn -> toggleOption(SecurityPermissions.CRAFT)));
|
||||
|
||||
this.build = this.addButton(new GuiToggleButton(this.guiLeft + 56 + 18 * 3, top, 11 * 16 + 3, 12 * 16 + 3,
|
||||
this.build = this.addButton(new ToggleButton(this.guiLeft + 56 + 18 * 3, top, 11 * 16 + 3, 12 * 16 + 3,
|
||||
SecurityPermissions.BUILD.getTranslatedName(), SecurityPermissions.BUILD.getTranslatedTip(),
|
||||
btn -> toggleOption(SecurityPermissions.BUILD)));
|
||||
|
||||
this.security = this.addButton(new GuiToggleButton(this.guiLeft + 56 + 18 * 4, top, 11 * 16 + 4, 12 * 16 + 4,
|
||||
this.security = this.addButton(new ToggleButton(this.guiLeft + 56 + 18 * 4, top, 11 * 16 + 4, 12 * 16 + 4,
|
||||
SecurityPermissions.SECURITY.getTranslatedName(), SecurityPermissions.SECURITY.getTranslatedTip(),
|
||||
btn -> toggleOption(SecurityPermissions.SECURITY)));
|
||||
}
|
||||
+4
-4
@@ -23,16 +23,16 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.container.implementations.ContainerSkyChest;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.container.implementations.SkyChestContainer;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
public class GuiSkyChest extends AEBaseGui<ContainerSkyChest> {
|
||||
public class SkyChestScreen extends AEBaseScreen<SkyChestContainer> {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(AppEng.MOD_ID, "textures/guis/skychest.png");
|
||||
|
||||
public GuiSkyChest(ContainerSkyChest container, PlayerInventory playerInv, ITextComponent title) {
|
||||
public SkyChestScreen(SkyChestContainer container, PlayerInventory playerInv, ITextComponent title) {
|
||||
super(container, playerInv, title);
|
||||
this.ySize = 195;
|
||||
}
|
||||
+4
-4
@@ -22,15 +22,15 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.CommonButtons;
|
||||
import appeng.container.implementations.ContainerSpatialIOPort;
|
||||
import appeng.container.implementations.SpatialIOPortContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class GuiSpatialIOPort extends AEBaseGui<ContainerSpatialIOPort> {
|
||||
public class SpatialIOPortScreen extends AEBaseScreen<SpatialIOPortContainer> {
|
||||
|
||||
public GuiSpatialIOPort(ContainerSpatialIOPort container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public SpatialIOPortScreen(SpatialIOPortContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 199;
|
||||
}
|
||||
+23
-23
@@ -26,39 +26,39 @@ import appeng.api.config.ActionItems;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.StorageFilter;
|
||||
import appeng.client.gui.widgets.GuiActionButton;
|
||||
import appeng.client.gui.widgets.GuiServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.container.implementations.ContainerStorageBus;
|
||||
import appeng.client.gui.widgets.ActionButton;
|
||||
import appeng.client.gui.widgets.ServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.SettingToggleButton;
|
||||
import appeng.client.gui.widgets.TabButton;
|
||||
import appeng.container.implementations.PriorityContainer;
|
||||
import appeng.container.implementations.StorageBusContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
|
||||
public class GuiStorageBus extends GuiUpgradeable<ContainerStorageBus> {
|
||||
public class StorageBusScreen extends UpgradeableScreen<StorageBusContainer> {
|
||||
|
||||
private GuiSettingToggleButton<AccessRestriction> rwMode;
|
||||
private GuiSettingToggleButton<StorageFilter> storageFilter;
|
||||
private SettingToggleButton<AccessRestriction> rwMode;
|
||||
private SettingToggleButton<StorageFilter> storageFilter;
|
||||
|
||||
public GuiStorageBus(ContainerStorageBus container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public StorageBusScreen(StorageBusContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 251;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons() {
|
||||
addButton(new GuiActionButton(this.guiLeft - 18, this.guiTop + 8, ActionItems.CLOSE, btn -> clear()));
|
||||
addButton(new GuiActionButton(this.guiLeft - 18, this.guiTop + 28, ActionItems.WRENCH, btn -> partition()));
|
||||
this.rwMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 48, Settings.ACCESS,
|
||||
addButton(new ActionButton(this.guiLeft - 18, this.guiTop + 8, ActionItems.CLOSE, btn -> clear()));
|
||||
addButton(new ActionButton(this.guiLeft - 18, this.guiTop + 28, ActionItems.WRENCH, btn -> partition()));
|
||||
this.rwMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 48, Settings.ACCESS,
|
||||
AccessRestriction.READ_WRITE);
|
||||
this.storageFilter = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 68,
|
||||
this.storageFilter = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 68,
|
||||
Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY);
|
||||
this.fuzzyMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 88, Settings.FUZZY_MODE,
|
||||
this.fuzzyMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 88, Settings.FUZZY_MODE,
|
||||
FuzzyMode.IGNORE_ALL);
|
||||
|
||||
this.addButton(new GuiTabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.itemRenderer, btn -> openPriorityGui()));
|
||||
|
||||
this.addButton(this.storageFilter);
|
||||
@@ -76,11 +76,11 @@ public class GuiStorageBus extends GuiUpgradeable<ContainerStorageBus> {
|
||||
}
|
||||
|
||||
if (this.storageFilter != null) {
|
||||
this.storageFilter.set(((ContainerStorageBus) this.cvb).getStorageFilter());
|
||||
this.storageFilter.set(((StorageBusContainer) this.cvb).getStorageFilter());
|
||||
}
|
||||
|
||||
if (this.rwMode != null) {
|
||||
this.rwMode.set(((ContainerStorageBus) this.cvb).getReadWriteMode());
|
||||
this.rwMode.set(((StorageBusContainer) this.cvb).getReadWriteMode());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,15 +90,15 @@ public class GuiStorageBus extends GuiUpgradeable<ContainerStorageBus> {
|
||||
}
|
||||
|
||||
private void partition() {
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("StorageBus.Action", "Partition"));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("StorageBus.Action", "Partition"));
|
||||
}
|
||||
|
||||
private void clear() {
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("StorageBus.Action", "Clear"));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("StorageBus.Action", "Clear"));
|
||||
}
|
||||
|
||||
private void openPriorityGui() {
|
||||
NetworkHandler.instance().sendToServer(new PacketSwitchGuis(ContainerPriority.TYPE));
|
||||
NetworkHandler.instance().sendToServer(new SwitchGuisPacket(PriorityContainer.TYPE));
|
||||
}
|
||||
|
||||
}
|
||||
+19
-19
@@ -29,25 +29,25 @@ import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.GuiSettingToggleButton;
|
||||
import appeng.container.implementations.ContainerUpgradeable;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.ServerSettingToggleButton;
|
||||
import appeng.client.gui.widgets.SettingToggleButton;
|
||||
import appeng.container.implementations.UpgradeableContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.parts.automation.PartExportBus;
|
||||
import appeng.parts.automation.PartImportBus;
|
||||
import appeng.parts.automation.ExportBusPart;
|
||||
import appeng.parts.automation.ImportBusPart;
|
||||
|
||||
public class GuiUpgradeable<T extends ContainerUpgradeable> extends AEBaseGui<T> {
|
||||
public class UpgradeableScreen<T extends UpgradeableContainer> extends AEBaseScreen<T> {
|
||||
|
||||
protected final ContainerUpgradeable cvb;
|
||||
protected final UpgradeableContainer cvb;
|
||||
protected final IUpgradeableHost bc;
|
||||
|
||||
protected GuiSettingToggleButton<RedstoneMode> redstoneMode;
|
||||
protected GuiSettingToggleButton<FuzzyMode> fuzzyMode;
|
||||
protected GuiSettingToggleButton<YesNo> craftMode;
|
||||
protected GuiSettingToggleButton<SchedulingMode> schedulingMode;
|
||||
protected SettingToggleButton<RedstoneMode> redstoneMode;
|
||||
protected SettingToggleButton<FuzzyMode> fuzzyMode;
|
||||
protected SettingToggleButton<YesNo> craftMode;
|
||||
protected SettingToggleButton<SchedulingMode> schedulingMode;
|
||||
|
||||
public GuiUpgradeable(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public UpgradeableScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.cvb = container;
|
||||
|
||||
@@ -67,16 +67,16 @@ public class GuiUpgradeable<T extends ContainerUpgradeable> extends AEBaseGui<T>
|
||||
}
|
||||
|
||||
protected void addButtons() {
|
||||
this.redstoneMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8,
|
||||
this.redstoneMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8,
|
||||
Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE);
|
||||
addButton(this.redstoneMode);
|
||||
this.fuzzyMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE,
|
||||
this.fuzzyMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE,
|
||||
FuzzyMode.IGNORE_ALL);
|
||||
addButton(this.fuzzyMode);
|
||||
this.craftMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_ONLY,
|
||||
this.craftMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_ONLY,
|
||||
YesNo.NO);
|
||||
addButton(this.craftMode);
|
||||
this.schedulingMode = new GuiServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 68,
|
||||
this.schedulingMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 68,
|
||||
Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT);
|
||||
addButton(this.schedulingMode);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public class GuiUpgradeable<T extends ContainerUpgradeable> extends AEBaseGui<T>
|
||||
}
|
||||
if (this.schedulingMode != null) {
|
||||
this.schedulingMode.setVisibility(
|
||||
this.bc.getInstalledUpgrades(Upgrades.CAPACITY) > 0 && this.bc instanceof PartExportBus);
|
||||
this.bc.getInstalledUpgrades(Upgrades.CAPACITY) > 0 && this.bc instanceof ExportBusPart);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ public class GuiUpgradeable<T extends ContainerUpgradeable> extends AEBaseGui<T>
|
||||
}
|
||||
|
||||
protected GuiText getName() {
|
||||
return this.bc instanceof PartImportBus ? GuiText.ImportBus : GuiText.ExportBus;
|
||||
return this.bc instanceof ImportBusPart ? GuiText.ImportBus : GuiText.ExportBus;
|
||||
}
|
||||
|
||||
}
|
||||
+12
-12
@@ -24,19 +24,19 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiProgressBar;
|
||||
import appeng.client.gui.widgets.GuiProgressBar.Direction;
|
||||
import appeng.container.implementations.ContainerVibrationChamber;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.ProgressBar;
|
||||
import appeng.client.gui.widgets.ProgressBar.Direction;
|
||||
import appeng.container.implementations.VibrationChamberContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.tile.misc.TileVibrationChamber;
|
||||
import appeng.tile.misc.VibrationChamberTileEntity;
|
||||
|
||||
public class GuiVibrationChamber extends AEBaseGui<ContainerVibrationChamber> {
|
||||
public class VibrationChamberScreen extends AEBaseScreen<VibrationChamberContainer> {
|
||||
|
||||
private GuiProgressBar pb;
|
||||
private ProgressBar pb;
|
||||
|
||||
public GuiVibrationChamber(ContainerVibrationChamber container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
public VibrationChamberScreen(VibrationChamberContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public class GuiVibrationChamber extends AEBaseGui<ContainerVibrationChamber> {
|
||||
public void init() {
|
||||
super.init();
|
||||
|
||||
this.pb = new GuiProgressBar(this.container, "guis/vibchamber.png", 99, 36, 176, 14, 6, 18, Direction.VERTICAL);
|
||||
this.pb = new ProgressBar(this.container, "guis/vibchamber.png", 99, 36, 176, 14, 6, 18, Direction.VERTICAL);
|
||||
this.addButton(this.pb);
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ public class GuiVibrationChamber extends AEBaseGui<ContainerVibrationChamber> {
|
||||
this.font.drawString(this.getGuiDisplayName(GuiText.VibrationChamber.getLocal()), 8, 6, 4210752);
|
||||
this.font.drawString(GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752);
|
||||
|
||||
this.pb.setFullMsg(TileVibrationChamber.POWER_PER_TICK * this.container.getCurrentProgress()
|
||||
/ TileVibrationChamber.DILATION_SCALING + " AE/t");
|
||||
this.pb.setFullMsg(VibrationChamberTileEntity.POWER_PER_TICK * this.container.getCurrentProgress()
|
||||
/ VibrationChamberTileEntity.DILATION_SCALING + " AE/t");
|
||||
|
||||
if (this.container.getRemainingBurnTime() > 0) {
|
||||
final int i1 = this.container.getRemainingBurnTime() * 12 / 100;
|
||||
+4
-4
@@ -22,15 +22,15 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
import appeng.client.gui.widgets.CommonButtons;
|
||||
import appeng.container.implementations.ContainerWireless;
|
||||
import appeng.container.implementations.WirelessContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class GuiWireless extends AEBaseGui<ContainerWireless> {
|
||||
public class WirelessScreen extends AEBaseScreen<WirelessContainer> {
|
||||
|
||||
public GuiWireless(ContainerWireless container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public WirelessScreen(WirelessContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 166;
|
||||
}
|
||||
+3
-3
@@ -21,12 +21,12 @@ package appeng.client.gui.implementations;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.container.implementations.ContainerMEPortableCell;
|
||||
import appeng.container.implementations.MEPortableCellContainer;
|
||||
|
||||
// FIXME: Extended from GuiPortableCell before... Why?
|
||||
public class GuiWirelessTerm extends GuiMEMonitorable<ContainerMEPortableCell> {
|
||||
public class WirelessTermScreen extends MEMonitorableScreen<MEPortableCellContainer> {
|
||||
|
||||
public GuiWirelessTerm(ContainerMEPortableCell container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public WirelessTermScreen(MEPortableCellContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user