mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 18:55:03 -04:00
Added class with slot names for reference to API.
This commit is contained in:
parent
99f2822888
commit
1c6c4be7f1
@ -8,5 +8,5 @@
|
|||||||
@cpw.mods.fml.common.API(
|
@cpw.mods.fml.common.API(
|
||||||
owner = "OpenComputers|Core",
|
owner = "OpenComputers|Core",
|
||||||
provides = "OpenComputersAPI|Component",
|
provides = "OpenComputersAPI|Component",
|
||||||
apiVersion = "3.0.0")
|
apiVersion = "3.0.1")
|
||||||
package li.cil.oc.api.component;
|
package li.cil.oc.api.component;
|
@ -73,6 +73,7 @@ public interface Item {
|
|||||||
*
|
*
|
||||||
* @param stack the item stack to get the slot type for.
|
* @param stack the item stack to get the slot type for.
|
||||||
* @return the slot type of the specified item.
|
* @return the slot type of the specified item.
|
||||||
|
* @see li.cil.oc.api.driver.item.Slot
|
||||||
*/
|
*/
|
||||||
String slot(ItemStack stack);
|
String slot(ItemStack stack);
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ public interface Container extends Item {
|
|||||||
*
|
*
|
||||||
* @param stack the item stack to get the provided slot type for.
|
* @param stack the item stack to get the provided slot type for.
|
||||||
* @return the slot type provided by that dynamic slot upgrade.
|
* @return the slot type provided by that dynamic slot upgrade.
|
||||||
|
* @see li.cil.oc.api.driver.item.Slot
|
||||||
*/
|
*/
|
||||||
String providedSlot(ItemStack stack);
|
String providedSlot(ItemStack stack);
|
||||||
|
|
||||||
|
22
src/main/java/li/cil/oc/api/driver/item/Slot.java
Normal file
22
src/main/java/li/cil/oc/api/driver/item/Slot.java
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package li.cil.oc.api.driver.item;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reference list of slot types in OpenComputers.
|
||||||
|
*/
|
||||||
|
public final class Slot {
|
||||||
|
public static final String None = "none";
|
||||||
|
public static final String Any = "any";
|
||||||
|
|
||||||
|
public static final String Card = "card";
|
||||||
|
public static final String ComponentBus = "component_bus";
|
||||||
|
public static final String Container = "container";
|
||||||
|
public static final String CPU = "cpu";
|
||||||
|
public static final String Floppy = "floppy";
|
||||||
|
public static final String HDD = "hdd";
|
||||||
|
public static final String Memory = "memory";
|
||||||
|
public static final String Tablet = "tablet";
|
||||||
|
public static final String Upgrade = "upgrade";
|
||||||
|
|
||||||
|
private Slot() {
|
||||||
|
}
|
||||||
|
}
|
@ -7,5 +7,5 @@
|
|||||||
@cpw.mods.fml.common.API(
|
@cpw.mods.fml.common.API(
|
||||||
owner = "OpenComputers|Core",
|
owner = "OpenComputers|Core",
|
||||||
provides = "OpenComputersAPI|Driver|Item",
|
provides = "OpenComputersAPI|Driver|Item",
|
||||||
apiVersion = "3.0.0")
|
apiVersion = "3.0.1")
|
||||||
package li.cil.oc.api.driver.item;
|
package li.cil.oc.api.driver.item;
|
@ -7,5 +7,5 @@
|
|||||||
@cpw.mods.fml.common.API(
|
@cpw.mods.fml.common.API(
|
||||||
owner = "OpenComputers|Core",
|
owner = "OpenComputers|Core",
|
||||||
provides = "OpenComputersAPI|Driver",
|
provides = "OpenComputersAPI|Driver",
|
||||||
apiVersion = "3.0.0")
|
apiVersion = "3.0.1")
|
||||||
package li.cil.oc.api.driver;
|
package li.cil.oc.api.driver;
|
@ -5,5 +5,5 @@
|
|||||||
@cpw.mods.fml.common.API(
|
@cpw.mods.fml.common.API(
|
||||||
owner = "OpenComputers|Core",
|
owner = "OpenComputers|Core",
|
||||||
provides = "OpenComputersAPI|Event",
|
provides = "OpenComputersAPI|Event",
|
||||||
apiVersion = "3.0.0")
|
apiVersion = "3.0.1")
|
||||||
package li.cil.oc.api.event;
|
package li.cil.oc.api.event;
|
@ -16,5 +16,5 @@
|
|||||||
@cpw.mods.fml.common.API(
|
@cpw.mods.fml.common.API(
|
||||||
owner = "OpenComputers|Core",
|
owner = "OpenComputers|Core",
|
||||||
provides = "OpenComputersAPI|FileSystem",
|
provides = "OpenComputersAPI|FileSystem",
|
||||||
apiVersion = "3.0.0")
|
apiVersion = "3.0.1")
|
||||||
package li.cil.oc.api.fs;
|
package li.cil.oc.api.fs;
|
@ -16,5 +16,5 @@
|
|||||||
@cpw.mods.fml.common.API(
|
@cpw.mods.fml.common.API(
|
||||||
owner = "OpenComputers|Core",
|
owner = "OpenComputers|Core",
|
||||||
provides = "OpenComputersAPI|Internal",
|
provides = "OpenComputersAPI|Internal",
|
||||||
apiVersion = "3.0.0")
|
apiVersion = "3.0.1")
|
||||||
package li.cil.oc.api.internal;
|
package li.cil.oc.api.internal;
|
@ -19,5 +19,5 @@
|
|||||||
@cpw.mods.fml.common.API(
|
@cpw.mods.fml.common.API(
|
||||||
owner = "OpenComputers|Core",
|
owner = "OpenComputers|Core",
|
||||||
provides = "OpenComputersAPI|Machine",
|
provides = "OpenComputersAPI|Machine",
|
||||||
apiVersion = "3.0.0")
|
apiVersion = "3.0.1")
|
||||||
package li.cil.oc.api.machine;
|
package li.cil.oc.api.machine;
|
@ -7,5 +7,5 @@
|
|||||||
@cpw.mods.fml.common.API(
|
@cpw.mods.fml.common.API(
|
||||||
owner = "OpenComputers|Core",
|
owner = "OpenComputers|Core",
|
||||||
provides = "OpenComputersAPI|Network",
|
provides = "OpenComputersAPI|Network",
|
||||||
apiVersion = "3.0.0")
|
apiVersion = "3.0.1")
|
||||||
package li.cil.oc.api.network;
|
package li.cil.oc.api.network;
|
@ -37,5 +37,5 @@
|
|||||||
@cpw.mods.fml.common.API(
|
@cpw.mods.fml.common.API(
|
||||||
owner = "OpenComputers|Core",
|
owner = "OpenComputers|Core",
|
||||||
provides = "OpenComputersAPI|Core",
|
provides = "OpenComputersAPI|Core",
|
||||||
apiVersion = "3.0.0")
|
apiVersion = "3.0.1")
|
||||||
package li.cil.oc.api;
|
package li.cil.oc.api;
|
@ -10,5 +10,5 @@
|
|||||||
@cpw.mods.fml.common.API(
|
@cpw.mods.fml.common.API(
|
||||||
owner = "OpenComputers|Core",
|
owner = "OpenComputers|Core",
|
||||||
provides = "OpenComputersAPI|Prefab",
|
provides = "OpenComputersAPI|Prefab",
|
||||||
apiVersion = "3.0.0")
|
apiVersion = "3.0.1")
|
||||||
package li.cil.oc.api.prefab;
|
package li.cil.oc.api.prefab;
|
@ -1,19 +1,21 @@
|
|||||||
package li.cil.oc.common
|
package li.cil.oc.common
|
||||||
|
|
||||||
object Slot {
|
import li.cil.oc.api.driver
|
||||||
val None = "none"
|
|
||||||
val Any = "any"
|
|
||||||
|
|
||||||
val Card = "card"
|
object Slot {
|
||||||
val ComponentBus = "component_bus"
|
val None = driver.item.Slot.None
|
||||||
val Container = "container"
|
val Any = driver.item.Slot.Any
|
||||||
val CPU = "cpu"
|
|
||||||
val Floppy = "floppy"
|
val Card = driver.item.Slot.Card
|
||||||
val HDD = "hdd"
|
val ComponentBus = driver.item.Slot.ComponentBus
|
||||||
val Memory = "memory"
|
val Container = driver.item.Slot.Container
|
||||||
val Tablet = "tablet"
|
val CPU = driver.item.Slot.CPU
|
||||||
|
val Floppy = driver.item.Slot.Floppy
|
||||||
|
val HDD = driver.item.Slot.HDD
|
||||||
|
val Memory = driver.item.Slot.Memory
|
||||||
|
val Tablet = driver.item.Slot.Tablet
|
||||||
val Tool = "tool"
|
val Tool = "tool"
|
||||||
val Upgrade = "upgrade"
|
val Upgrade = driver.item.Slot.Upgrade
|
||||||
|
|
||||||
val All = Array(Card, ComponentBus, Container, CPU, Floppy, HDD, Memory, Tablet, Tool, Upgrade)
|
val All = Array(Card, ComponentBus, Container, CPU, Floppy, HDD, Memory, Tablet, Tool, Upgrade)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user