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:
@@ -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>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,95 +19,108 @@
|
||||
package appeng.util.inv;
|
||||
|
||||
|
||||
//public class WrapperBCPipe implements IInventory
|
||||
//{
|
||||
//
|
||||
// private final IBC bc;
|
||||
// private final TileEntity ad;
|
||||
// private final ForgeDirection dir;
|
||||
//
|
||||
// public WrapperBCPipe( TileEntity te, ForgeDirection d )
|
||||
// {
|
||||
// this.bc = (IBC) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BC );
|
||||
// this.ad = te;
|
||||
// this.dir = d;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getSizeInventory()
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ItemStack getStackInSlot( int i )
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ItemStack decrStackSize( int i, int j )
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ItemStack getStackInSlotOnClosing( int i )
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void setInventorySlotContents( int i, ItemStack itemstack )
|
||||
// {
|
||||
// this.bc.addItemsToPipe( this.ad, itemstack, this.dir );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getInventoryName()
|
||||
// {
|
||||
// return "BC Pipe Wrapper";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean hasCustomInventoryName()
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getInventoryStackLimit()
|
||||
// {
|
||||
// return 64;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void markDirty()
|
||||
// {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isUseableByPlayer( EntityPlayer entityplayer )
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void openInventory()
|
||||
// {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void closeInventory()
|
||||
// {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isItemValidForSlot( int i, ItemStack itemstack )
|
||||
// {
|
||||
// return this.bc.canAddItemsToPipe( this.ad, itemstack, this.dir );
|
||||
// }
|
||||
//}
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.IBuildCraftTransport;
|
||||
|
||||
|
||||
public class WrapperBCPipe implements IInventory
|
||||
{
|
||||
private final IBuildCraftTransport bc;
|
||||
private final TileEntity ad;
|
||||
private final ForgeDirection dir;
|
||||
|
||||
public WrapperBCPipe( TileEntity te, ForgeDirection d )
|
||||
{
|
||||
this.bc = (IBuildCraftTransport) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BuildCraftTransport );
|
||||
this.ad = te;
|
||||
this.dir = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot( int i )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize( int i, int j )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing( int i )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents( int i, ItemStack itemstack )
|
||||
{
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) )
|
||||
{
|
||||
this.bc.addItemsToPipe( this.ad, itemstack, this.dir );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
{
|
||||
return "BC Pipe Wrapper";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit()
|
||||
{
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer( EntityPlayer entityplayer )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot( int i, ItemStack itemstack )
|
||||
{
|
||||
return this.bc.canAddItemsToPipe( this.ad, itemstack, this.dir );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user