The Great Renamening of 2020
This commit is contained in:
+14
-14
@@ -4,20 +4,20 @@ package appeng.fluids.client.gui;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.client.gui.implementations.GuiUpgradeable;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.client.gui.implementations.UpgradeableScreen;
|
||||
import appeng.client.gui.widgets.TabButton;
|
||||
import appeng.container.implementations.PriorityContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.fluids.client.gui.widgets.GuiFluidSlot;
|
||||
import appeng.fluids.client.gui.widgets.GuiOptionalFluidSlot;
|
||||
import appeng.fluids.container.ContainerFluidFormationPlane;
|
||||
import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
import appeng.fluids.client.gui.widgets.FluidSlotWidget;
|
||||
import appeng.fluids.client.gui.widgets.OptionalFluidSlotWidget;
|
||||
import appeng.fluids.container.FluidFormationPlaneContainer;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
|
||||
public class GuiFluidFormationPlane extends GuiUpgradeable<ContainerFluidFormationPlane> {
|
||||
public GuiFluidFormationPlane(ContainerFluidFormationPlane container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
public class FluidFormationPlaneScreen extends UpgradeableScreen<FluidFormationPlaneContainer> {
|
||||
public FluidFormationPlaneScreen(FluidFormationPlaneContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 251;
|
||||
}
|
||||
@@ -35,9 +35,9 @@ public class GuiFluidFormationPlane extends GuiUpgradeable<ContainerFluidFormati
|
||||
for (int x = 0; x < 9; x++) {
|
||||
final int idx = y * 9 + x;
|
||||
if (y < 2) {
|
||||
this.guiSlots.add(new GuiFluidSlot(config, idx, idx, xo + x * 18, yo + y * 18));
|
||||
this.guiSlots.add(new FluidSlotWidget(config, idx, idx, xo + x * 18, yo + y * 18));
|
||||
} else {
|
||||
this.guiSlots.add(new GuiOptionalFluidSlot(config, container, idx, idx, y - 2, xo, yo, x, y));
|
||||
this.guiSlots.add(new OptionalFluidSlotWidget(config, container, idx, idx, y - 2, xo, yo, x, y));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,12 +45,12 @@ public class GuiFluidFormationPlane extends GuiUpgradeable<ContainerFluidFormati
|
||||
|
||||
@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()));
|
||||
}
|
||||
|
||||
private void openPriorityGui() {
|
||||
NetworkHandler.instance().sendToServer(new PacketSwitchGuis(ContainerPriority.TYPE));
|
||||
NetworkHandler.instance().sendToServer(new SwitchGuisPacket(PriorityContainer.TYPE));
|
||||
}
|
||||
|
||||
@Override
|
||||
+17
-17
@@ -21,12 +21,12 @@ package appeng.fluids.client.gui;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.client.gui.implementations.GuiUpgradeable;
|
||||
import appeng.client.gui.implementations.UpgradeableScreen;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.fluids.client.gui.widgets.GuiFluidSlot;
|
||||
import appeng.fluids.client.gui.widgets.GuiOptionalFluidSlot;
|
||||
import appeng.fluids.container.ContainerFluidIO;
|
||||
import appeng.fluids.parts.PartFluidImportBus;
|
||||
import appeng.fluids.client.gui.widgets.FluidSlotWidget;
|
||||
import appeng.fluids.client.gui.widgets.OptionalFluidSlotWidget;
|
||||
import appeng.fluids.container.FluidIOContainer;
|
||||
import appeng.fluids.parts.FluidImportBusPart;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
|
||||
/**
|
||||
@@ -34,9 +34,9 @@ import appeng.fluids.util.IAEFluidTank;
|
||||
* @version rv5 - 1/05/2018
|
||||
* @since rv5 1/05/2018
|
||||
*/
|
||||
public class GuiFluidIO extends GuiUpgradeable<ContainerFluidIO> {
|
||||
public class FluidIOScreen extends UpgradeableScreen<FluidIOContainer> {
|
||||
|
||||
public GuiFluidIO(ContainerFluidIO container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public FluidIOScreen(FluidIOContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
}
|
||||
|
||||
@@ -48,20 +48,20 @@ public class GuiFluidIO extends GuiUpgradeable<ContainerFluidIO> {
|
||||
final int y = 40;
|
||||
final int x = 80;
|
||||
|
||||
this.guiSlots.add(new GuiFluidSlot(inv, 0, 0, x, y));
|
||||
this.guiSlots.add(new GuiOptionalFluidSlot(inv, container, 1, 1, 1, x, y, -1, 0));
|
||||
this.guiSlots.add(new GuiOptionalFluidSlot(inv, container, 2, 2, 1, x, y, 1, 0));
|
||||
this.guiSlots.add(new GuiOptionalFluidSlot(inv, container, 3, 3, 1, x, y, 0, -1));
|
||||
this.guiSlots.add(new GuiOptionalFluidSlot(inv, container, 4, 4, 1, x, y, 0, 1));
|
||||
this.guiSlots.add(new FluidSlotWidget(inv, 0, 0, x, y));
|
||||
this.guiSlots.add(new OptionalFluidSlotWidget(inv, container, 1, 1, 1, x, y, -1, 0));
|
||||
this.guiSlots.add(new OptionalFluidSlotWidget(inv, container, 2, 2, 1, x, y, 1, 0));
|
||||
this.guiSlots.add(new OptionalFluidSlotWidget(inv, container, 3, 3, 1, x, y, 0, -1));
|
||||
this.guiSlots.add(new OptionalFluidSlotWidget(inv, container, 4, 4, 1, x, y, 0, 1));
|
||||
|
||||
this.guiSlots.add(new GuiOptionalFluidSlot(inv, container, 5, 5, 2, x, y, -1, -1));
|
||||
this.guiSlots.add(new GuiOptionalFluidSlot(inv, container, 6, 6, 2, x, y, 1, -1));
|
||||
this.guiSlots.add(new GuiOptionalFluidSlot(inv, container, 7, 7, 2, x, y, -1, 1));
|
||||
this.guiSlots.add(new GuiOptionalFluidSlot(inv, container, 8, 8, 2, x, y, 1, 1));
|
||||
this.guiSlots.add(new OptionalFluidSlotWidget(inv, container, 5, 5, 2, x, y, -1, -1));
|
||||
this.guiSlots.add(new OptionalFluidSlotWidget(inv, container, 6, 6, 2, x, y, 1, -1));
|
||||
this.guiSlots.add(new OptionalFluidSlotWidget(inv, container, 7, 7, 2, x, y, -1, 1));
|
||||
this.guiSlots.add(new OptionalFluidSlotWidget(inv, container, 8, 8, 2, x, y, 1, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiText getName() {
|
||||
return this.bc instanceof PartFluidImportBus ? GuiText.ImportBusFluids : GuiText.ExportBusFluids;
|
||||
return this.bc instanceof FluidImportBusPart ? GuiText.ImportBusFluids : GuiText.ExportBusFluids;
|
||||
}
|
||||
}
|
||||
+13
-13
@@ -22,20 +22,20 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
import appeng.client.gui.implementations.GuiUpgradeable;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.client.gui.implementations.UpgradeableScreen;
|
||||
import appeng.client.gui.widgets.TabButton;
|
||||
import appeng.container.implementations.PriorityContainer;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.fluids.client.gui.widgets.GuiFluidSlot;
|
||||
import appeng.fluids.client.gui.widgets.GuiFluidTank;
|
||||
import appeng.fluids.container.ContainerFluidInterface;
|
||||
import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
import appeng.fluids.client.gui.widgets.FluidSlotWidget;
|
||||
import appeng.fluids.client.gui.widgets.FluidTankWidget;
|
||||
import appeng.fluids.container.FluidInterfaceContainer;
|
||||
import appeng.fluids.helper.DualityFluidInterface;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
|
||||
public class GuiFluidInterface extends GuiUpgradeable<ContainerFluidInterface> {
|
||||
public GuiFluidInterface(ContainerFluidInterface container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public class FluidInterfaceScreen extends UpgradeableScreen<FluidInterfaceContainer> {
|
||||
public FluidInterfaceScreen(FluidInterfaceContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 231;
|
||||
}
|
||||
@@ -48,13 +48,13 @@ public class GuiFluidInterface extends GuiUpgradeable<ContainerFluidInterface> {
|
||||
final IAEFluidTank fluidTank = this.container.getTanks();
|
||||
|
||||
for (int i = 0; i < DualityFluidInterface.NUMBER_OF_TANKS; ++i) {
|
||||
final GuiFluidTank guiTank = new GuiFluidTank(fluidTank, i, this.getGuiLeft() + 35 + 18 * i,
|
||||
final FluidTankWidget guiTank = new FluidTankWidget(fluidTank, i, this.getGuiLeft() + 35 + 18 * i,
|
||||
this.getGuiTop() + 53, 16, 68);
|
||||
this.addButton(guiTank);
|
||||
this.guiSlots.add(new GuiFluidSlot(configFluids, i, i, 35 + 18 * i, 35));
|
||||
this.guiSlots.add(new FluidSlotWidget(configFluids, i, i, 35 + 18 * i, 35));
|
||||
}
|
||||
|
||||
this.addButton(new GuiTabButton(this.getGuiLeft() + 154, this.getGuiTop(), 2 + 4 * 16,
|
||||
this.addButton(new TabButton(this.getGuiLeft() + 154, this.getGuiTop(), 2 + 4 * 16,
|
||||
GuiText.Priority.getLocal(), this.itemRenderer, btn -> openPriorityGui()));
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class GuiFluidInterface extends GuiUpgradeable<ContainerFluidInterface> {
|
||||
}
|
||||
|
||||
private void openPriorityGui() {
|
||||
NetworkHandler.instance().sendToServer(new PacketSwitchGuis(ContainerPriority.TYPE));
|
||||
NetworkHandler.instance().sendToServer(new SwitchGuisPacket(PriorityContainer.TYPE));
|
||||
}
|
||||
|
||||
@Override
|
||||
+16
-16
@@ -8,21 +8,21 @@ import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.client.gui.implementations.GuiUpgradeable;
|
||||
import appeng.client.gui.widgets.GuiNumberBox;
|
||||
import appeng.client.gui.widgets.GuiServerSettingToggleButton;
|
||||
import appeng.client.gui.implementations.UpgradeableScreen;
|
||||
import appeng.client.gui.widgets.NumberBox;
|
||||
import appeng.client.gui.widgets.ServerSettingToggleButton;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.fluids.client.gui.widgets.GuiFluidSlot;
|
||||
import appeng.fluids.container.ContainerFluidLevelEmitter;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
import appeng.fluids.client.gui.widgets.FluidSlotWidget;
|
||||
import appeng.fluids.container.FluidLevelEmitterContainer;
|
||||
|
||||
public class GuiFluidLevelEmitter extends GuiUpgradeable<ContainerFluidLevelEmitter> {
|
||||
private GuiNumberBox level;
|
||||
public class FluidLevelEmitterScreen extends UpgradeableScreen<FluidLevelEmitterContainer> {
|
||||
private NumberBox level;
|
||||
|
||||
public GuiFluidLevelEmitter(ContainerFluidLevelEmitter container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
public FluidLevelEmitterScreen(FluidLevelEmitterContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class GuiFluidLevelEmitter extends GuiUpgradeable<ContainerFluidLevelEmit
|
||||
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);
|
||||
@@ -41,12 +41,12 @@ public class GuiFluidLevelEmitter extends GuiUpgradeable<ContainerFluidLevelEmit
|
||||
|
||||
final int y = 40;
|
||||
final int x = 80 + 44;
|
||||
this.guiSlots.add(new GuiFluidSlot(this.container.getFluidConfigInventory(), 0, 0, x, y));
|
||||
this.guiSlots.add(new FluidSlotWidget(this.container.getFluidConfigInventory(), 0, 0, x, y));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons() {
|
||||
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);
|
||||
|
||||
final int a = AEConfig.instance().levelByMillyBuckets(0);
|
||||
@@ -118,7 +118,7 @@ public class GuiFluidLevelEmitter extends GuiUpgradeable<ContainerFluidLevelEmit
|
||||
|
||||
this.level.setText(Out = Long.toString(result));
|
||||
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("FluidLevelEmitter.Value", Out));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("FluidLevelEmitter.Value", Out));
|
||||
} catch (final NumberFormatException e) {
|
||||
// nope..
|
||||
this.level.setText("0");
|
||||
@@ -144,7 +144,7 @@ public class GuiFluidLevelEmitter extends GuiUpgradeable<ContainerFluidLevelEmit
|
||||
Out = "0";
|
||||
}
|
||||
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("FluidLevelEmitter.Value", Out));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("FluidLevelEmitter.Value", Out));
|
||||
return true;
|
||||
}
|
||||
return super.charTyped(character, keyCode);
|
||||
@@ -171,7 +171,7 @@ public class GuiFluidLevelEmitter extends GuiUpgradeable<ContainerFluidLevelEmit
|
||||
Out = "0";
|
||||
}
|
||||
|
||||
NetworkHandler.instance().sendToServer(new PacketValueConfig("FluidLevelEmitter.Value", Out));
|
||||
NetworkHandler.instance().sendToServer(new ConfigValuePacket("FluidLevelEmitter.Value", Out));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+29
-29
@@ -26,19 +26,19 @@ import appeng.api.config.ActionItems;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.StorageFilter;
|
||||
import appeng.client.gui.implementations.GuiUpgradeable;
|
||||
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.client.gui.implementations.UpgradeableScreen;
|
||||
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.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.fluids.client.gui.widgets.GuiFluidSlot;
|
||||
import appeng.fluids.client.gui.widgets.GuiOptionalFluidSlot;
|
||||
import appeng.fluids.container.ContainerFluidStorageBus;
|
||||
import appeng.core.sync.packets.SwitchGuisPacket;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
import appeng.fluids.client.gui.widgets.FluidSlotWidget;
|
||||
import appeng.fluids.client.gui.widgets.OptionalFluidSlotWidget;
|
||||
import appeng.fluids.container.FluidStorageBusContainer;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
|
||||
/**
|
||||
@@ -46,12 +46,12 @@ import appeng.fluids.util.IAEFluidTank;
|
||||
* @version rv6 - 22/05/2018
|
||||
* @since rv6 22/05/2018
|
||||
*/
|
||||
public class GuiFluidStorageBus extends GuiUpgradeable<ContainerFluidStorageBus> {
|
||||
private GuiSettingToggleButton<AccessRestriction> rwMode;
|
||||
private GuiSettingToggleButton<StorageFilter> storageFilter;
|
||||
public class FluidStorageBusScreen extends UpgradeableScreen<FluidStorageBusContainer> {
|
||||
private SettingToggleButton<AccessRestriction> rwMode;
|
||||
private SettingToggleButton<StorageFilter> storageFilter;
|
||||
|
||||
public GuiFluidStorageBus(ContainerFluidStorageBus container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
public FluidStorageBusScreen(FluidStorageBusContainer container, PlayerInventory playerInventory,
|
||||
ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.ySize = 251;
|
||||
}
|
||||
@@ -69,9 +69,9 @@ public class GuiFluidStorageBus extends GuiUpgradeable<ContainerFluidStorageBus>
|
||||
for (int x = 0; x < 9; x++) {
|
||||
final int idx = y * 9 + x;
|
||||
if (y < 2) {
|
||||
this.guiSlots.add(new GuiFluidSlot(config, idx, idx, xo + x * 18, yo + y * 18));
|
||||
this.guiSlots.add(new FluidSlotWidget(config, idx, idx, xo + x * 18, yo + y * 18));
|
||||
} else {
|
||||
this.guiSlots.add(new GuiOptionalFluidSlot(config, container, idx, idx, y - 2, xo, yo, x, y));
|
||||
this.guiSlots.add(new OptionalFluidSlotWidget(config, container, idx, idx, y - 2, xo, yo, x, y));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,16 +79,16 @@ public class GuiFluidStorageBus extends GuiUpgradeable<ContainerFluidStorageBus>
|
||||
|
||||
@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);
|
||||
|
||||
addButton(this.addButton(new GuiTabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16,
|
||||
addButton(this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16,
|
||||
GuiText.Priority.getLocal(), this.itemRenderer, btn -> openPriorityGui())));
|
||||
|
||||
this.addButton(this.storageFilter);
|
||||
@@ -106,11 +106,11 @@ public class GuiFluidStorageBus extends GuiUpgradeable<ContainerFluidStorageBus>
|
||||
}
|
||||
|
||||
if (this.storageFilter != null) {
|
||||
this.storageFilter.set(((ContainerFluidStorageBus) this.cvb).getStorageFilter());
|
||||
this.storageFilter.set(((FluidStorageBusContainer) this.cvb).getStorageFilter());
|
||||
}
|
||||
|
||||
if (this.rwMode != null) {
|
||||
this.rwMode.set(((ContainerFluidStorageBus) this.cvb).getReadWriteMode());
|
||||
this.rwMode.set(((FluidStorageBusContainer) this.cvb).getReadWriteMode());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,15 +120,15 @@ public class GuiFluidStorageBus extends GuiUpgradeable<ContainerFluidStorageBus>
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
@Override
|
||||
+20
-20
@@ -40,11 +40,11 @@ import appeng.api.config.ViewItems;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.client.ActionKey;
|
||||
import appeng.client.gui.AEBaseMEGui;
|
||||
import appeng.client.gui.widgets.GuiScrollbar;
|
||||
import appeng.client.gui.widgets.GuiSettingToggleButton;
|
||||
import appeng.client.gui.AEBaseMEScreen;
|
||||
import appeng.client.gui.widgets.Scrollbar;
|
||||
import appeng.client.gui.widgets.SettingToggleButton;
|
||||
import appeng.client.gui.widgets.ISortSource;
|
||||
import appeng.client.gui.widgets.MEGuiTextField;
|
||||
import appeng.client.gui.widgets.AETextField;
|
||||
import appeng.client.me.FluidRepo;
|
||||
import appeng.client.me.InternalFluidSlotME;
|
||||
import appeng.client.me.SlotFluidME;
|
||||
@@ -52,9 +52,9 @@ import appeng.core.AELog;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketInventoryAction;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.fluids.container.ContainerFluidTerminal;
|
||||
import appeng.core.sync.packets.InventoryActionPacket;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
import appeng.fluids.container.FluidTerminalContainer;
|
||||
import appeng.fluids.container.slots.IMEFluidSlot;
|
||||
import appeng.helpers.InventoryAction;
|
||||
import appeng.util.IConfigManagerHost;
|
||||
@@ -65,7 +65,7 @@ import appeng.util.Platform;
|
||||
* @version rv6 - 12/05/2018
|
||||
* @since rv6 12/05/2018
|
||||
*/
|
||||
public class GuiFluidTerminal extends AEBaseMEGui<ContainerFluidTerminal> implements ISortSource, IConfigManagerHost {
|
||||
public class FluidTerminalScreen extends AEBaseMEScreen<FluidTerminalContainer> implements ISortSource, IConfigManagerHost {
|
||||
private final List<SlotFluidME> meFluidSlots = new LinkedList<>();
|
||||
private final FluidRepo repo;
|
||||
private final IConfigManager configSrc;
|
||||
@@ -75,15 +75,15 @@ public class GuiFluidTerminal extends AEBaseMEGui<ContainerFluidTerminal> implem
|
||||
private static final int ROWS = 6;
|
||||
private static final int COLS = 9;
|
||||
|
||||
private MEGuiTextField searchField;
|
||||
private GuiSettingToggleButton<SortOrder> sortByBox;
|
||||
private GuiSettingToggleButton<SortDir> sortDirBox;
|
||||
private AETextField searchField;
|
||||
private SettingToggleButton<SortOrder> sortByBox;
|
||||
private SettingToggleButton<SortDir> sortDirBox;
|
||||
|
||||
public GuiFluidTerminal(ContainerFluidTerminal container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
public FluidTerminalScreen(FluidTerminalContainer container, PlayerInventory playerInventory, ITextComponent title) {
|
||||
super(container, playerInventory, title);
|
||||
this.xSize = 185;
|
||||
this.ySize = 222;
|
||||
final GuiScrollbar scrollbar = new GuiScrollbar();
|
||||
final Scrollbar scrollbar = new Scrollbar();
|
||||
this.setScrollBar(scrollbar);
|
||||
this.repo = new FluidRepo(scrollbar, this);
|
||||
this.configSrc = container.getConfigManager();
|
||||
@@ -95,7 +95,7 @@ public class GuiFluidTerminal extends AEBaseMEGui<ContainerFluidTerminal> implem
|
||||
this.guiLeft = (this.width - this.xSize) / 2;
|
||||
this.guiTop = (this.height - this.ySize) / 2;
|
||||
|
||||
this.searchField = new MEGuiTextField(this.font, this.guiLeft + 80, this.guiTop + 4, 90, 12);
|
||||
this.searchField = new AETextField(this.font, this.guiLeft + 80, this.guiTop + 4, 90, 12);
|
||||
this.searchField.setEnableBackgroundDrawing(false);
|
||||
this.searchField.setMaxStringLength(25);
|
||||
this.searchField.setTextColor(0xFFFFFF);
|
||||
@@ -104,11 +104,11 @@ public class GuiFluidTerminal extends AEBaseMEGui<ContainerFluidTerminal> implem
|
||||
|
||||
int offset = this.guiTop;
|
||||
|
||||
this.sortByBox = this.addButton(new GuiSettingToggleButton<>(this.guiLeft - 18, offset, Settings.SORT_BY,
|
||||
this.sortByBox = this.addButton(new SettingToggleButton<>(this.guiLeft - 18, offset, Settings.SORT_BY,
|
||||
getSortBy(), Platform::isSortOrderAvailable, this::toggleServerSetting));
|
||||
offset += 20;
|
||||
|
||||
this.sortDirBox = this.addButton(new GuiSettingToggleButton<>(this.guiLeft - 18, offset,
|
||||
this.sortDirBox = this.addButton(new SettingToggleButton<>(this.guiLeft - 18, offset,
|
||||
Settings.SORT_DIRECTION, getSortDir(), this::toggleServerSetting));
|
||||
|
||||
for (int y = 0; y < ROWS; y++) {
|
||||
@@ -180,9 +180,9 @@ public class GuiFluidTerminal extends AEBaseMEGui<ContainerFluidTerminal> implem
|
||||
super.renderHoveredToolTip(mouseX, mouseY);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -197,14 +197,14 @@ public class GuiFluidTerminal extends AEBaseMEGui<ContainerFluidTerminal> implem
|
||||
this.container.setTargetStack(meSlot.getAEFluidStack());
|
||||
AELog.debug("mouse0 GUI STACK SIZE %s", meSlot.getAEFluidStack().getStackSize());
|
||||
NetworkHandler.instance()
|
||||
.sendToServer(new PacketInventoryAction(InventoryAction.FILL_ITEM, slot.slotNumber, 0));
|
||||
.sendToServer(new InventoryActionPacket(InventoryAction.FILL_ITEM, slot.slotNumber, 0));
|
||||
} else {
|
||||
this.container.setTargetStack(meSlot.getAEFluidStack());
|
||||
if (meSlot.getAEFluidStack() != null) {
|
||||
AELog.debug("mouse1 GUI STACK SIZE %s", meSlot.getAEFluidStack().getStackSize());
|
||||
}
|
||||
NetworkHandler.instance()
|
||||
.sendToServer(new PacketInventoryAction(InventoryAction.EMPTY_ITEM, slot.slotNumber, 0));
|
||||
.sendToServer(new InventoryActionPacket(InventoryAction.EMPTY_ITEM, slot.slotNumber, 0));
|
||||
}
|
||||
}
|
||||
return;
|
||||
+5
-5
@@ -18,17 +18,17 @@ import net.minecraftforge.fluids.FluidUtil;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.client.gui.widgets.GuiCustomSlot;
|
||||
import appeng.client.gui.widgets.CustomSlotWidget;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketFluidSlot;
|
||||
import appeng.core.sync.packets.FluidSlotPacket;
|
||||
import appeng.fluids.util.AEFluidStack;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
|
||||
public class GuiFluidSlot extends GuiCustomSlot {
|
||||
public class FluidSlotWidget extends CustomSlotWidget {
|
||||
private final IAEFluidTank fluids;
|
||||
private final int slot;
|
||||
|
||||
public GuiFluidSlot(final IAEFluidTank fluids, final int slot, final int id, final int x, final int y) {
|
||||
public FluidSlotWidget(final IAEFluidTank fluids, final int slot, final int id, final int x, final int y) {
|
||||
super(id, x, y);
|
||||
this.fluids = fluids;
|
||||
this.slot = slot;
|
||||
@@ -96,6 +96,6 @@ public class GuiFluidSlot extends GuiCustomSlot {
|
||||
public void setFluidStack(final IAEFluidStack stack) {
|
||||
this.fluids.setFluidInSlot(this.slot, stack);
|
||||
NetworkHandler.instance()
|
||||
.sendToServer(new PacketFluidSlot(Collections.singletonMap(this.getId(), this.getFluidStack())));
|
||||
.sendToServer(new FluidSlotPacket(Collections.singletonMap(this.getId(), this.getFluidStack())));
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -35,11 +35,11 @@ import appeng.client.gui.widgets.ITooltip;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class GuiFluidTank extends Widget implements ITooltip {
|
||||
public class FluidTankWidget extends Widget implements ITooltip {
|
||||
private final IAEFluidTank tank;
|
||||
private final int slot;
|
||||
|
||||
public GuiFluidTank(IAEFluidTank tank, int slot, int x, int y, int w, int h) {
|
||||
public FluidTankWidget(IAEFluidTank tank, int slot, int x, int y, int w, int h) {
|
||||
super(x, y, w, h, "");
|
||||
this.tank = tank;
|
||||
this.slot = slot;
|
||||
+3
-3
@@ -9,14 +9,14 @@ import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.container.slot.IOptionalSlotHost;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
|
||||
public class GuiOptionalFluidSlot extends GuiFluidSlot {
|
||||
public class OptionalFluidSlotWidget extends FluidSlotWidget {
|
||||
private final IOptionalSlotHost containerBus;
|
||||
private final int groupNum;
|
||||
private final int srcX;
|
||||
private final int srcY;
|
||||
|
||||
public GuiOptionalFluidSlot(IAEFluidTank fluids, final IOptionalSlotHost containerBus, int slot, int id,
|
||||
int groupNum, int x, int y, int xoffs, int yoffs) {
|
||||
public OptionalFluidSlotWidget(IAEFluidTank fluids, final IOptionalSlotHost containerBus, int slot, int id,
|
||||
int groupNum, int x, int y, int xoffs, int yoffs) {
|
||||
super(fluids, slot, id, x + xoffs * 18, y + yoffs * 18);
|
||||
this.containerBus = containerBus;
|
||||
this.groupNum = groupNum;
|
||||
Reference in New Issue
Block a user