More work on inventory interfaces.

This commit is contained in:
SirSengir 2012-07-19 14:18:43 +02:00
parent d6f5adac9e
commit be7bb5d31b
2 changed files with 18 additions and 3 deletions

View file

@ -1,5 +1,20 @@
package net.minecraft.src.buildcraft.api.inventory;
import net.minecraft.src.buildcraft.api.Orientations;
public interface ISecuredInventory {
/**
* @param name
* @return true if the user/player with the given name has access permissions on this machine.
*/
boolean canAccess(String name);
/**
* Informs the inventory with whose permissions the next item or liquid transaction will be performed. It is up to the inventory to determine the effect.
* @param orientation Orientation the transaction will be performed from.
* @param name Name of the user/player who owns the transaction.
*/
void prepareTransaction(Orientations orientation, String name);
}

View file

@ -6,12 +6,12 @@ import net.minecraft.src.buildcraft.api.Orientations;
public interface ISelectiveInventory extends ISpecialInventory {
/**
* Requests specified items to be extracted from the inventory
* @param desired Array which can contain ItemStacks, Items, or classes describing the type of item accepted.
* @param desired Array which can contain ItemStacks, Items, or classes describing the type of item accepted or excluded.
* @param exclusion If true desired items are not eligible for returning.
* @param doRemove If false no actual extraction may occur.
* @param from Orientation the ItemStack is requested from.
* @param maxItemCount Maximum amount of items to extract (spread over all returned item stacks)
* @return Array of item stacks extracted from the inventory
*/
ItemStack[] extractItem(Object[] desired, boolean doRemove, Orientations from, int maxItemCount);
ItemStack[] extractItem(Object[] desired, boolean exclusion, boolean doRemove, Orientations from, int maxItemCount);
}