summaryrefslogtreecommitdiff
path: root/src/main/java/net/transit/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/transit/impl')
-rw-r--r--src/main/java/net/transit/impl/IAcceptor.java13
-rw-r--r--src/main/java/net/transit/impl/IConsumer.java10
-rw-r--r--src/main/java/net/transit/impl/IGenerator.java10
-rw-r--r--src/main/java/net/transit/impl/IProvider.java17
4 files changed, 50 insertions, 0 deletions
diff --git a/src/main/java/net/transit/impl/IAcceptor.java b/src/main/java/net/transit/impl/IAcceptor.java
new file mode 100644
index 0000000..9433ea3
--- /dev/null
+++ b/src/main/java/net/transit/impl/IAcceptor.java
@@ -0,0 +1,13 @@
+package net.transit.impl;
+
+import net.transit.type.IType;
+import net.minecraft.util.math.Direction;
+
+public interface IAcceptor<T extends IType<?, ?>>
+{
+ // Direction given if acceptor is a block
+ public boolean canAccept(Direction d);
+
+ // Accept (or not) a provided T (should trigger ITransferEvent)
+ public boolean accept(T provided);
+} \ No newline at end of file
diff --git a/src/main/java/net/transit/impl/IConsumer.java b/src/main/java/net/transit/impl/IConsumer.java
new file mode 100644
index 0000000..d709430
--- /dev/null
+++ b/src/main/java/net/transit/impl/IConsumer.java
@@ -0,0 +1,10 @@
+package net.transit.impl;
+
+import net.transit.type.IType;
+
+public interface IConsumer<T extends IType<?, ?>> extends IAcceptor<T>
+{
+ public boolean canConsume();
+
+
+} \ No newline at end of file
diff --git a/src/main/java/net/transit/impl/IGenerator.java b/src/main/java/net/transit/impl/IGenerator.java
new file mode 100644
index 0000000..009f268
--- /dev/null
+++ b/src/main/java/net/transit/impl/IGenerator.java
@@ -0,0 +1,10 @@
+package net.transit.impl;
+
+import net.transit.type.IType;
+
+public interface IGenerator<T extends IType<?, ?>> extends IProvider<T>
+{
+ public boolean canGenerate();
+
+
+} \ No newline at end of file
diff --git a/src/main/java/net/transit/impl/IProvider.java b/src/main/java/net/transit/impl/IProvider.java
new file mode 100644
index 0000000..b613436
--- /dev/null
+++ b/src/main/java/net/transit/impl/IProvider.java
@@ -0,0 +1,17 @@
+package net.transit.impl;
+
+import net.transit.type.IType;
+import net.minecraft.util.math.Direction;
+
+public interface IProvider<T extends IType<?, ?>>
+{
+
+ // Direction given if provider is a block
+ public boolean canProvide(Direction d);
+
+ // Provide the next T (should trigger ITransferEvent)
+ public T provide();
+
+ // Retain the rejected T if the acceptor did not accept it (should trigger ITransferEvent)
+ public void accept(T rejected);
+} \ No newline at end of file