-
Notifications
You must be signed in to change notification settings - Fork 497
/
IRequestProvider.java
executable file
·38 lines (31 loc) · 1.04 KB
/
IRequestProvider.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
package buildcraft.api.robots;
import net.minecraft.item.ItemStack;
public interface IRequestProvider {
/**
* Return the total number of request slots available from this provider.
*/
int getNumberOfRequests();
/**
* Return the stack requested in slot i, provided that this request is not
* in process of being provided by a robot.
*/
StackRequest getAvailableRequest(int i);
/**
* Allocate the request at slot i to the robot given in parameter, and
* return true if the allocation is successful.
*/
boolean takeRequest(int i, EntityRobotBase robot);
/**
* Provide a stack to fulfill request at index i. Return the stack minus
* items that have been taken.
*/
ItemStack provideItemsForRequest(int i, ItemStack stack);
}