This commit is contained in:
GlodBlock committed 2023-02-05 01:03:59 +08:00
1 parent f22bebbf21
commit c1b2400549
23 files changed
+252 -105

No files matched your search

@@ -313,15 +313,28 @@ public enum GuiType {
}
}),
FLUID_CRAFTING_AMOUNT(new PartGuiFactory<FCPart>(FCPart.class) {
FLUID_CRAFTING_CONFIRM_ITEM(new ItemGuiFactory<IWirelessTerminal>(IWirelessTerminal.class) {
@Override
protected Object createServerGui(EntityPlayer player, FCPart inv) {
protected Object createServerGui(EntityPlayer player, IWirelessTerminal inv) {
return new ContainerFluidCraftConfirm(player.inventory, inv);
}
@Override
protected Object createClientGui(EntityPlayer player, IWirelessTerminal inv) {
return new GuiFluidCraftConfirm(player.inventory, inv);
}
}),
FLUID_CRAFTING_AMOUNT(new PartOrItemGuiFactory<ITerminalHost>(ITerminalHost.class) {
@Override
protected Object createServerGui(EntityPlayer player, ITerminalHost inv) {
return new ContainerCraftAmount(player.inventory, inv);
}
@Override
protected Object createClientGui(EntityPlayer player, FCPart inv) {
protected Object createClientGui(EntityPlayer player, ITerminalHost inv) {
return new GuiFluidCraftAmount(player.inventory, inv);
}
}),
@@ -339,15 +352,15 @@ public enum GuiType {
}
}),
PATTERN_VALUE_SET(new PartGuiFactory<FCPart>(FCPart.class) {
PATTERN_VALUE_SET(new PartOrItemGuiFactory<ITerminalHost>(ITerminalHost.class) {
@Override
protected Object createServerGui(EntityPlayer player, FCPart inv) {
protected Object createServerGui(EntityPlayer player, ITerminalHost inv) {
return new ContainerPatternValueAmount(player.inventory, inv);
}
@Override
protected Object createClientGui(EntityPlayer player, FCPart inv) {
protected Object createClientGui(EntityPlayer player, ITerminalHost inv) {
return new GuiPatternValueAmount(player.inventory, inv);
}
});
@@ -1,9 +1,21 @@
package com.glodblock.github.inventory.item;
import appeng.api.implementations.guiobjects.IGuiItemObject;
import appeng.api.implementations.tiles.IViewCellStorage;
import appeng.api.networking.IGridHost;
import appeng.api.networking.security.IActionHost;
import appeng.tile.inventory.IAEAppEngInventory;
import com.glodblock.github.common.item.ItemWirelessUltraTerminal;
import net.minecraft.item.ItemStack;
public interface IWirelessTerminal extends IFluidPortableCell, IViewCellStorage, IAEAppEngInventory, IGridHost {
public interface IWirelessTerminal extends IFluidPortableCell, IViewCellStorage, IAEAppEngInventory, IGridHost, IActionHost {
default boolean isUniversal(Object holder) {
if (holder instanceof IGuiItemObject) {
ItemStack stack = ((IGuiItemObject) holder).getItemStack();
return stack != null && stack.getItem() instanceof ItemWirelessUltraTerminal;
}
return false;
}
}
@@ -54,8 +54,8 @@ public class WirelessCraftingTerminalInventory extends MEMonitorHandler<IAEItemS
this.inventorySlot = slot;
this.viewCell = new WirelessTerminalViewCells(is);
this.channel = StorageChannel.ITEMS;
this.crafting = new ItemBiggerAppEngInventory(is, "crafting", 9);
this.output = new ItemBiggerAppEngInventory(is, "output", 3);
this.crafting = new ItemBiggerAppEngInventory(is, "crafting_c", 9);
this.output = new ItemBiggerAppEngInventory(is, "output_c", 3);
}
public StorageChannel getChannel() {
@@ -148,4 +148,8 @@ public class WirelessCraftingTerminalInventory extends MEMonitorHandler<IAEItemS
return null;
}
@Override
public IGridNode getActionableNode() {
return this.grid;
}
}
@@ -121,6 +121,11 @@ public class WirelessFluidTerminalInventory extends MEMonitorHandler<IAEFluidSta
}
@Override
public IGridNode getActionableNode() {
return this.grid;
}
@Override
public void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removedStack,
ItemStack newStack) {}
@@ -311,4 +311,9 @@ public class WirelessPatternTerminalInventory extends MEMonitorHandler<IAEItemSt
this.writeToNBT();
}
@Override
public IGridNode getActionableNode() {
return this.grid;
}
}