mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
portable cell recipe
This commit is contained in:
1 parent
80340dbd75
commit
d238a82451
3 files changed
+26
-7
No files matched your search
@@ -6,6 +6,7 @@ import appeng.api.util.IConfigManager;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.implementations.ContainerInterface;
|
||||
import appeng.helpers.IInterfaceHost;
|
||||
import com.glodblock.github.common.tile.TileFluidInterface;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
public class ContainerDualInterface extends ContainerInterface {
|
||||
@@ -13,9 +14,12 @@ public class ContainerDualInterface extends ContainerInterface {
|
||||
@GuiSync(10)
|
||||
public SidelessMode sidelessMode;
|
||||
|
||||
private final boolean isTile;
|
||||
|
||||
public ContainerDualInterface(InventoryPlayer ip, IInterfaceHost te) {
|
||||
super(ip, te);
|
||||
this.sidelessMode = SidelessMode.SIDELESS;
|
||||
this.isTile = te instanceof TileFluidInterface;
|
||||
}
|
||||
|
||||
public SidelessMode getSidelessMode() {
|
||||
@@ -25,6 +29,6 @@ public class ContainerDualInterface extends ContainerInterface {
|
||||
@Override
|
||||
protected void loadSettingsFromHost(IConfigManager cm) {
|
||||
super.loadSettingsFromHost(cm);
|
||||
this.sidelessMode = (SidelessMode) cm.getSetting(Settings.SIDELESS_MODE);
|
||||
this.sidelessMode = this.isTile ? (SidelessMode) cm.getSetting(Settings.SIDELESS_MODE) : SidelessMode.SIDELESS;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import appeng.api.storage.ITerminalHost;
|
||||
import appeng.container.implementations.ContainerCraftAmount;
|
||||
import appeng.container.implementations.ContainerCraftingStatus;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.helpers.IInterfaceHost;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import com.glodblock.github.client.gui.*;
|
||||
import com.glodblock.github.client.gui.container.*;
|
||||
@@ -12,6 +13,7 @@ import com.glodblock.github.common.parts.PartFluidStorageBus;
|
||||
import com.glodblock.github.common.parts.base.FCPart;
|
||||
import com.glodblock.github.common.parts.base.FCSharedFluidBus;
|
||||
import com.glodblock.github.common.tile.*;
|
||||
import com.glodblock.github.inventory.IDualHost;
|
||||
import com.glodblock.github.inventory.item.IFluidPortableCell;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import java.util.List;
|
||||
@@ -55,26 +57,26 @@ public enum GuiType {
|
||||
}
|
||||
}),
|
||||
|
||||
DUAL_INTERFACE(new TileOrPartGuiFactory<TileFluidInterface>(TileFluidInterface.class) {
|
||||
DUAL_INTERFACE(new TileOrPartGuiFactory<IInterfaceHost>(IInterfaceHost.class) {
|
||||
@Override
|
||||
protected Object createServerGui(EntityPlayer player, TileFluidInterface inv) {
|
||||
protected Object createServerGui(EntityPlayer player, IInterfaceHost inv) {
|
||||
return new ContainerDualInterface(player.inventory, inv);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object createClientGui(EntityPlayer player, TileFluidInterface inv) {
|
||||
protected Object createClientGui(EntityPlayer player, IInterfaceHost inv) {
|
||||
return new GuiDualInterface(player.inventory, inv);
|
||||
}
|
||||
}),
|
||||
|
||||
DUAL_INTERFACE_FLUID(new TileOrPartGuiFactory<TileFluidInterface>(TileFluidInterface.class) {
|
||||
DUAL_INTERFACE_FLUID(new TileOrPartGuiFactory<IDualHost>(IDualHost.class) {
|
||||
@Override
|
||||
protected Object createServerGui(EntityPlayer player, TileFluidInterface inv) {
|
||||
protected Object createServerGui(EntityPlayer player, IDualHost inv) {
|
||||
return new ContainerFluidInterface(player.inventory, inv);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object createClientGui(EntityPlayer player, TileFluidInterface inv) {
|
||||
protected Object createClientGui(EntityPlayer player, IDualHost inv) {
|
||||
return new GuiFluidInterface(player.inventory, inv);
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -61,11 +61,24 @@ public class RecipeLoader implements Runnable {
|
||||
new ItemStack(GameRegistry.findItem("appliedenergistics2", "tile.BlockCraftingUnit"), 1, 1);
|
||||
public static final ItemStack AE2_PATTERN_CAPACITY_CARD =
|
||||
new ItemStack(GameRegistry.findItem("appliedenergistics2", "item.ItemMultiMaterial"), 1, 54);
|
||||
public static final ItemStack AE2_ME_CHEST =
|
||||
GameRegistry.findItemStack("appliedenergistics2", "tile.BlockChest", 1);
|
||||
public static final ItemStack AE2_ENERGY_CELL =
|
||||
GameRegistry.findItemStack("appliedenergistics2", "tile.BlockEnergyCell", 1);
|
||||
public static final ItemStack BUCKET = new ItemStack(Items.bucket, 1);
|
||||
public static final ItemStack IRON_BAR = new ItemStack(Blocks.iron_bars, 1);
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(
|
||||
PORTABLE_FLUID_CELL.stack(),
|
||||
"ABC",
|
||||
'A',
|
||||
AE2_ME_CHEST,
|
||||
'B',
|
||||
CellType.Cell1kPart.stack(1),
|
||||
'C',
|
||||
AE2_ENERGY_CELL));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(
|
||||
INTERFACE.stack(),
|
||||
"IPI",
|
||||
|
||||
Reference in new issue
Block a user