Skip to content

Commit

Permalink
impl the interface terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
GlodBlock committed May 19, 2022
1 parent ef90465 commit c45419a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.glodblock.github.coremod;

import com.glodblock.github.coremod.transform.ContainerInterfaceTerminalTransformer;
import com.glodblock.github.coremod.transform.CraftingCpuTransformer;
import com.glodblock.github.coremod.transform.CraftingTreeNodeTransformer;
import com.glodblock.github.coremod.transform.DualityInterfaceTransformer;
Expand All @@ -23,9 +24,9 @@ public byte[] transform(String name, String transformedName, byte[] code) {
case "appeng.helpers.DualityInterface":
tform = DualityInterfaceTransformer.INSTANCE;
break;
/*case "appeng.container.implementations.ContainerInterfaceTerminal":
case "appeng.container.implementations.ContainerInterfaceTerminal":
tform = ContainerInterfaceTerminalTransformer.INSTANCE;
break;*/ //To-Do
break;
default:
return code;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package com.glodblock.github.coremod.hooker;

import appeng.api.networking.IGrid;
import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
import appeng.api.networking.IMachineSet;
import appeng.api.storage.data.IAEItemStack;
import appeng.me.MachineSet;
import appeng.parts.misc.PartInterface;
import appeng.tile.misc.TileInterface;
import appeng.util.InventoryAdaptor;
import com.glodblock.github.common.item.ItemFluidDrop;
import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.common.parts.PartFluidInterface;
import com.glodblock.github.common.tile.TileFluidInterface;
import com.glodblock.github.inventory.FluidConvertingInventoryAdaptor;
import com.glodblock.github.inventory.FluidConvertingInventoryCrafting;
import com.glodblock.github.loader.ItemAndBlockHolder;
Expand Down Expand Up @@ -58,15 +63,15 @@ public static IAEItemStack[] flattenFluidPackets(IAEItemStack[] stacks) {
return stacks;
}

/*public static IMachineSet getMachines(IGrid grid, Class<? extends IGridHost> c) {
public static IMachineSet getMachines(IGrid grid, Class<? extends IGridHost> c) {
if (c == TileInterface.class) {
return unionMachineSets(grid.getMachines(c), grid.getMachines(TileDualInterface.class));
return unionMachineSets(grid.getMachines(c), grid.getMachines(TileFluidInterface.class));
} else if (c == PartInterface.class) {
return unionMachineSets(grid.getMachines(c), grid.getMachines(PartDualInterface.class));
return unionMachineSets(grid.getMachines(c), grid.getMachines(PartFluidInterface.class));
} else {
return grid.getMachines(c);
}
}*/ //unfinished
}

private static IMachineSet unionMachineSets(IMachineSet a, IMachineSet b) {
if (a.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ public ItemStack writeToStack() {
NBTTagCompound tag = new NBTTagCompound();
tag.setTag("Inputs", writeStackArray(checkInitialized(inputs)));
tag.setTag("Outputs", writeStackArray(checkInitialized(outputs)));
//Shits
tag.setTag("in", writeStackArray(checkInitialized(inputs)));
tag.setTag("out", writeStackArray(checkInitialized(outputs)));
patternStack.setTagCompound(tag);
patternStackAe = Objects.requireNonNull(AEItemStack.create(patternStack));
return patternStack;
Expand Down

0 comments on commit c45419a

Please sign in to comment.