First iteration of making integrations typesafe
This commit is contained in:
@@ -19,7 +19,28 @@
|
||||
package appeng.parts.p2p;
|
||||
|
||||
|
||||
//@InterfaceList( value = { @Interface( iface = "ic2.api.energy.tile.IEnergySink", iname = "IC2" ), @Interface( iface = "ic2.api.energy.tile.IEnergySource", iname = "IC2" ) } )
|
||||
//import java.util.LinkedList;
|
||||
//
|
||||
//import net.minecraft.init.Blocks;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.nbt.NBTTagCompound;
|
||||
//import net.minecraft.tileentity.TileEntity;
|
||||
//import net.minecraft.util.IIcon;
|
||||
//import net.minecraftforge.common.util.ForgeDirection;
|
||||
//
|
||||
//import cpw.mods.fml.relauncher.Side;
|
||||
//import cpw.mods.fml.relauncher.SideOnly;
|
||||
//
|
||||
//import appeng.api.config.PowerUnits;
|
||||
//import appeng.integration.IntegrationType;
|
||||
//import appeng.me.GridAccessException;
|
||||
//import appeng.me.cache.helpers.TunnelCollection;
|
||||
//import appeng.transformer.annotations.Integration.Interface;
|
||||
//import appeng.transformer.annotations.Integration.InterfaceList;
|
||||
//import appeng.util.Platform;
|
||||
//
|
||||
//
|
||||
//@InterfaceList( value = { @Interface( iface = "ic2.api.energy.tile.IEnergySink", iname = IntegrationType.IC2 ), @Interface( iface = "ic2.api.energy.tile.IEnergySource", iname = IntegrationType.IC2 ) } )
|
||||
//public class PartP2PIC2Power extends PartP2PTunnel<PartP2PIC2Power> implements ic2.api.energy.tile.IEnergySink, ic2.api.energy.tile.IEnergySource
|
||||
//{
|
||||
//
|
||||
@@ -37,7 +58,7 @@ package appeng.parts.p2p;
|
||||
//
|
||||
// @Override
|
||||
// @SideOnly( Side.CLIENT )
|
||||
// public TextureAtlasSprite getTypeTexture()
|
||||
// public IIcon getTypeTexture()
|
||||
// {
|
||||
// return Blocks.diamond_block.getBlockTextureFromSide( 0 );
|
||||
// }
|
||||
|
||||
@@ -52,9 +52,9 @@ import appeng.util.inv.WrapperChainedInventory;
|
||||
import appeng.util.inv.WrapperMCISidedInventory;
|
||||
|
||||
|
||||
// TODO: BC Integration
|
||||
//@Integration.Interface( iface = "buildcraft.api.transport.IPipeConnection", iname = "BuildCraftTransport" )
|
||||
public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements ISidedInventory, IGridTickable
|
||||
// TODO: BC Integration
|
||||
//@Interface( iface = "buildcraft.api.transport.IPipeConnection", iname = IntegrationType.BuildCraftTransport )
|
||||
public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements /*IPipeConnection,*/ ISidedInventory, IGridTickable
|
||||
{
|
||||
|
||||
final LinkedList<IInventory> which = new LinkedList<IInventory>();
|
||||
@@ -370,12 +370,18 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements ISidedI
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getField(
|
||||
int id )
|
||||
public int getField( int id )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// @Method( iname = IntegrationType.BuildCraftTransport )
|
||||
// public ConnectOverride overridePipeConnection( PipeType type, ForgeDirection with )
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void setField(
|
||||
int id,
|
||||
|
||||
@@ -54,7 +54,7 @@ package appeng.parts.p2p;
|
||||
//import appeng.util.IWorldCallable;
|
||||
//
|
||||
//
|
||||
//@InterfaceList( value = { @Interface( iface = "li.cil.oc.api.network.Environment", iname = "OpenComputers" ), @Interface( iface = "li.cil.oc.api.network.SidedEnvironment", iname = "OpenComputers" ) } )
|
||||
//@InterfaceList( value = { @Interface( iface = "li.cil.oc.api.network.Environment", iname = IntegrationType.OpenComputers ), @Interface( iface = "li.cil.oc.api.network.SidedEnvironment", iname = IntegrationType.OpenComputers ) } )
|
||||
//public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenComputers> implements IGridTickable, Environment, SidedEnvironment
|
||||
//{
|
||||
// @Nullable
|
||||
|
||||
@@ -38,11 +38,12 @@ package appeng.parts.p2p;
|
||||
//import appeng.api.networking.ticking.TickRateModulation;
|
||||
//import appeng.api.networking.ticking.TickingRequest;
|
||||
//import appeng.core.settings.TickRates;
|
||||
//import appeng.integration.IntegrationType;
|
||||
//import appeng.transformer.annotations.Integration.Interface;
|
||||
//import appeng.util.Platform;
|
||||
//
|
||||
//
|
||||
//@Interface( iface = "pneumaticCraft.api.tileentity.ISidedPneumaticMachine", iname = "PneumaticCraft" )
|
||||
//@Interface( iface = "pneumaticCraft.api.tileentity.ISidedPneumaticMachine", iname = IntegrationType.PneumaticCraft )
|
||||
//public final class PartP2PPressure extends PartP2PTunnel<PartP2PPressure> implements ISidedPneumaticMachine, IGridTickable
|
||||
//{
|
||||
// private static final String PRESSURE_NBT_TAG = "pneumaticCraft";
|
||||
|
||||
@@ -19,7 +19,29 @@
|
||||
package appeng.parts.p2p;
|
||||
|
||||
|
||||
//@InterfaceList( value = { @Interface( iface = "cofh.api.energy.IEnergyReceiver", iname = "RF" ) } )
|
||||
//import java.util.Stack;
|
||||
//
|
||||
//import net.minecraft.init.Blocks;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.tileentity.TileEntity;
|
||||
//import net.minecraft.util.IIcon;
|
||||
//import net.minecraftforge.common.util.ForgeDirection;
|
||||
//
|
||||
//import cpw.mods.fml.relauncher.Side;
|
||||
//import cpw.mods.fml.relauncher.SideOnly;
|
||||
//
|
||||
//import cofh.api.energy.IEnergyReceiver;
|
||||
//
|
||||
//import appeng.api.config.PowerUnits;
|
||||
//import appeng.integration.IntegrationType;
|
||||
//import appeng.integration.modules.helpers.NullRFHandler;
|
||||
//import appeng.me.GridAccessException;
|
||||
//import appeng.transformer.annotations.Integration.Interface;
|
||||
//import appeng.transformer.annotations.Integration.InterfaceList;
|
||||
//import appeng.util.Platform;
|
||||
//
|
||||
//
|
||||
//@InterfaceList( value = { @Interface( iface = "cofh.api.energy.IEnergyReceiver", iname = IntegrationType.RF ) } )
|
||||
//public final class PartP2PRFPower extends PartP2PTunnel<PartP2PRFPower> implements IEnergyReceiver
|
||||
//{
|
||||
// private static final ThreadLocal<Stack<PartP2PRFPower>> THREAD_STACK = new ThreadLocal<Stack<PartP2PRFPower>>();
|
||||
@@ -37,7 +59,7 @@ package appeng.parts.p2p;
|
||||
//
|
||||
// @Override
|
||||
// @SideOnly( Side.CLIENT )
|
||||
// public TextureAtlasSprite getTypeTexture()
|
||||
// public IIcon getTypeTexture()
|
||||
// {
|
||||
// return Blocks.iron_block.getBlockTextureFromSide( 0 );
|
||||
// }
|
||||
@@ -148,7 +170,7 @@ package appeng.parts.p2p;
|
||||
// if( !this.cachedTarget )
|
||||
// {
|
||||
// TileEntity self = this.getTile();
|
||||
// TileEntity te = self.getWorld().getTileEntity( self.xCoord + this.side.offsetX, self.yCoord + this.side.offsetY, self.zCoord + this.side.offsetZ );
|
||||
// TileEntity te = self.getWorldObj().getTileEntity( self.xCoord + this.side.offsetX, self.yCoord + this.side.offsetY, self.zCoord + this.side.offsetZ );
|
||||
// this.outputTarget = te instanceof IEnergyReceiver ? (IEnergyReceiver) te : null;
|
||||
// this.cachedTarget = true;
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user