diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2021-05-22 13:36:56 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2021-05-22 13:36:56 -0400 |
commit | 04276d1d18d379248cc02b17c15a28760a5adb41 (patch) | |
tree | 3cac4729c24d176af382a4031cc532ddc0827d5e /src/main/java/net/cshift/transit/basic/AbstractProviderNode.java | |
parent | d94d1d89565998fdccff071a7c9b65ea1e264ce7 (diff) |
2.0.0 alpha.predev release
Diffstat (limited to 'src/main/java/net/cshift/transit/basic/AbstractProviderNode.java')
-rw-r--r-- | src/main/java/net/cshift/transit/basic/AbstractProviderNode.java | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/main/java/net/cshift/transit/basic/AbstractProviderNode.java b/src/main/java/net/cshift/transit/basic/AbstractProviderNode.java deleted file mode 100644 index cc81544..0000000 --- a/src/main/java/net/cshift/transit/basic/AbstractProviderNode.java +++ /dev/null @@ -1,47 +0,0 @@ -package net.cshift.transit.basic; - -import net.cshift.transit.network.system.*; -import net.cshift.transit.network.system.swap.*; -import net.minecraft.block.entity.*; - -public abstract class AbstractProviderNode extends AbstractNode implements IProviderNode { - - public AbstractProviderNode(BlockEntityType<?> type) { - super(type); - } - - @Override - public boolean linkAcceptor(IAcceptorNode requestor, String group) { - if(this.hasGroup(group)) - { - for (Connection c : connections) { - if(c.getNode() == requestor) - return false; - } - - connections.add(new Connection(requestor, (short) 1)); - - return true; - } - - return false; - } - - @Override - public boolean unlinkAcceptor(IAcceptorNode requestor) { - for (Connection c : connections) { - if(c.getNode() == requestor) - { - if(c.isProviding()) - c.setAccepting(false); - else - connections.remove(c); - - return true; - } - } - - return false; - } - -} |