2013-11-15 03:58:32 +01:00
|
|
|
package cofh.api.transport;
|
|
|
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraftforge.common.ForgeDirection;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This interface is implemented on Item Conduits. Use it to attempt to eject items into an entry point.
|
|
|
|
*
|
2014-01-03 20:26:41 +01:00
|
|
|
* @author Zeldo Kavira, King Lemming
|
2013-11-15 03:58:32 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
public interface IItemConduit {
|
|
|
|
|
|
|
|
/**
|
2014-01-03 20:26:41 +01:00
|
|
|
* Insert an ItemStack into the IItemConduit. Will only accept items if there is a valid destination. This returns what is remaining of the original stack -
|
|
|
|
* a null return means that the entire stack was accepted/routed!
|
2013-11-30 07:02:44 +01:00
|
|
|
*
|
2014-01-03 20:26:41 +01:00
|
|
|
* @param from
|
|
|
|
* Orientation the item is inserted from.
|
|
|
|
* @param item
|
|
|
|
* ItemStack to be inserted. The size of this stack corresponds to the maximum amount to insert.
|
|
|
|
* @return An ItemStack representing how much is remaining after the item was inserted (or would have been, if simulated) into the Conduit.
|
2013-11-15 03:58:32 +01:00
|
|
|
*/
|
2014-01-03 20:26:41 +01:00
|
|
|
public ItemStack insertItem(ForgeDirection from, ItemStack item);
|
|
|
|
|
|
|
|
/* THE FOLLOWING WILL BE REMOVED IN 3.0.1.X */
|
|
|
|
@Deprecated
|
|
|
|
public ItemStack insertItem(ForgeDirection from, ItemStack item, boolean simulate);
|
2013-11-15 03:58:32 +01:00
|
|
|
|
2014-01-03 20:26:41 +01:00
|
|
|
@Deprecated
|
|
|
|
public ItemStack sendItems(ItemStack item, ForgeDirection from);
|
2013-11-15 03:58:32 +01:00
|
|
|
}
|