diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2019-11-22 21:56:36 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2019-11-22 21:56:36 -0500 |
commit | 1f94ea0af4d818c174ab6d7617ba891831a73203 (patch) | |
tree | cc5cdd65df18868158ba9338f42364125a02cb18 /src/main/java/net/transit | |
parent | 83b0332a83dd07e41b5a177c734b3268a5b21387 (diff) |
[Update] version 0.4.3
~ Change InitSimpleGroups to SimpleGroups
+ Add a way to set the node data (mostly for systems)
Signed-off-by: Kyle Gunger <kgunger12@gmail.com>
Diffstat (limited to 'src/main/java/net/transit')
-rw-r--r-- | src/main/java/net/transit/InitTransit.java | 4 | ||||
-rw-r--r-- | src/main/java/net/transit/network/system/Node.java | 9 | ||||
-rw-r--r-- | src/main/java/net/transit/network/system/swap/AcceptorNode.java | 2 | ||||
-rw-r--r-- | src/main/java/net/transit/type/group/simple/SimpleGroups.java (renamed from src/main/java/net/transit/type/group/simple/InitSimpleGroups.java) | 2 |
4 files changed, 13 insertions, 4 deletions
diff --git a/src/main/java/net/transit/InitTransit.java b/src/main/java/net/transit/InitTransit.java index a89f91a..a137040 100644 --- a/src/main/java/net/transit/InitTransit.java +++ b/src/main/java/net/transit/InitTransit.java @@ -1,13 +1,13 @@ package net.transit; import net.fabricmc.api.ModInitializer; -import net.transit.type.group.simple.InitSimpleGroups; +import net.transit.type.group.simple.SimpleGroups; public class InitTransit implements ModInitializer { @Override public void onInitialize() { - InitSimpleGroups.init(); + SimpleGroups.init(); } } diff --git a/src/main/java/net/transit/network/system/Node.java b/src/main/java/net/transit/network/system/Node.java index 9ab9812..6a661f3 100644 --- a/src/main/java/net/transit/network/system/Node.java +++ b/src/main/java/net/transit/network/system/Node.java @@ -28,6 +28,15 @@ public interface Node */ public Object getData(String groupID); + + /** Set the group data for the node + * + * @param dat + * @param groupID + */ + public void setData(Object dat, String groupID); + + /** Get the nodes that this node is connected to * * @return Node[] diff --git a/src/main/java/net/transit/network/system/swap/AcceptorNode.java b/src/main/java/net/transit/network/system/swap/AcceptorNode.java index 69c07e7..2dfd7a5 100644 --- a/src/main/java/net/transit/network/system/swap/AcceptorNode.java +++ b/src/main/java/net/transit/network/system/swap/AcceptorNode.java @@ -12,7 +12,7 @@ public interface AcceptorNode extends Node * @param group * @return */ - public boolean linkProvider(Node requestor, String group); + public boolean linkProvider(Node requester, String group); /** Unlink a provider from the acceptor diff --git a/src/main/java/net/transit/type/group/simple/InitSimpleGroups.java b/src/main/java/net/transit/type/group/simple/SimpleGroups.java index 50a268a..eb45a36 100644 --- a/src/main/java/net/transit/type/group/simple/InitSimpleGroups.java +++ b/src/main/java/net/transit/type/group/simple/SimpleGroups.java @@ -6,7 +6,7 @@ import net.transit.type.group.GroupRegistry; import net.transit.type.group.TypeGroup; import net.transit.type.simple.SimpleTypes; -public final class InitSimpleGroups { +public final class SimpleGroups { public static final TypeGroup<Number> ENERGY_GROUP = new TypeGroup<Number>(SimpleTypes.ENERGY); public static final TypeGroup<Number> MANA_GROUP = new TypeGroup<Number>(SimpleTypes.MANA); public static final TypeGroup<Item> ITEM_GROUP = new TypeGroup<Item>(SimpleTypes.ITEM); |