mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 18:44:42 +00:00
Merge branch 'master' into super_stoker
This commit is contained in:
12 files changed
+343
-1400
No files matched your search
@@ -3,6 +3,7 @@ package com.glodblock.github.client.gui;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.common.item.ItemWirelessUltraTerminal;
|
||||
import com.glodblock.github.common.parts.PartFluidPatternTerminal;
|
||||
import com.glodblock.github.common.parts.PartFluidPatternTerminalEx;
|
||||
@@ -16,10 +17,14 @@ import com.glodblock.github.inventory.item.WirelessInterfaceTerminalInventory;
|
||||
import com.glodblock.github.inventory.item.WirelessLevelTerminalInventory;
|
||||
import com.glodblock.github.inventory.item.WirelessPatternTerminalInventory;
|
||||
import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.glodblock.github.network.CPacketInventoryAction;
|
||||
import com.glodblock.github.util.Ae2ReflectClient;
|
||||
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.helpers.InventoryAction;
|
||||
|
||||
public class GuiCraftingStatus extends appeng.client.gui.implementations.GuiCraftingStatus {
|
||||
|
||||
@@ -77,4 +82,20 @@ public class GuiCraftingStatus extends appeng.client.gui.implementations.GuiCraf
|
||||
super.actionPerformed(btn);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(final int xCoord, final int yCoord, final int btn) {
|
||||
IAEItemStack hoveredAEStack = getHoveredAEStack();
|
||||
if (hoveredAEStack != null && btn == 2) {
|
||||
((AEBaseContainer) inventorySlots).setTargetStack(hoveredAEStack);
|
||||
FluidCraft.proxy.netHandler.sendToServer(
|
||||
new CPacketInventoryAction(
|
||||
InventoryAction.AUTO_CRAFT,
|
||||
Ae2ReflectClient.getInventorySlots(this).size(),
|
||||
0,
|
||||
hoveredAEStack));
|
||||
return;
|
||||
}
|
||||
super.mouseClicked(xCoord, yCoord, btn);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,55 @@
|
||||
package com.glodblock.github.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.common.item.ItemWirelessUltraTerminal;
|
||||
import com.glodblock.github.common.parts.PartFluidPatternTerminal;
|
||||
import com.glodblock.github.common.parts.PartFluidPatternTerminalEx;
|
||||
import com.glodblock.github.common.parts.PartFluidTerminal;
|
||||
import com.glodblock.github.common.parts.PartLevelTerminal;
|
||||
import com.glodblock.github.inventory.gui.GuiType;
|
||||
import com.glodblock.github.inventory.item.IWirelessTerminal;
|
||||
import com.glodblock.github.inventory.item.WirelessLevelTerminalInventory;
|
||||
import com.glodblock.github.inventory.item.WirelessPatternTerminalInventory;
|
||||
import com.glodblock.github.network.SPacketPatternItemRenamer;
|
||||
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
|
||||
public class GuiPatternItemRenamer extends appeng.client.gui.implementations.GuiPatternItemRenamer {
|
||||
|
||||
private GuiType originalGui;
|
||||
|
||||
public GuiPatternItemRenamer(InventoryPlayer ip, ITerminalHost p) {
|
||||
super(ip, p);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setOriginGUI(Object target) {
|
||||
if (target instanceof PartFluidPatternTerminal) {
|
||||
this.originalGui = GuiType.FLUID_PATTERN_TERMINAL;
|
||||
} else if (target instanceof PartFluidPatternTerminalEx) {
|
||||
this.originalGui = GuiType.FLUID_PATTERN_TERMINAL_EX;
|
||||
} else if (target instanceof PartFluidTerminal) {
|
||||
this.originalGui = GuiType.FLUID_TERMINAL;
|
||||
} else if (target instanceof PartLevelTerminal) {
|
||||
originalGui = GuiType.LEVEL_TERMINAL;
|
||||
} else if (target instanceof IWirelessTerminal terminal && terminal.isUniversal(target)) {
|
||||
this.originalGui = ItemWirelessUltraTerminal.readMode(terminal.getItemStack());
|
||||
} else if (target instanceof WirelessPatternTerminalInventory) {
|
||||
this.originalGui = GuiType.FLUID_TERMINAL;
|
||||
} else if (target instanceof WirelessLevelTerminalInventory) {
|
||||
originalGui = GuiType.WIRELESS_LEVEL_TERMINAL;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(final char character, final int key) {
|
||||
if (key == Keyboard.KEY_RETURN || key == Keyboard.KEY_NUMPADENTER) {
|
||||
FluidCraft.proxy.netHandler
|
||||
.sendToServer(new SPacketPatternItemRenamer(originalGui, getText(), getValueIndex()));
|
||||
} else super.keyTyped(character, key);
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,6 @@ import com.glodblock.github.client.gui.GuiFluidCraftingWireless;
|
||||
import com.glodblock.github.client.gui.GuiFluidPatternExWireless;
|
||||
import com.glodblock.github.client.gui.GuiFluidPatternWireless;
|
||||
import com.glodblock.github.client.gui.GuiFluidPortableCell;
|
||||
import com.glodblock.github.client.gui.GuiInterfaceWireless;
|
||||
import com.glodblock.github.client.gui.GuiLevelWireless;
|
||||
import com.glodblock.github.client.gui.container.base.FCBaseContainer;
|
||||
import com.glodblock.github.common.item.ItemWirelessUltraTerminal;
|
||||
@@ -102,16 +101,14 @@ public abstract class FCBaseMEGui extends AEBaseMEGui {
|
||||
this.setOffsetY(this.getOffsetY() + 20);
|
||||
termBtns.add(this.FluidTerminal);
|
||||
}
|
||||
if (!(this instanceof GuiInterfaceWireless)) {
|
||||
this.buttonList.add(
|
||||
this.InterfaceTerminal = new GuiFCImgButton(
|
||||
this.guiLeft - 18,
|
||||
this.getOffsetY(),
|
||||
"INTERFACE_TEM",
|
||||
"YES"));
|
||||
this.setOffsetY(this.getOffsetY() + 20);
|
||||
termBtns.add(this.InterfaceTerminal);
|
||||
}
|
||||
this.buttonList.add(
|
||||
this.InterfaceTerminal = new GuiFCImgButton(
|
||||
this.guiLeft - 18,
|
||||
this.getOffsetY(),
|
||||
"INTERFACE_TEM",
|
||||
"YES"));
|
||||
this.setOffsetY(this.getOffsetY() + 20);
|
||||
termBtns.add(this.InterfaceTerminal);
|
||||
if (!(this instanceof GuiLevelWireless)) {
|
||||
this.buttonList.add(
|
||||
this.LevelTerminal = new GuiFCImgButton(this.guiLeft - 18, this.getOffsetY(), "LEVEL_TEM", "YES"));
|
||||
|
||||
@@ -416,6 +416,9 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
|
||||
if (slot instanceof OptionalSlotFake || slot instanceof SlotFakeCraftingMatrix) {
|
||||
if (slot.getHasStack()) {
|
||||
InventoryAction action = InventoryAction.SET_PATTERN_VALUE;
|
||||
if (isCtrlKeyDown()) {
|
||||
action = InventoryAction.RENAME_PATTERN_ITEM;
|
||||
}
|
||||
IAEItemStack stack = AEItemStack.create(slot.getStack());
|
||||
((AEBaseContainer) this.inventorySlots).setTargetStack(stack);
|
||||
for (int i = 0; i < this.inventorySlots.inventorySlots.size(); i++) {
|
||||
|
||||
Reference in new issue
Block a user