mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
Added API for EnderAttuned
This commit is contained in:
parent
18eb77080d
commit
22d9b74622
50
src/api/java/cofh/api/transport/IEnderAttuned.java
Normal file
50
src/api/java/cofh/api/transport/IEnderAttuned.java
Normal file
@ -0,0 +1,50 @@
|
||||
package cofh.api.transport;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public interface IEnderAttuned {
|
||||
|
||||
public enum EnderTypes {
|
||||
ITEM, FLUID, REDSTONE_FLUX
|
||||
}
|
||||
|
||||
String getOwnerString();
|
||||
|
||||
int getFrequency();
|
||||
|
||||
public boolean setFrequency(int frequency);
|
||||
|
||||
public boolean clearFrequency();
|
||||
|
||||
boolean canSendItems();
|
||||
|
||||
boolean canSendFluid();
|
||||
|
||||
boolean canSendEnergy();
|
||||
|
||||
boolean canReceiveItems();
|
||||
|
||||
boolean canReceiveFluid();
|
||||
|
||||
boolean canReceiveEnergy();
|
||||
|
||||
boolean currentlyValidToReceiveItems(IEnderAttuned asker);
|
||||
|
||||
boolean currentlyValidToReceiveFluid(IEnderAttuned asker);
|
||||
|
||||
boolean currentlyValidToReceiveEnergy(IEnderAttuned asker);
|
||||
|
||||
boolean currentlyValidToSendItems(IEnderAttuned asker);
|
||||
|
||||
boolean currentlyValidToSendFluid(IEnderAttuned asker);
|
||||
|
||||
boolean currentlyValidToSendEnergy(IEnderAttuned asker);
|
||||
|
||||
ItemStack receiveItem(ItemStack item);
|
||||
|
||||
FluidStack receiveFluid(FluidStack fluid, boolean doFill);
|
||||
|
||||
int receiveEnergy(int energy, boolean simulate);
|
||||
|
||||
}
|
32
src/api/java/cofh/api/transport/IItemConduit.java
Normal file
32
src/api/java/cofh/api/transport/IItemConduit.java
Normal file
@ -0,0 +1,32 @@
|
||||
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.
|
||||
*
|
||||
* @author Zeldo Kavira, King Lemming
|
||||
*
|
||||
*/
|
||||
public interface IItemConduit {
|
||||
|
||||
/**
|
||||
* 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!
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
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);
|
||||
|
||||
@Deprecated
|
||||
public ItemStack sendItems(ItemStack item, ForgeDirection from);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user