Update common/buildcraft/transport/PipeTransportItems.java
This commit is contained in:
parent
e7bd894e15
commit
07cca7ad05
1 changed files with 10 additions and 6 deletions
|
@ -41,6 +41,7 @@ import net.minecraft.src.NBTTagCompound;
|
||||||
import net.minecraft.src.NBTTagList;
|
import net.minecraft.src.NBTTagList;
|
||||||
import net.minecraft.src.Packet;
|
import net.minecraft.src.Packet;
|
||||||
import net.minecraft.src.TileEntity;
|
import net.minecraft.src.TileEntity;
|
||||||
|
import net.minecraftforge.common.ISidedInventory;
|
||||||
|
|
||||||
public class PipeTransportItems extends PipeTransport {
|
public class PipeTransportItems extends PipeTransport {
|
||||||
|
|
||||||
|
@ -145,13 +146,12 @@ public class PipeTransportItems extends PipeTransport {
|
||||||
if (!Utils.checkPipesConnections(entity, container))
|
if (!Utils.checkPipesConnections(entity, container))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (entity instanceof TileGenericPipe)
|
||||||
|
if (container.pipe.transport instanceof PipeTransportItems)
|
||||||
|
return container.pipe.transport.inputOpen(o);
|
||||||
if (entity instanceof IPipeEntry)
|
if (entity instanceof IPipeEntry)
|
||||||
return true;
|
return ((IPipeEntry) entity).acceptItems();
|
||||||
else if (entity instanceof TileGenericPipe) {
|
if (entity instanceof IInventory)
|
||||||
TileGenericPipe pipe = (TileGenericPipe) entity;
|
|
||||||
|
|
||||||
return pipe.pipe.transport instanceof PipeTransportItems;
|
|
||||||
} else if (entity instanceof IInventory)
|
|
||||||
if(Transactor.getTransactorFor(entity).add(item.getItemStack(), o.reverse(), false).stackSize > 0)
|
if(Transactor.getTransactorFor(entity).add(item.getItemStack(), o.reverse(), false).stackSize > 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -437,6 +437,10 @@ public class PipeTransportItems extends PipeTransport {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPipeConnected(TileEntity tile) {
|
public boolean isPipeConnected(TileEntity tile) {
|
||||||
|
if( tile instanceof ISidedInventory ){
|
||||||
|
Orientations or = Utils.get3dOrientation(new Position(container), new Position(tile));
|
||||||
|
return ((ISidedInventory) tile).getSizeInventorySide(or.toDirection()) > 0;
|
||||||
|
}
|
||||||
return tile instanceof TileGenericPipe
|
return tile instanceof TileGenericPipe
|
||||||
|| tile instanceof IPipeEntry
|
|| tile instanceof IPipeEntry
|
||||||
|| tile instanceof ISpecialInventory
|
|| tile instanceof ISpecialInventory
|
||||||
|
|
Loading…
Reference in a new issue