mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-12 00:07:29 +00:00
Merge pull request #79 from asdflj/master
Universal wireless terminal support processing pattern terminal mode
This commit is contained in:
26 files changed
+723
-111
No files matched your search
@@ -56,6 +56,7 @@ public class GuiFCImgButton extends GuiButton implements ITooltip {
|
||||
this.registerApp(12, "PATTERN_TEM", "YES", "pattern_terminal_w");
|
||||
this.registerApp(13, "ESSENTIA_TEM", "YES", "essentia_terminal_w");
|
||||
this.registerApp(14, "INTERFACE_TEM", "YES", "interface_terminal_w");
|
||||
this.registerApp(15, "PATTERN_EX_TEM", "YES", "pattern_terminal_ex_w");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.glodblock.github.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import com.glodblock.github.inventory.item.IWirelessTerminal;
|
||||
|
||||
public class GuiFluidPatternExWireless extends GuiFluidPatternTerminalEx {
|
||||
|
||||
public GuiFluidPatternExWireless(InventoryPlayer inventoryPlayer, IWirelessTerminal te) {
|
||||
super(inventoryPlayer, te);
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ public abstract class FCBaseMEGui extends AEBaseMEGui {
|
||||
protected GuiFCImgButton PatternTerminal;
|
||||
protected GuiFCImgButton EssentiaTerminal;
|
||||
protected GuiFCImgButton InterfaceTerminal;
|
||||
protected GuiFCImgButton PatternTerminaleEx;
|
||||
protected List<GuiFCImgButton> termBtns = new ArrayList<>();
|
||||
protected boolean drawSwitchGuiBtn;
|
||||
|
||||
@@ -75,6 +76,16 @@ public abstract class FCBaseMEGui extends AEBaseMEGui {
|
||||
this.setOffsetY(this.getOffsetY() + 20);
|
||||
termBtns.add(this.PatternTerminal);
|
||||
}
|
||||
if (!(this instanceof GuiFluidPatternExWireless)) {
|
||||
this.buttonList.add(
|
||||
this.PatternTerminaleEx = new GuiFCImgButton(
|
||||
this.guiLeft - 18,
|
||||
this.getOffsetY(),
|
||||
"PATTERN_EX_TEM",
|
||||
"YES"));
|
||||
this.setOffsetY(this.getOffsetY() + 20);
|
||||
termBtns.add(this.PatternTerminaleEx);
|
||||
}
|
||||
if (!(this instanceof GuiFluidPortableCell)) {
|
||||
this.buttonList.add(
|
||||
this.FluidTerminal = new GuiFCImgButton(this.guiLeft - 18, this.getOffsetY(), "FLUID_TEM", "YES"));
|
||||
@@ -121,6 +132,8 @@ public abstract class FCBaseMEGui extends AEBaseMEGui {
|
||||
ItemWirelessUltraTerminal.switchTerminal(this.mc.thePlayer, GuiType.WIRELESS_FLUID_PATTERN_TERMINAL);
|
||||
} else if (btn == this.InterfaceTerminal) {
|
||||
ItemWirelessUltraTerminal.switchTerminal(this.mc.thePlayer, GuiType.WIRELESS_INTERFACE_TERMINAL);
|
||||
} else if (btn == this.PatternTerminaleEx) {
|
||||
ItemWirelessUltraTerminal.switchTerminal(this.mc.thePlayer, GuiType.WIRELESS_FLUID_PATTERN_TERMINAL_EX);
|
||||
}
|
||||
}
|
||||
super.actionPerformed(btn);
|
||||
|
||||
+3
-15
@@ -16,7 +16,6 @@ import appeng.tile.inventory.InvOperation;
|
||||
|
||||
import com.glodblock.github.inventory.item.IWirelessCraftTerminal;
|
||||
import com.glodblock.github.inventory.item.IWirelessTerminal;
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
public class ContainerCraftingWireless extends ContainerItemMonitor
|
||||
implements IAEAppEngInventory, IContainerCraftingPacket {
|
||||
@@ -24,16 +23,10 @@ public class ContainerCraftingWireless extends ContainerItemMonitor
|
||||
private final IWirelessCraftTerminal it;
|
||||
private final SlotCraftingMatrix[] craftingSlots = new SlotCraftingMatrix[9];
|
||||
private final SlotCraftingTerm outputSlot;
|
||||
private final int slot;
|
||||
private int ticks = 0;
|
||||
private double powerMultiplier = 0.5;
|
||||
|
||||
public ContainerCraftingWireless(final InventoryPlayer ip, final IWirelessTerminal monitorable) {
|
||||
super(ip, monitorable, false);
|
||||
this.it = (IWirelessCraftTerminal) monitorable;
|
||||
final int slotIndex = monitorable.getInventorySlot();
|
||||
this.lockPlayerInventorySlot(slotIndex);
|
||||
this.slot = slotIndex;
|
||||
final IInventory crafting = this.it.getInventoryByName("crafting");
|
||||
for (int y = 0; y < 3; y++) {
|
||||
for (int x = 0; x < 3; x++) {
|
||||
@@ -63,14 +56,9 @@ public class ContainerCraftingWireless extends ContainerItemMonitor
|
||||
this.onCraftMatrixChanged(crafting);
|
||||
}
|
||||
|
||||
public void detectAndSendChanges() {
|
||||
this.ticks = Util
|
||||
.drainItemPower(this, this.getPlayerInv(), this.slot, this.ticks, this.getPowerMultiplier(), this.it);
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
|
||||
private double getPowerMultiplier() {
|
||||
return this.powerMultiplier;
|
||||
@Override
|
||||
protected boolean isWirelessTerminal() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -318,4 +318,9 @@ public class ContainerFluidMonitor extends FCContainerMonitor<IAEFluidStack> {
|
||||
protected boolean isEssentiaMode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isWirelessTerminal() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.glodblock.github.client.gui.container;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import com.glodblock.github.inventory.item.IWirelessTerminal;
|
||||
|
||||
public class ContainerFluidPatternExWireless extends ContainerFluidPatternTerminalEx {
|
||||
|
||||
public ContainerFluidPatternExWireless(InventoryPlayer ip, IWirelessTerminal monitorable) {
|
||||
super(ip, monitorable);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isWirelessTerminal() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+3
-27
@@ -3,39 +3,15 @@ package com.glodblock.github.client.gui.container;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import com.glodblock.github.inventory.item.IWirelessTerminal;
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
public class ContainerFluidPatternWireless extends ContainerFluidPatternTerminal {
|
||||
|
||||
private double powerMultiplier = 0.5;
|
||||
private final IWirelessTerminal civ;
|
||||
private int ticks = 0;
|
||||
private final int slot;
|
||||
|
||||
public ContainerFluidPatternWireless(InventoryPlayer ip, IWirelessTerminal monitorable) {
|
||||
super(ip, monitorable);
|
||||
if (monitorable != null) {
|
||||
final int slotIndex = monitorable.getInventorySlot();
|
||||
this.lockPlayerInventorySlot(slotIndex);
|
||||
this.slot = slotIndex;
|
||||
} else {
|
||||
this.slot = -1;
|
||||
this.lockPlayerInventorySlot(ip.currentItem);
|
||||
}
|
||||
this.civ = monitorable;
|
||||
}
|
||||
|
||||
public void detectAndSendChanges() {
|
||||
this.ticks = Util
|
||||
.drainItemPower(this, this.getPlayerInv(), this.slot, this.ticks, this.getPowerMultiplier(), this.civ);
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
|
||||
private double getPowerMultiplier() {
|
||||
return this.powerMultiplier;
|
||||
}
|
||||
|
||||
void setPowerMultiplier(final double powerMultiplier) {
|
||||
this.powerMultiplier = powerMultiplier;
|
||||
@Override
|
||||
protected boolean isWirelessTerminal() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+2
-26
@@ -3,41 +3,17 @@ package com.glodblock.github.client.gui.container;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import com.glodblock.github.inventory.item.IFluidPortableCell;
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
public class ContainerFluidPortableCell extends ContainerFluidMonitor {
|
||||
|
||||
private double powerMultiplier = 0.5;
|
||||
private final IFluidPortableCell civ;
|
||||
private int ticks = 0;
|
||||
private final int slot;
|
||||
|
||||
public ContainerFluidPortableCell(final InventoryPlayer ip, final IFluidPortableCell monitorable) {
|
||||
super(ip, monitorable, false);
|
||||
if (monitorable != null) {
|
||||
final int slotIndex = monitorable.getInventorySlot();
|
||||
this.lockPlayerInventorySlot(slotIndex);
|
||||
this.slot = slotIndex;
|
||||
} else {
|
||||
this.slot = -1;
|
||||
this.lockPlayerInventorySlot(ip.currentItem);
|
||||
}
|
||||
this.civ = monitorable;
|
||||
this.bindPlayerInventory(ip, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
this.ticks = Util
|
||||
.drainItemPower(this, this.getPlayerInv(), this.slot, this.ticks, this.getPowerMultiplier(), this.civ);
|
||||
super.detectAndSendChanges();
|
||||
protected boolean isWirelessTerminal() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private double getPowerMultiplier() {
|
||||
return this.powerMultiplier;
|
||||
}
|
||||
|
||||
void setPowerMultiplier(final double powerMultiplier) {
|
||||
this.powerMultiplier = powerMultiplier;
|
||||
}
|
||||
}
|
||||
+7
-18
@@ -14,7 +14,6 @@ import appeng.api.config.*;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketCompressedNBT;
|
||||
import appeng.helpers.DualityInterface;
|
||||
@@ -33,15 +32,14 @@ import appeng.util.inv.AdaptorPlayerHand;
|
||||
import appeng.util.inv.ItemSlot;
|
||||
import appeng.util.inv.WrapperInvSlot;
|
||||
|
||||
import com.glodblock.github.client.gui.container.base.FCBaseContainer;
|
||||
import com.glodblock.github.common.parts.PartFluidInterface;
|
||||
import com.glodblock.github.common.tile.TileFluidInterface;
|
||||
import com.glodblock.github.inventory.item.IWirelessInterfaceTerminal;
|
||||
import com.glodblock.github.inventory.item.IWirelessTerminal;
|
||||
import com.glodblock.github.util.Util;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
public class ContainerInterfaceWireless extends AEBaseContainer {
|
||||
public class ContainerInterfaceWireless extends FCBaseContainer {
|
||||
|
||||
/**
|
||||
* this stuff is all server side..
|
||||
@@ -50,20 +48,12 @@ public class ContainerInterfaceWireless extends AEBaseContainer {
|
||||
|
||||
private final Multimap<IInterfaceHost, ContainerInterfaceWireless.InvTracker> diList = HashMultimap.create();
|
||||
private final Map<Long, ContainerInterfaceWireless.InvTracker> byId = new HashMap<Long, ContainerInterfaceWireless.InvTracker>();
|
||||
private final IWirelessInterfaceTerminal it;
|
||||
// private final Map<Long, InvTracker> byId = new HashMap<>();
|
||||
private IGrid grid;
|
||||
private NBTTagCompound data = new NBTTagCompound();
|
||||
private int ticks;
|
||||
private final int slot;
|
||||
private double powerMultiplier = 0.5;
|
||||
|
||||
public ContainerInterfaceWireless(final InventoryPlayer ip, final IWirelessTerminal monitorable) {
|
||||
super(ip, monitorable);
|
||||
this.it = (IWirelessInterfaceTerminal) monitorable;
|
||||
final int slotIndex = monitorable.getInventorySlot();
|
||||
this.lockPlayerInventorySlot(slotIndex);
|
||||
this.slot = slotIndex;
|
||||
if (Platform.isServer()) {
|
||||
this.grid = monitorable.getActionableNode().getGrid();
|
||||
}
|
||||
@@ -81,17 +71,11 @@ public class ContainerInterfaceWireless extends AEBaseContainer {
|
||||
return union;
|
||||
}
|
||||
|
||||
private double getPowerMultiplier() {
|
||||
return this.powerMultiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
if (Platform.isClient()) {
|
||||
return;
|
||||
}
|
||||
this.ticks = Util
|
||||
.drainItemPower(this, this.getPlayerInv(), this.slot, this.ticks, this.getPowerMultiplier(), this.it);
|
||||
super.detectAndSendChanges();
|
||||
|
||||
if (this.grid == null) {
|
||||
@@ -300,6 +284,11 @@ public class ContainerInterfaceWireless extends AEBaseContainer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isWirelessTerminal() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isDifferent(final ItemStack a, final ItemStack b) {
|
||||
if (a == null && b == null) {
|
||||
return false;
|
||||
|
||||
@@ -150,4 +150,9 @@ public class ContainerItemMonitor extends FCContainerMonitor<IAEItemStack> {
|
||||
this.items.add(is);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isWirelessTerminal() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.glodblock.github.client.gui.container.base;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import appeng.container.AEBaseContainer;
|
||||
|
||||
import com.glodblock.github.inventory.item.IFluidPortableCell;
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
public abstract class FCBaseContainer extends AEBaseContainer {
|
||||
|
||||
private int ticks;
|
||||
private final double powerMultiplier = 0.5;
|
||||
private IFluidPortableCell host;
|
||||
private int slot = -1;
|
||||
private final InventoryPlayer ip;
|
||||
|
||||
public FCBaseContainer(InventoryPlayer ip, ITerminalHost monitorable) {
|
||||
super(ip, monitorable);
|
||||
this.ip = ip;
|
||||
if (isWirelessTerminal()) {
|
||||
host = (IFluidPortableCell) monitorable;
|
||||
this.slot = lockSlot();
|
||||
}
|
||||
}
|
||||
|
||||
private int lockSlot() {
|
||||
if (isWirelessTerminal()) {
|
||||
if (this.host != null) {
|
||||
final int slotIndex = this.host.getInventorySlot();
|
||||
this.lockPlayerInventorySlot(slotIndex);
|
||||
return slotIndex;
|
||||
} else {
|
||||
this.lockPlayerInventorySlot(ip.currentItem);
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
protected abstract boolean isWirelessTerminal();
|
||||
|
||||
public void detectAndSendChanges() {
|
||||
if (isWirelessTerminal()) {
|
||||
this.ticks = Util.drainItemPower(
|
||||
this,
|
||||
this.getPlayerInv(),
|
||||
this.slot,
|
||||
this.ticks,
|
||||
this.getPowerMultiplier(),
|
||||
this.host);
|
||||
}
|
||||
super.detectAndSendChanges();
|
||||
}
|
||||
|
||||
public double getPowerMultiplier() {
|
||||
return this.powerMultiplier;
|
||||
}
|
||||
|
||||
}
|
||||
+2
-8
@@ -9,19 +9,16 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import appeng.api.config.*;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.energy.IEnergyGrid;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.IMEMonitorHandlerReceiver;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.core.AELog;
|
||||
@@ -34,7 +31,7 @@ import appeng.util.Platform;
|
||||
|
||||
import com.glodblock.github.inventory.item.IWirelessTerminal;
|
||||
|
||||
public abstract class FCContainerMonitor<T extends IAEStack<T>> extends AEBaseContainer
|
||||
public abstract class FCContainerMonitor<T extends IAEStack<T>> extends FCBaseContainer
|
||||
implements IConfigManagerHost, IConfigurableObject, IMEMonitorHandlerReceiver<T> {
|
||||
|
||||
protected final SlotRestrictedInput[] cellView = new SlotRestrictedInput[5];
|
||||
@@ -58,10 +55,7 @@ public abstract class FCContainerMonitor<T extends IAEStack<T>> extends AEBaseCo
|
||||
|
||||
protected FCContainerMonitor(final InventoryPlayer ip, final ITerminalHost monitorable,
|
||||
final boolean bindInventory) {
|
||||
super(
|
||||
ip,
|
||||
monitorable instanceof TileEntity ? (TileEntity) monitorable : null,
|
||||
monitorable instanceof IPart ? (IPart) monitorable : null);
|
||||
super(ip, monitorable);
|
||||
this.host = monitorable;
|
||||
this.clientCM = new ConfigManager(this);
|
||||
this.clientCM.registerSetting(Settings.SORT_BY, SortOrder.NAME);
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.glodblock.github.common.item;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.storage.IMEInventoryHandler;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.items.contents.CellConfig;
|
||||
import appeng.items.contents.CellUpgrades;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.common.Config;
|
||||
import com.glodblock.github.common.storage.IFluidCellInventory;
|
||||
import com.glodblock.github.common.storage.IFluidCellInventoryHandler;
|
||||
import com.glodblock.github.common.storage.IStorageFluidCell;
|
||||
import com.glodblock.github.common.tabs.FluidCraftingTabs;
|
||||
import com.glodblock.github.loader.IRegister;
|
||||
import com.glodblock.github.util.ModAndClassUtil;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ItemCreativeFluidStorageCell extends AEBaseItem
|
||||
implements IStorageFluidCell, IRegister<ItemCreativeFluidStorageCell> {
|
||||
|
||||
public ItemCreativeFluidStorageCell() {
|
||||
super();
|
||||
setUnlocalizedName(NameConst.ITEM_CREATIVE_FLUID_STORAGE);
|
||||
setTextureName(FluidCraft.resource(NameConst.ITEM_CREATIVE_FLUID_STORAGE).toString());
|
||||
this.setFeature(EnumSet.of(AEFeature.StorageCells));
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBytes(ItemStack cellItem) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBytesPerType(ItemStack cellItem) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlackListed(ItemStack cellItem, IAEFluidStack requestedAddition) {
|
||||
if (Config.blacklistEssentiaGas && ModAndClassUtil.ThE && requestedAddition != null) {
|
||||
return ModAndClassUtil.essentiaGas.isInstance(requestedAddition.getFluid());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean storableInStorageCell() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStorageCell(ItemStack i) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getIdleDrain() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTotalTypes(ItemStack cellItem) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEditable(ItemStack is) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getUpgradesInventory(ItemStack is) {
|
||||
return new CellUpgrades(is, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getConfigInventory(ItemStack is) {
|
||||
return new CellConfig(is);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FuzzyMode getFuzzyMode(ItemStack is) {
|
||||
final String fz = Platform.openNbtData(is).getString("FuzzyMode");
|
||||
try {
|
||||
return FuzzyMode.valueOf(fz);
|
||||
} catch (final Throwable t) {
|
||||
return FuzzyMode.IGNORE_ALL;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCheckedInformation(final ItemStack stack, final EntityPlayer player, final List<String> lines,
|
||||
final boolean displayMoreInfo) {
|
||||
final IMEInventoryHandler<?> inventory = AEApi.instance().registries().cell()
|
||||
.getCellInventory(stack, null, StorageChannel.FLUIDS);
|
||||
|
||||
if (inventory instanceof IFluidCellInventoryHandler) {
|
||||
final IFluidCellInventoryHandler handler = (IFluidCellInventoryHandler) inventory;
|
||||
final IFluidCellInventory cellInventory = handler.getCellInv();
|
||||
|
||||
if (GuiScreen.isCtrlKeyDown()) {
|
||||
if (cellInventory.getContents().size() > 0) {
|
||||
lines.add(StatCollector.translateToLocal(NameConst.TT_CELL_CONTENTS));
|
||||
for (IAEFluidStack fluid : cellInventory.getContents()) {
|
||||
if (fluid != null) {
|
||||
lines.add(String.format(" %s", fluid.getFluidStack().getLocalizedName()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
lines.add(StatCollector.translateToLocal(NameConst.TT_CELL_EMPTY));
|
||||
}
|
||||
} else {
|
||||
lines.add(StatCollector.translateToLocal(NameConst.TT_CTRL_FOR_MORE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFuzzyMode(ItemStack is, FuzzyMode fzMode) {
|
||||
Platform.openNbtData(is).setString("FuzzyMode", fzMode.name());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCreativeFluidStorageCell register() {
|
||||
GameRegistry.registerItem(this, NameConst.ITEM_CREATIVE_FLUID_STORAGE, FluidCraft.MODID);
|
||||
setCreativeTab(FluidCraftingTabs.INSTANCE);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -23,10 +23,7 @@ import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.common.tabs.FluidCraftingTabs;
|
||||
import com.glodblock.github.inventory.InventoryHandler;
|
||||
import com.glodblock.github.inventory.gui.GuiType;
|
||||
import com.glodblock.github.inventory.item.WirelessCraftingTerminalInventory;
|
||||
import com.glodblock.github.inventory.item.WirelessFluidTerminalInventory;
|
||||
import com.glodblock.github.inventory.item.WirelessInterfaceTerminalInventory;
|
||||
import com.glodblock.github.inventory.item.WirelessPatternTerminalInventory;
|
||||
import com.glodblock.github.inventory.item.*;
|
||||
import com.glodblock.github.loader.IRegister;
|
||||
import com.glodblock.github.network.CPacketSwitchGuis;
|
||||
import com.glodblock.github.util.BlockPos;
|
||||
@@ -52,6 +49,7 @@ public class ItemWirelessUltraTerminal extends ItemBaseWirelessTerminal
|
||||
setTextureName(FluidCraft.resource(NameConst.ITEM_WIRELESS_ULTRA_TERMINAL).toString());
|
||||
guis.add(GuiType.WIRELESS_CRAFTING_TERMINAL);
|
||||
guis.add(GuiType.WIRELESS_FLUID_PATTERN_TERMINAL);
|
||||
guis.add(GuiType.WIRELESS_FLUID_PATTERN_TERMINAL_EX);
|
||||
guis.add(GuiType.WIRELESS_FLUID_TERMINAL);
|
||||
guis.add(GuiType.WIRELESS_INTERFACE_TERMINAL);
|
||||
if (ModAndClassUtil.ThE) {
|
||||
@@ -97,8 +95,7 @@ public class ItemWirelessUltraTerminal extends ItemBaseWirelessTerminal
|
||||
}
|
||||
if (gui == GuiType.WIRELESS_FLUID_PATTERN_TERMINAL) {
|
||||
return new WirelessPatternTerminalInventory(stack, x, gridNode, player);
|
||||
}
|
||||
if (gui == GuiType.WIRELESS_CRAFTING_TERMINAL) {
|
||||
} else if (gui == GuiType.WIRELESS_CRAFTING_TERMINAL) {
|
||||
return new WirelessCraftingTerminalInventory(stack, x, gridNode, player);
|
||||
} else if (ModAndClassUtil.ThE && gui == GuiType.WIRELESS_ESSENTIA_TERMINAL) {
|
||||
return new WirelessFluidTerminalInventory(stack, x, gridNode, player);
|
||||
@@ -106,6 +103,8 @@ public class ItemWirelessUltraTerminal extends ItemBaseWirelessTerminal
|
||||
return new WirelessFluidTerminalInventory(stack, x, gridNode, player);
|
||||
} else if (gui == GuiType.WIRELESS_INTERFACE_TERMINAL) {
|
||||
return new WirelessInterfaceTerminalInventory(stack, x, gridNode, player);
|
||||
} else if (gui == GuiType.WIRELESS_FLUID_PATTERN_TERMINAL_EX) {
|
||||
return new WirelessPatternTerminalExInventory(stack, x, gridNode, player);
|
||||
} else {
|
||||
this.setMode(GuiType.WIRELESS_FLUID_TERMINAL, stack); // set as default mode
|
||||
return new WirelessFluidTerminalInventory(stack, x, gridNode, player);
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.glodblock.github.common.storage;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.exceptions.AppEngException;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.ISaveProvider;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
public class CreativeFluidCellInventory extends FluidCellInventory {
|
||||
|
||||
public CreativeFluidCellInventory(ItemStack o, ISaveProvider container) throws AppEngException {
|
||||
super(o, container);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEFluidStack injectItems(IAEFluidStack input, Actionable mode, BaseActionSource src) {
|
||||
if (input == null || input.getStackSize() == 0) {
|
||||
return null;
|
||||
}
|
||||
if (this.cellType.isBlackListed(this.cellItem, input)) {
|
||||
return input;
|
||||
}
|
||||
if (this.getCellFluids().findPrecise(input) != null) {
|
||||
return null;
|
||||
} else {
|
||||
return input;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEFluidStack extractItems(IAEFluidStack request, Actionable mode, BaseActionSource src) {
|
||||
if (request == null) {
|
||||
return null;
|
||||
}
|
||||
if (this.getCellFluids().findPrecise(request) != null) {
|
||||
return request.copy();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadCellFluids() {
|
||||
if (this.cellFluids == null) {
|
||||
this.cellFluids = AEApi.instance().storage().createFluidList();
|
||||
}
|
||||
this.cellFluids.resetStatus(); // clears totals and stuff.
|
||||
IInventory inv = this.cellType.getConfigInventory(this.cellItem);
|
||||
for (int i = 0; i < inv.getSizeInventory(); i++) {
|
||||
ItemStack is = inv.getStackInSlot(i);
|
||||
if (Util.FluidUtil.isFluidContainer(is)) {
|
||||
FluidStack fs = Util.getFluidFromItem(is);
|
||||
if (fs == null) continue;
|
||||
IAEFluidStack iaeFluidStack = Util.FluidUtil.createAEFluidStack(fs);
|
||||
if (this.cellFluids.findPrecise(iaeFluidStack) == null) {
|
||||
iaeFluidStack.setStackSize(Integer.MAX_VALUE);
|
||||
this.cellFluids.add(iaeFluidStack);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,21 +22,23 @@ import appeng.api.storage.data.IItemList;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.item.AEFluidStack;
|
||||
|
||||
import com.glodblock.github.common.item.ItemCreativeFluidStorageCell;
|
||||
|
||||
public class FluidCellInventory implements IFluidCellInventory {
|
||||
|
||||
private static final String FLUID_TYPE_TAG = "ft";
|
||||
private static final String FLUID_COUNT_TAG = "fc";
|
||||
private static final String FLUID_SLOT = "#";
|
||||
private static final String FLUID_SLOT_COUNT = "@";
|
||||
private IStorageFluidCell cellType;
|
||||
protected IStorageFluidCell cellType;
|
||||
private static String[] fluidSlots;
|
||||
private static String[] fluidSlotCount;
|
||||
private final ItemStack cellItem;
|
||||
protected final ItemStack cellItem;
|
||||
private final ISaveProvider container;
|
||||
private final int MAX_TYPE = 63;
|
||||
private long storedFluidCount;
|
||||
private short storedFluids;
|
||||
private IItemList<IAEFluidStack> cellFluids;
|
||||
protected IItemList<IAEFluidStack> cellFluids;
|
||||
private final NBTTagCompound tagCompound;
|
||||
public static final int singleByteAmount = 256 * 8;
|
||||
|
||||
@@ -76,7 +78,11 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
|
||||
public static IMEInventoryHandler<IAEFluidStack> getCell(final ItemStack o, final ISaveProvider container2) {
|
||||
try {
|
||||
return new FluidCellInventoryHandler(new FluidCellInventory(o, container2));
|
||||
if (o.getItem() instanceof ItemCreativeFluidStorageCell) {
|
||||
return new FluidCellInventoryHandler(new CreativeFluidCellInventory(o, container2));
|
||||
} else {
|
||||
return new FluidCellInventoryHandler(new FluidCellInventory(o, container2));
|
||||
}
|
||||
} catch (final AppEngException e) {
|
||||
return null;
|
||||
}
|
||||
@@ -185,7 +191,7 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
return 3;
|
||||
}
|
||||
|
||||
private void loadCellFluids() {
|
||||
protected void loadCellFluids() {
|
||||
if (this.cellFluids == null) {
|
||||
this.cellFluids = AEApi.instance().storage().createFluidList();
|
||||
}
|
||||
@@ -203,7 +209,7 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
}
|
||||
}
|
||||
|
||||
private IItemList<IAEFluidStack> getCellFluids() {
|
||||
protected IItemList<IAEFluidStack> getCellFluids() {
|
||||
if (this.cellFluids == null) {
|
||||
this.loadCellFluids();
|
||||
}
|
||||
|
||||
@@ -247,6 +247,18 @@ public enum GuiType {
|
||||
return new GuiFluidPatternWireless(player.inventory, inv);
|
||||
}
|
||||
}),
|
||||
WIRELESS_FLUID_PATTERN_TERMINAL_EX(new ItemGuiFactory<IWirelessTerminal>(IWirelessTerminal.class) {
|
||||
|
||||
@Override
|
||||
protected Object createServerGui(EntityPlayer player, IWirelessTerminal inv) {
|
||||
return new ContainerFluidPatternExWireless(player.inventory, inv);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object createClientGui(EntityPlayer player, IWirelessTerminal inv) {
|
||||
return new GuiFluidPatternExWireless(player.inventory, inv);
|
||||
}
|
||||
}),
|
||||
WIRELESS_INTERFACE_TERMINAL(new ItemGuiFactory<IWirelessTerminal>(IWirelessTerminal.class) {
|
||||
|
||||
@Override
|
||||
|
||||
+328
@@ -0,0 +1,328 @@
|
||||
package com.glodblock.github.inventory.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.config.*;
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.storage.IMEInventoryHandler;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.MEMonitorHandler;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.items.contents.WirelessTerminalViewCells;
|
||||
import appeng.items.tools.powered.ToolWirelessTerminal;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.tile.inventory.InvOperation;
|
||||
import appeng.util.ConfigManager;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.glodblock.github.common.item.ItemFluidPacket;
|
||||
import com.glodblock.github.inventory.ItemBiggerAppEngInventory;
|
||||
import com.glodblock.github.inventory.WirelessFluidPatternTerminalPatterns;
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
public class WirelessPatternTerminalExInventory extends MEMonitorHandler<IAEItemStack>
|
||||
implements IWirelessPatternTerminal {
|
||||
|
||||
private final ItemStack target;
|
||||
private final IAEItemPowerStorage ips;
|
||||
private final int inventorySlot;
|
||||
private final AppEngInternalInventory viewCell;
|
||||
private final StorageChannel channel;
|
||||
private final IGridNode grid;
|
||||
|
||||
protected AppEngInternalInventory crafting;
|
||||
protected AppEngInternalInventory output;
|
||||
protected final WirelessFluidPatternTerminalPatterns pattern;
|
||||
|
||||
protected boolean craftingMode = false;
|
||||
protected boolean substitute = false;
|
||||
protected boolean combine = false;
|
||||
protected boolean prioritize = false;
|
||||
protected boolean inverted = false;
|
||||
protected boolean beSubstitute = false;
|
||||
protected int activePage = 0;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public WirelessPatternTerminalExInventory(final ItemStack is, final int slot, IGridNode gridNode,
|
||||
EntityPlayer player) {
|
||||
super(
|
||||
(IMEInventoryHandler<IAEItemStack>) Objects
|
||||
.requireNonNull(Util.getWirelessInv(is, player, StorageChannel.ITEMS)));
|
||||
this.ips = (ToolWirelessTerminal) is.getItem();
|
||||
this.grid = gridNode;
|
||||
this.target = is;
|
||||
this.inventorySlot = slot;
|
||||
this.viewCell = new WirelessTerminalViewCells(is);
|
||||
this.channel = StorageChannel.ITEMS;
|
||||
this.pattern = new WirelessFluidPatternTerminalPatterns(is);
|
||||
this.crafting = new ItemBiggerAppEngInventory(is, "crafting_ex", 32);
|
||||
this.output = new ItemBiggerAppEngInventory(is, "output_ex", 32);
|
||||
}
|
||||
|
||||
public StorageChannel getChannel() {
|
||||
return this.channel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItemStack() {
|
||||
return this.target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double extractAEPower(double amt, Actionable mode, PowerMultiplier usePowerMultiplier) {
|
||||
amt = usePowerMultiplier.multiply(amt);
|
||||
if (mode == Actionable.SIMULATE) {
|
||||
return usePowerMultiplier.divide(Math.min(amt, this.ips.getAECurrentPower(this.target)));
|
||||
}
|
||||
return usePowerMultiplier.divide(this.ips.extractAEPower(this.target, amt));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEMonitor<IAEItemStack> getItemInventory() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEMonitor<IAEFluidStack> getFluidInventory() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void readFromNBT() {
|
||||
NBTTagCompound data = Platform.openNbtData(this.target);
|
||||
this.setSubstitution(data.getBoolean("substitute"));
|
||||
this.setCombineMode(data.getBoolean("combine"));
|
||||
this.setBeSubstitute(data.getBoolean("beSubstitute"));
|
||||
this.setPrioritization(data.getBoolean("priorization"));
|
||||
this.setInverted(data.getBoolean("inverted"));
|
||||
this.setActivePage(data.getInteger("activePage"));
|
||||
}
|
||||
|
||||
public void writeToNBT() {
|
||||
NBTTagCompound data = Platform.openNbtData(this.target);
|
||||
data.setBoolean("substitute", this.substitute);
|
||||
data.setBoolean("combine", this.combine);
|
||||
data.setBoolean("beSubstitute", this.beSubstitute);
|
||||
data.setBoolean("priorization", this.prioritize);
|
||||
data.setBoolean("inverted", this.inverted);
|
||||
data.setInteger("activePage", this.activePage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigManager getConfigManager() {
|
||||
final ConfigManager out = new ConfigManager((manager, settingName, newValue) -> {
|
||||
final NBTTagCompound data = Platform.openNbtData(this.target);
|
||||
manager.writeToNBT(data);
|
||||
});
|
||||
out.registerSetting(Settings.SORT_BY, SortOrder.NAME);
|
||||
out.registerSetting(Settings.VIEW_MODE, ViewItems.ALL);
|
||||
out.registerSetting(Settings.SORT_DIRECTION, SortDir.ASCENDING);
|
||||
out.readFromNBT((NBTTagCompound) Platform.openNbtData(this.target).copy());
|
||||
this.readFromNBT();
|
||||
return out;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventorySlot() {
|
||||
return this.inventorySlot;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getViewCellStorage() {
|
||||
return this.viewCell;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGridNode getGridNode(ForgeDirection dir) {
|
||||
return this.grid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AECableType getCableConnectionType(ForgeDirection dir) {
|
||||
return AECableType.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void securityBreak() {
|
||||
this.getGridNode(ForgeDirection.UNKNOWN).getMachine().securityBreak();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChanges() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removedStack,
|
||||
ItemStack newStack) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
private void fixCraftingRecipes() {
|
||||
if (this.craftingMode) {
|
||||
for (int x = 0; x < this.crafting.getSizeInventory(); x++) {
|
||||
final ItemStack is = this.crafting.getStackInSlot(x);
|
||||
if (is != null) {
|
||||
is.stackSize = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInverted() {
|
||||
return this.inverted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getInventoryByName(String name) {
|
||||
if (name.equals("crafting")) {
|
||||
return this.crafting;
|
||||
}
|
||||
|
||||
if (name.equals("output")) {
|
||||
return this.output;
|
||||
}
|
||||
|
||||
if (name.equals("pattern")) {
|
||||
return this.pattern;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeSubstitute() {
|
||||
return this.beSubstitute;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPrioritize() {
|
||||
return this.prioritize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSubstitution() {
|
||||
return this.substitute;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCombine() {
|
||||
return this.combine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChangeCrafting(IAEItemStack[] newCrafting, IAEItemStack[] newOutput) {
|
||||
IInventory crafting = this.getInventoryByName("crafting");
|
||||
IInventory output = this.getInventoryByName("output");
|
||||
if (crafting instanceof AppEngInternalInventory && output instanceof AppEngInternalInventory) {
|
||||
for (int x = 0; x < crafting.getSizeInventory() && x < newCrafting.length; x++) {
|
||||
final IAEItemStack item = newCrafting[x];
|
||||
crafting.setInventorySlotContents(x, item == null ? null : item.getItemStack());
|
||||
}
|
||||
for (int x = 0; x < output.getSizeInventory() && x < newOutput.length; x++) {
|
||||
final IAEItemStack item = newOutput[x];
|
||||
output.setInventorySlotContents(x, item == null ? null : item.getItemStack());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCraftingRecipe(boolean craftingMode) {
|
||||
this.craftingMode = craftingMode;
|
||||
this.fixCraftingRecipes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSubstitution(boolean canSubstitute) {
|
||||
this.substitute = canSubstitute;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBeSubstitute(boolean canBeSubstitute) {
|
||||
this.beSubstitute = canBeSubstitute;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCombineMode(boolean shouldCombine) {
|
||||
this.combine = shouldCombine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPrioritization(boolean canPrioritize) {
|
||||
this.prioritize = canPrioritize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInverted(boolean inverted) {
|
||||
this.inverted = inverted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getActivePage() {
|
||||
return this.activePage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActivePage(int activePage) {
|
||||
this.activePage = activePage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCraftingRecipe() {
|
||||
return this.craftingMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sortCraftingItems() {
|
||||
List<ItemStack> items = new ArrayList<ItemStack>();
|
||||
List<ItemStack> fluids = new ArrayList<ItemStack>();
|
||||
for (ItemStack is : this.crafting) {
|
||||
if (is == null) continue;
|
||||
if (is.getItem() instanceof ItemFluidPacket) {
|
||||
fluids.add(is);
|
||||
} else {
|
||||
items.add(is);
|
||||
}
|
||||
}
|
||||
if (this.prioritize) {
|
||||
fluids.addAll(items);
|
||||
items.clear();
|
||||
} else {
|
||||
items.addAll(fluids);
|
||||
fluids.clear();
|
||||
}
|
||||
|
||||
for (int i = 0; i < this.crafting.getSizeInventory(); i++) {
|
||||
if (this.crafting.getStackInSlot(i) == null) break;
|
||||
if (items.isEmpty()) {
|
||||
this.crafting.setInventorySlotContents(i, fluids.get(i));
|
||||
} else {
|
||||
this.crafting.setInventorySlotContents(i, items.get(i));
|
||||
}
|
||||
}
|
||||
saveChanges();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveSettings() {
|
||||
this.writeToNBT();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGridNode getActionableNode() {
|
||||
return this.grid;
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,7 @@ public class ItemAndBlockHolder {
|
||||
.register();
|
||||
public static ItemBasicFluidStorageCell CELL16384K = new ItemBasicFluidStorageCell(CellType.Cell16384kPart, 16384)
|
||||
.register();
|
||||
public static ItemCreativeFluidStorageCell CREATIVE_CELL = new ItemCreativeFluidStorageCell().register();
|
||||
public static ItemBasicFluidStoragePart CELL_PART = new ItemBasicFluidStoragePart().register();
|
||||
|
||||
public static void loadSetting() {
|
||||
|
||||
@@ -91,6 +91,10 @@ public class RecipeLoader implements Runnable {
|
||||
GameRegistry.findItem("appliedenergistics2", "item.ItemMultiPart"),
|
||||
1,
|
||||
380);
|
||||
public static final ItemStack AE2_INTERFACE_TERMINAL = new ItemStack(
|
||||
GameRegistry.findItem("appliedenergistics2", "item.ItemMultiPart"),
|
||||
1,
|
||||
480);
|
||||
public static final ItemStack AE2_CRAFTING_CP_UNIT = new ItemStack(
|
||||
GameRegistry.findItem("appliedenergistics2", "tile.BlockCraftingUnit"),
|
||||
1,
|
||||
@@ -142,7 +146,7 @@ public class RecipeLoader implements Runnable {
|
||||
GameRegistry.addShapelessRecipe(INTERFACE.stack(), FLUID_INTERFACE.stack());
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_FLUID_TERM.stack(), AE2_WIRELESS_TERMINAL, BUCKET);
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_PATTERN_TERM.stack(), WIRELESS_FLUID_TERM, FLUID_TERMINAL);
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_INTERFACE_TERM.stack(), AE2_WIRELESS_TERMINAL, AE2_INTERFACE);
|
||||
GameRegistry.addShapelessRecipe(WIRELESS_INTERFACE_TERM.stack(), AE2_WIRELESS_TERMINAL, AE2_INTERFACE_TERMINAL);
|
||||
GameRegistry
|
||||
.addRecipe(new ShapedOreRecipe(CERTUS_QUARTZ_TANK.stack(), "GGG", "G G", "GGG", 'G', AE2_QUARTZ_GLASS));
|
||||
GameRegistry.addShapelessRecipe(FLUID_AUTO_FILLER.stack(), FLUID_TERMINAL, ENCODER);
|
||||
|
||||
@@ -4,10 +4,7 @@ import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.client.gui.GuiFluidCraftingWireless;
|
||||
import com.glodblock.github.client.gui.GuiFluidPatternTerminal;
|
||||
import com.glodblock.github.client.gui.GuiFluidPatternTerminalEx;
|
||||
import com.glodblock.github.client.gui.GuiFluidPatternWireless;
|
||||
import com.glodblock.github.client.gui.*;
|
||||
import com.glodblock.github.nei.recipes.FluidRecipe;
|
||||
|
||||
public class NEI_FC_Config implements IConfigureNEI {
|
||||
@@ -25,6 +22,10 @@ public class NEI_FC_Config implements IConfigureNEI {
|
||||
GuiFluidPatternWireless.class,
|
||||
FluidPatternTerminalRecipeTransferHandler.INSTANCE,
|
||||
identifier);
|
||||
API.registerGuiOverlayHandler(
|
||||
GuiFluidPatternExWireless.class,
|
||||
FluidPatternTerminalRecipeTransferHandler.INSTANCE,
|
||||
identifier);
|
||||
API.registerGuiOverlayHandler(
|
||||
GuiFluidPatternTerminal.class,
|
||||
FluidPatternTerminalRecipeTransferHandler.INSTANCE,
|
||||
|
||||
@@ -35,6 +35,7 @@ public class NameConst {
|
||||
public static final String ITEM_PART_FLUID_LEVEL_EMITTER = "part_fluid_level_emitter";
|
||||
public static final String ITEM_FLUID_PACKET = "fluid_packet";
|
||||
public static final String ITEM_FLUID_STORAGE = "fluid_storage";
|
||||
public static final String ITEM_CREATIVE_FLUID_STORAGE = "creative_" + ITEM_FLUID_STORAGE;
|
||||
public static final String ITEM_FLUID_PORTABLE_CELL = "portable_fluid_cell";
|
||||
public static final String ITEM_WIRELESS_FLUID_TERMINAL = "wireless_fluid_terminal";
|
||||
public static final String ITEM_WIRELESS_INTERFACE_TERMINAL = "wireless_interface_terminal";
|
||||
|
||||
@@ -19,7 +19,9 @@ item.wireless_ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL.name=Universal Wire
|
||||
item.wireless_ultra_terminal.WIRELESS_FLUID_TERMINAL.name=Universal Wireless Terminal - Fluid
|
||||
item.wireless_ultra_terminal.WIRELESS_ESSENTIA_TERMINAL.name=Universal Wireless Terminal - Essentia
|
||||
item.wireless_ultra_terminal.WIRELESS_INTERFACE_TERMINAL.name=Universal Wireless Terminal - Interface
|
||||
item.wireless_ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL_EX.name=Universal Wireless Terminal - Processing Pattern
|
||||
item.fluid_packet.name=Fluid Packet
|
||||
item.creative_fluid_storage.name=Creative ME Fluid Storage Cell
|
||||
item.fluid_storage.1.name=%s1k%s ME Fluid Storage Cell
|
||||
item.fluid_storage.4.name=%s4k%s ME Fluid Storage Cell
|
||||
item.fluid_storage.16.name=%s16k%s ME Fluid Storage Cell
|
||||
@@ -81,6 +83,7 @@ ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL=Mode: Pattern Termi
|
||||
ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_TERMINAL=Mode: Fluid Terminal
|
||||
ae2fc.tooltip.ultra_terminal.WIRELESS_ESSENTIA_TERMINAL=Mode: Essentia Terminal
|
||||
ae2fc.tooltip.ultra_terminal.WIRELESS_INTERFACE_TERMINAL=Mode: Interface Terminal
|
||||
ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL_EX=Mode: Processing Pattern Terminal
|
||||
ae2fc.tooltip.ultra_terminal=Right click + sneaking to switch mode.
|
||||
|
||||
ae2fc.tooltip.cell_contents=Contains Fluid:
|
||||
@@ -102,6 +105,7 @@ ae2fc.tooltip.craft_terminal_w=Crafting Terminal
|
||||
ae2fc.tooltip.pattern_terminal_w=Pattern Terminal
|
||||
ae2fc.tooltip.essentia_terminal_w=Essentia Terminal
|
||||
ae2fc.tooltip.interface_terminal_w=Interface Terminal
|
||||
ae2fc.tooltip.pattern_terminal_ex_w=Processing Pattern Terminal
|
||||
ae2fc.tooltip.wireless.installed=Installed Card:
|
||||
|
||||
ae2fc.tooltip.not_prio=Allow fluids to be placed first
|
||||
|
||||
@@ -19,7 +19,9 @@ item.wireless_ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL.name=无线ME通用
|
||||
item.wireless_ultra_terminal.WIRELESS_FLUID_TERMINAL.name=无线ME通用终端 - 流体
|
||||
item.wireless_ultra_terminal.WIRELESS_ESSENTIA_TERMINAL.name=无线ME通用终端 - 源质
|
||||
item.wireless_ultra_terminal.WIRELESS_INTERFACE_TERMINAL.name=无线ME通用终端 - 接口
|
||||
item.wireless_ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL_EX.name=无线ME通用终端 - 增广样板
|
||||
item.fluid_packet.name=流体封包
|
||||
item.creative_fluid_storage.name=创造ME流体存储元件
|
||||
item.fluid_storage.1.name=%s1k%s-ME流体存储元件
|
||||
item.fluid_storage.4.name=%s4k%s-ME流体存储元件
|
||||
item.fluid_storage.16.name=%s16k%s-ME流体存储元件
|
||||
@@ -81,6 +83,7 @@ ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL=模式: 样板
|
||||
ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_TERMINAL=模式: 流体
|
||||
ae2fc.tooltip.ultra_terminal.WIRELESS_ESSENTIA_TERMINAL=模式: 源质
|
||||
ae2fc.tooltip.ultra_terminal.WIRELESS_INTERFACE_TERMINAL=模式: 接口
|
||||
ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL_EX=模式: 增广样板
|
||||
ae2fc.tooltip.ultra_terminal=Shift右击切换模式。
|
||||
|
||||
ae2fc.tooltip.cell_contents=内含流体:
|
||||
@@ -102,6 +105,7 @@ ae2fc.tooltip.craft_terminal_w=合成终端
|
||||
ae2fc.tooltip.pattern_terminal_w=样板终端
|
||||
ae2fc.tooltip.essentia_terminal_w=源质终端
|
||||
ae2fc.tooltip.interface_terminal_w=接口终端
|
||||
ae2fc.tooltip.pattern_terminal_ex_w=增广样板终端
|
||||
ae2fc.tooltip.wireless.installed=已安装的卡:
|
||||
|
||||
ae2fc.tooltip.not_prio=优先放置流体
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 366 B |
Reference in new issue
Block a user