Removed TE p2p wrapper.
This commit is contained in:
parent
496a67abb9
commit
2d61ca3fd0
4 changed files with 28 additions and 24 deletions
|
@ -13,4 +13,6 @@ public interface ITE
|
|||
|
||||
boolean isPipe(TileEntity te, ForgeDirection opposite);
|
||||
|
||||
ItemStack addItemsToPipe(TileEntity ad, ItemStack itemstack, ForgeDirection dir);
|
||||
|
||||
}
|
||||
|
|
|
@ -6,8 +6,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.abstraction.ITE;
|
||||
import cofh.api.transport.IItemConduit;
|
||||
|
||||
public class TE implements IIntegrationModule
|
||||
public class TE implements IIntegrationModule, ITE
|
||||
{
|
||||
|
||||
public static TE instance;
|
||||
|
@ -39,16 +41,30 @@ public class TE implements IIntegrationModule
|
|||
thermalexpansion.api.crafting.CraftingManagers.pulverizerManager.addRecipe( 320, in, out );
|
||||
}
|
||||
|
||||
public void addItemsToPipe(TileEntity ad, ItemStack itemstack, ForgeDirection dir)
|
||||
@Override
|
||||
public ItemStack addItemsToPipe(TileEntity ad, ItemStack itemstack, ForgeDirection dir)
|
||||
{
|
||||
return ((IItemConduit) ad).insertItem( dir, itemstack );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPulverizerRecipe(int i, ItemStack blkQuartz, ItemStack blockDust)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public boolean canAddItemsToPipe(TileEntity ad, ItemStack itemstack, ForgeDirection dir)
|
||||
@Override
|
||||
public void addPulverizerRecipe(int i, ItemStack blkQuartzOre, ItemStack matQuartz, ItemStack matQuartzDust)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPipe(TileEntity te, ForgeDirection opposite)
|
||||
{
|
||||
return te instanceof IItemConduit;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ import appeng.api.networking.events.MENetworkEventSubscribe;
|
|||
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.integration.abstraction.IBC;
|
||||
import appeng.integration.abstraction.ITE;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.me.cache.helpers.TunnelCollection;
|
||||
import appeng.tile.inventory.AppEngNullInventory;
|
||||
|
@ -27,7 +26,6 @@ import appeng.util.Platform;
|
|||
import appeng.util.inv.WrapperBCPipe;
|
||||
import appeng.util.inv.WrapperChainedInventory;
|
||||
import appeng.util.inv.WrapperMCISidedInventory;
|
||||
import appeng.util.inv.WrapperTEPipe;
|
||||
import buildcraft.api.transport.IPipeConnection;
|
||||
import buildcraft.api.transport.IPipeTile.PipeType;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
|
@ -83,23 +81,11 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeCo
|
|||
}
|
||||
}
|
||||
|
||||
if ( AppEng.instance.isIntegrationEnabled( "TE" ) )
|
||||
{
|
||||
ITE thermal = (ITE) AppEng.instance.getIntegration( "TE" );
|
||||
if ( thermal != null )
|
||||
{
|
||||
if ( thermal.isPipe( te, side.getOpposite() ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
output = new WrapperTEPipe( te, side.getOpposite() );
|
||||
}
|
||||
catch (Throwable _)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* if ( AppEng.instance.isIntegrationEnabled( "TE" ) ) { ITE thermal = (ITE) AppEng.instance.getIntegration(
|
||||
* "TE" ); if ( thermal != null ) { if ( thermal.isPipe( te, side.getOpposite() ) ) { try { output = new
|
||||
* WrapperTEPipe( te, side.getOpposite() ); } catch (Throwable _) { } } } }
|
||||
*/
|
||||
|
||||
if ( output == null )
|
||||
{
|
||||
|
|
|
@ -93,7 +93,7 @@ public class WrapperTEPipe implements IInventory
|
|||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
return TE.instance.canAddItemsToPipe( ad, itemstack, dir );
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue