mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-25 22:44:34 +00:00
Remove AE2 refs from (I)MEConduit
This commit is contained in:
1 parent
45981fd8d1
commit
5a08aa186f
5 files changed
+39
-39
No files matched your search
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.me.helpers.IGridProxyable;
|
||||
import mekanism.api.gas.IGasHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -22,7 +23,7 @@ import crazypants.enderio.power.IInternalPowerReceptor;
|
||||
import crazypants.util.BlockCoord;
|
||||
|
||||
@Interface(iface = "appeng.api.networking.IGridHost", modid = "appliedenergistics2")
|
||||
public interface IConduitBundle extends IInternalPowerReceptor, IFluidHandler, IItemDuct, IGasHandler, IGridHost {
|
||||
public interface IConduitBundle extends IInternalPowerReceptor, IFluidHandler, IItemDuct, IGasHandler, IGridProxyable {
|
||||
|
||||
TileEntity getEntity();
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.me.helpers.AENetworkProxy;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -843,12 +845,14 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
|
||||
|
||||
/* AE2 */
|
||||
|
||||
private Object node; // IGridNode object, untyped to avoid crash w/o AE2
|
||||
|
||||
@Override
|
||||
@Method(modid = "appliedenergistics2")
|
||||
public IGridNode getGridNode(ForgeDirection dir) {
|
||||
IMEConduit cond = getConduit(IMEConduit.class);
|
||||
if (cond != null) {
|
||||
return cond.getGridNode(dir);
|
||||
return (IGridNode) node;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -864,4 +868,26 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
|
||||
public void securityBreak() {
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "appliedenergistics2")
|
||||
public DimensionalCoord getLocation() {
|
||||
return new DimensionalCoord(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "appliedenergistics2")
|
||||
public AENetworkProxy getProxy() {
|
||||
IMEConduit cond = getConduit(IMEConduit.class);
|
||||
if (cond != null) {
|
||||
return cond.getGrid().getProxy();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Method(modid = "appliedenergistics2")
|
||||
public void gridChanged() {
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package crazypants.enderio.conduit.me;
|
||||
|
||||
import appeng.me.helpers.IGridProxyable;
|
||||
import crazypants.enderio.conduit.IConduit;
|
||||
|
||||
public interface IMEConduit extends IConduit, IGridProxyable {
|
||||
public interface IMEConduit extends IConduit {
|
||||
|
||||
MEConduitGrid getGrid();
|
||||
|
||||
}
|
||||
@@ -10,8 +10,6 @@ import appeng.api.AEApi;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.me.helpers.AENetworkProxy;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.conduit.AbstractConduit;
|
||||
import crazypants.enderio.conduit.AbstractConduitNetwork;
|
||||
@@ -25,7 +23,6 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
|
||||
private IGridNode node;
|
||||
|
||||
protected MEConduitNetwork network;
|
||||
|
||||
protected MEConduitGrid grid;
|
||||
|
||||
private static IIcon coreTexture;
|
||||
@@ -105,36 +102,6 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGridNode getGridNode(ForgeDirection dir) {
|
||||
return node;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void securityBreak() {
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AECableType getCableConnectionType(ForgeDirection dir) {
|
||||
return AECableType.GLASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AENetworkProxy getProxy() {
|
||||
return grid.getProxy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DimensionalCoord getLocation() {
|
||||
return new DimensionalCoord(getBundle().getEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gridChanged() {
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity(World worldObj) {
|
||||
if(node == null && !worldObj.isRemote) {
|
||||
@@ -150,4 +117,9 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
|
||||
node.destroy();
|
||||
node = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MEConduitGrid getGrid() {
|
||||
return grid;
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class MEConduitGrid implements IGridBlock {
|
||||
|
||||
public MEConduitGrid(IMEConduit conduit) {
|
||||
this.conduit = conduit;
|
||||
proxy = new AENetworkProxy(conduit, "enderio:MEConduit", conduit.createItem(), true);
|
||||
proxy = new AENetworkProxy(conduit.getBundle(), "enderio:MEConduit", conduit.createItem(), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -68,7 +68,7 @@ public class MEConduitGrid implements IGridBlock {
|
||||
|
||||
@Override
|
||||
public IGridHost getMachine() {
|
||||
return conduit;
|
||||
return conduit.getBundle();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user