mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-26 15:03:07 +00:00
Implement IInventoryConnection on ItemConduits
much better than the old way
This commit is contained in:
1 parent
23dbf935e6
commit
e3e707bd0a
5 files changed
+136
-8
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package cofh.api.inventory;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
/**
|
||||
* Implement this interface on TileEntities which should connect to item transportation blocks.
|
||||
*/
|
||||
public interface IInventoryConnection {
|
||||
|
||||
/**
|
||||
* @param from
|
||||
* Side to which a connector would connect
|
||||
* @return DEFAULT if the connector should decide how to connect; FORCE if the connector should always connect; DENY if the connector should never connect.
|
||||
*/
|
||||
public ConnectionType canConnectInventory(ForgeDirection from);
|
||||
|
||||
public static enum ConnectionType {
|
||||
DEFAULT, FORCE, DENY;
|
||||
|
||||
public final boolean canConnect = ordinal() != 2;
|
||||
public final boolean forceConnect = ordinal() == 1;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user