-
Notifications
You must be signed in to change notification settings - Fork 497
/
IMapLocation.java
59 lines (49 loc) · 1.41 KB
/
IMapLocation.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package buildcraft.api.items;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.core.BlockIndex;
import buildcraft.api.core.IBox;
import buildcraft.api.core.IZone;
/**
* Created by asie on 2/28/15.
*/
public interface IMapLocation extends INamedItem {
public enum MapLocationType {
CLEAN, SPOT, AREA, PATH, ZONE
}
MapLocationType getType(ItemStack stack);
/**
* This function can be used for SPOT types.
* @param stack
* @return The point representing the map location.
*/
BlockIndex getPoint(ItemStack stack);
/**
* This function can be used for SPOT and AREA types.
* @param stack
* @return The box representing the map location.
*/
IBox getBox(ItemStack stack);
/**
* This function can be used for SPOT, AREA and ZONE types.
* The PATH type needs to be handled separately.
* @param stack
* @return An IZone representing the map location - also an instance of
* IBox for SPOT and AREA types.
*/
IZone getZone(ItemStack stack);
/**
* This function can be used for SPOT and PATH types.
* @param stack
* @return A list of BlockIndexes representing the path the Map Location
* stores.
*/
List<BlockIndex> getPath(ItemStack stack);
/**
* This function can be used for SPOT types only.
* @param stack
* @return The side of the spot.
*/
ForgeDirection getPointSide(ItemStack stack);
}