Updates BuildCraft to 7.0.9

Split dependency logic on the BuildCraft modules.
Config needs to be reset, if BuildCraft was disabled actively,
because now there are 3 BC modules to be taken account of

Conflicts:
	gradle.properties
	src/main/java/appeng/facade/FacadeContainer.java
	src/main/java/appeng/facade/FacadePart.java
	src/main/java/appeng/integration/abstraction/IBC.java
	src/main/java/appeng/integration/modules/BC.java
	src/main/java/appeng/integration/modules/BCHelpers/BCPipeHandler.java
	src/main/java/appeng/integration/modules/BCHelpers/BCPipeInventory.java
	src/main/java/appeng/items/tools/ToolNetworkTool.java
	src/main/java/appeng/items/tools/quartz/ToolQuartzWrench.java
	src/main/java/appeng/parts/CableBusStorage.java
	src/main/java/appeng/parts/layers/LayerIPipeConnection.java
	src/main/java/appeng/parts/misc/PartStorageBus.java
	src/main/java/appeng/parts/p2p/PartP2PItems.java
	src/main/java/appeng/util/inv/AdaptorBCPipe.java
	src/main/java/appeng/util/inv/WrapperBCPipe.java
This commit is contained in:
thatsIch
2015-06-08 01:41:35 +02:00
committed by thatsIch
parent 3b5b9b68ce
commit 97f23cf955
30 changed files with 1167 additions and 1408 deletions
+106 -92
View File
@@ -19,95 +19,109 @@
package appeng.util.inv;
//public class AdaptorBCPipe extends InventoryAdaptor
//{
//
// private final IBC bc;
// private final TileEntity i;
// private final ForgeDirection d;
//
// public AdaptorBCPipe( TileEntity s, ForgeDirection dd )
// {
// this.bc = (IBC) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BC );
// if( this.bc != null )
// {
// if( this.bc.isPipe( s, dd ) )
// {
// this.i = s;
// this.d = dd;
// return;
// }
// }
// this.i = null;
// this.d = null;
// }
//
// @Override
// public ItemStack removeItems( int amount, ItemStack filter, IInventoryDestination destination )
// {
// return null;
// }
//
// @Override
// public ItemStack simulateRemove( int amount, ItemStack filter, IInventoryDestination destination )
// {
// return null;
// }
//
// @Override
// public ItemStack removeSimilarItems( int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
// {
// return null;
// }
//
// @Override
// public ItemStack simulateSimilarRemove( int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
// {
// return null;
// }
//
// @Override
// public ItemStack addItems( ItemStack toBeAdded )
// {
// if( this.i == null )
// {
// return toBeAdded;
// }
// if( toBeAdded == null )
// {
// return null;
// }
// if( toBeAdded.stackSize == 0 )
// {
// return null;
// }
//
// if( this.bc.addItemsToPipe( this.i, toBeAdded, this.d ) )
// {
// return null;
// }
// return toBeAdded;
// }
//
// @Override
// public ItemStack simulateAdd( ItemStack toBeSimulated )
// {
// if( this.i == null )
// {
// return toBeSimulated;
// }
// return null;
// }
//
// @Override
// public boolean containsItems()
// {
// return false;
// }
//
// @Override
// public Iterator<ItemSlot> iterator()
// {
// return new NullIterator<ItemSlot>();
// }
//}
import java.util.Iterator;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.config.FuzzyMode;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.integration.abstraction.IBC;
import appeng.integration.abstraction.IBuildCraftTransport;
import appeng.util.InventoryAdaptor;
import appeng.util.iterators.NullIterator;
public class AdaptorBCPipe extends InventoryAdaptor
{
private final IBuildCraftTransport bc;
private final TileEntity i;
private final ForgeDirection d;
public AdaptorBCPipe( TileEntity s, ForgeDirection dd )
{
this.bc = (IBuildCraftTransport) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BC );
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) )
{
if( this.bc.isPipe( s, dd ) )
{
this.i = s;
this.d = dd;
return;
}
}
this.i = null;
this.d = null;
}
@Override
public ItemStack removeItems( int amount, ItemStack filter, IInventoryDestination destination )
{
return null;
}
@Override
public ItemStack simulateRemove( int amount, ItemStack filter, IInventoryDestination destination )
{
return null;
}
@Override
public ItemStack removeSimilarItems( int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
{
return null;
}
@Override
public ItemStack simulateSimilarRemove( int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
{
return null;
}
@Override
public ItemStack addItems( ItemStack toBeAdded )
{
if( this.i == null )
{
return toBeAdded;
}
if( toBeAdded == null )
{
return null;
}
if( toBeAdded.stackSize == 0 )
{
return null;
}
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) && this.bc.addItemsToPipe( this.i, toBeAdded, this.d ) )
{
return null;
}
return toBeAdded;
}
@Override
public ItemStack simulateAdd( ItemStack toBeSimulated )
{
if( this.i == null )
{
return toBeSimulated;
}
return null;
}
@Override
public boolean containsItems()
{
return false;
}
@Override
public Iterator<ItemSlot> iterator()
{
return new NullIterator<ItemSlot>();
}
}