summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyle Gunger <corechg@gmail.com>2020-10-19 00:46:16 -0400
committerKyle Gunger <corechg@gmail.com>2020-10-19 00:46:16 -0400
commit85ca955e34376e203d1013ab90226cfe7f15c395 (patch)
tree2f805deafbe2db24d2d3781093ee34c615892d20 /src
parent9edd770911a9dfd5b350d579e9092a62873e1d4a (diff)
Package change
+ Abstract implementation for INode ~ Changed requirements for nodes ~ Changed package signatures
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/corechg/mc/transit/Transit.java (renamed from src/main/java/net/corechg/transit/Transit.java)4
-rw-r--r--src/main/java/net/corechg/mc/transit/basic/AbstractAcceptorNode.java51
-rw-r--r--src/main/java/net/corechg/mc/transit/basic/AbstractNode.java45
-rw-r--r--src/main/java/net/corechg/mc/transit/basic/AbstractProviderNode.java47
-rw-r--r--src/main/java/net/corechg/mc/transit/basic/AbstractTwoWayNode.java47
-rw-r--r--src/main/java/net/corechg/mc/transit/basic/system/AbstractSystem.java13
-rw-r--r--src/main/java/net/corechg/mc/transit/basic/system/AbstractSystemNode.java12
-rw-r--r--src/main/java/net/corechg/mc/transit/network/packet/IStaticPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/IStaticPacket.java)4
-rw-r--r--src/main/java/net/corechg/mc/transit/network/packet/MetaPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/MetaPacket.java)4
-rw-r--r--src/main/java/net/corechg/mc/transit/network/packet/StaticPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/StaticPacket.java)4
-rw-r--r--src/main/java/net/corechg/mc/transit/network/packet/dynamic/DynamicPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/dynamic/DynamicPacket.java)4
-rw-r--r--src/main/java/net/corechg/mc/transit/network/packet/dynamic/IDynamicPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/dynamic/IDynamicPacket.java)4
-rw-r--r--src/main/java/net/corechg/mc/transit/network/packet/dynamic/MetaDynamicPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/dynamic/MetaDynamicPacket.java)4
-rw-r--r--src/main/java/net/corechg/mc/transit/network/system/Connection.java49
-rw-r--r--src/main/java/net/corechg/mc/transit/network/system/INode.java (renamed from src/main/java/net/corechg/transit/network/system/INode.java)4
-rw-r--r--src/main/java/net/corechg/mc/transit/network/system/ISystem.java (renamed from src/main/java/net/corechg/transit/network/system/ISystem.java)2
-rw-r--r--src/main/java/net/corechg/mc/transit/network/system/swap/IAcceptorNode.java (renamed from src/main/java/net/corechg/transit/network/system/swap/IAcceptorNode.java)18
-rw-r--r--src/main/java/net/corechg/mc/transit/network/system/swap/IProviderNode.java (renamed from src/main/java/net/corechg/transit/network/system/swap/IProviderNode.java)16
-rw-r--r--src/main/java/net/corechg/mc/transit/type/TFluid.java (renamed from src/main/java/net/corechg/transit/type/TFluid.java)2
-rw-r--r--src/main/java/net/corechg/mc/transit/type/TMana.java (renamed from src/main/java/net/corechg/transit/type/TMana.java)4
-rw-r--r--src/main/java/net/corechg/mc/transit/type/Type.java (renamed from src/main/java/net/corechg/transit/type/Type.java)5
-rw-r--r--src/main/java/net/corechg/mc/transit/type/group/GroupRegistry.java (renamed from src/main/java/net/corechg/transit/type/group/GroupRegistry.java)6
-rw-r--r--src/main/java/net/corechg/mc/transit/type/group/TypeGroup.java (renamed from src/main/java/net/corechg/transit/type/group/TypeGroup.java)6
-rw-r--r--src/main/java/net/corechg/mc/transit/type/group/simple/SimpleGroups.java (renamed from src/main/java/net/corechg/transit/type/group/simple/SimpleGroups.java)9
-rw-r--r--src/main/java/net/corechg/mc/transit/type/simple/SimpleTypes.java (renamed from src/main/java/net/corechg/transit/type/simple/SimpleTypes.java)4
-rw-r--r--src/main/resources/fabric.mod.json2
26 files changed, 310 insertions, 60 deletions
diff --git a/src/main/java/net/corechg/transit/Transit.java b/src/main/java/net/corechg/mc/transit/Transit.java
index 3cf4917..36b60bf 100644
--- a/src/main/java/net/corechg/transit/Transit.java
+++ b/src/main/java/net/corechg/mc/transit/Transit.java
@@ -1,7 +1,7 @@
-package net.corechg.transit;
+package net.corechg.mc.transit;
import net.fabricmc.api.ModInitializer;
-import net.corechg.transit.type.group.simple.SimpleGroups;
+import net.corechg.mc.transit.type.group.simple.SimpleGroups;
public class Transit implements ModInitializer {
diff --git a/src/main/java/net/corechg/mc/transit/basic/AbstractAcceptorNode.java b/src/main/java/net/corechg/mc/transit/basic/AbstractAcceptorNode.java
new file mode 100644
index 0000000..d569557
--- /dev/null
+++ b/src/main/java/net/corechg/mc/transit/basic/AbstractAcceptorNode.java
@@ -0,0 +1,51 @@
+package net.corechg.mc.transit.basic;
+
+import net.corechg.mc.transit.network.packet.IStaticPacket;
+import net.corechg.mc.transit.network.system.Connection;
+import net.corechg.mc.transit.network.system.swap.*;
+import net.minecraft.block.entity.BlockEntityType;
+
+public abstract class AbstractAcceptorNode extends AbstractNode implements IAcceptorNode {
+
+ public AbstractAcceptorNode(BlockEntityType<?> type) {
+ super(type);
+ }
+
+ @Override
+ public abstract <T> boolean accept(IStaticPacket<T> packet, String group);
+
+ @Override
+ public boolean linkProvider(IProviderNode requestor, String group) {
+ if(this.hasGroup(group))
+ {
+ for (Connection c : connections) {
+ if(c.getNode() == requestor)
+ return false;
+ }
+
+ connections.add(new Connection(requestor, (short) 2));
+
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ public boolean unlinkProvider(IProviderNode requestor) {
+ for (Connection c : connections) {
+ if(c.getNode() == requestor)
+ {
+ if(c.isAccepting())
+ c.setProviding(false);
+ else
+ connections.remove(c);
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/net/corechg/mc/transit/basic/AbstractNode.java b/src/main/java/net/corechg/mc/transit/basic/AbstractNode.java
new file mode 100644
index 0000000..01c537c
--- /dev/null
+++ b/src/main/java/net/corechg/mc/transit/basic/AbstractNode.java
@@ -0,0 +1,45 @@
+package net.corechg.mc.transit.basic;
+
+import java.util.*;
+
+import net.corechg.mc.transit.network.system.*;
+import net.minecraft.block.entity.*;
+
+public abstract class AbstractNode extends BlockEntity implements INode {
+
+ public AbstractNode(BlockEntityType<?> type) {
+ super(type);
+ }
+
+ HashMap<String, Object> data = new HashMap<String, Object>();
+ ArrayList<Connection> connections = new ArrayList<Connection>(0);
+
+ @Override
+ public abstract boolean hasGroup(String groupID);
+
+ @Override
+ public ISystem getSystem() {
+ return null;
+ }
+
+ @Override
+ public Object getData(String groupID) {
+ return data.get(groupID);
+ }
+
+ @Override
+ public void setData(Object dat, String groupID) {
+ data.put(groupID, dat);
+ }
+
+ @Override
+ public Connection[] getConnections() {
+ return (Connection[]) connections.toArray();
+ }
+
+ @Override
+ public int connectionCount() {
+ return connections.size();
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/net/corechg/mc/transit/basic/AbstractProviderNode.java b/src/main/java/net/corechg/mc/transit/basic/AbstractProviderNode.java
new file mode 100644
index 0000000..7ddc41b
--- /dev/null
+++ b/src/main/java/net/corechg/mc/transit/basic/AbstractProviderNode.java
@@ -0,0 +1,47 @@
+package net.corechg.mc.transit.basic;
+
+import net.corechg.mc.transit.network.system.Connection;
+import net.corechg.mc.transit.network.system.swap.*;
+import net.minecraft.block.entity.BlockEntityType;
+
+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;
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/net/corechg/mc/transit/basic/AbstractTwoWayNode.java b/src/main/java/net/corechg/mc/transit/basic/AbstractTwoWayNode.java
new file mode 100644
index 0000000..1d37245
--- /dev/null
+++ b/src/main/java/net/corechg/mc/transit/basic/AbstractTwoWayNode.java
@@ -0,0 +1,47 @@
+package net.corechg.mc.transit.basic;
+
+import net.corechg.mc.transit.network.system.Connection;
+import net.corechg.mc.transit.network.system.swap.*;
+import net.minecraft.block.entity.BlockEntityType;
+
+public abstract class AbstractTwoWayNode extends AbstractAcceptorNode implements IProviderNode {
+
+ public AbstractTwoWayNode(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;
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/net/corechg/mc/transit/basic/system/AbstractSystem.java b/src/main/java/net/corechg/mc/transit/basic/system/AbstractSystem.java
new file mode 100644
index 0000000..637a072
--- /dev/null
+++ b/src/main/java/net/corechg/mc/transit/basic/system/AbstractSystem.java
@@ -0,0 +1,13 @@
+package net.corechg.mc.transit.basic.system;
+
+import net.corechg.mc.transit.network.system.*;
+
+public abstract class AbstractSystem implements ISystem {
+
+ @Override
+ public INode[] getNodes() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/net/corechg/mc/transit/basic/system/AbstractSystemNode.java b/src/main/java/net/corechg/mc/transit/basic/system/AbstractSystemNode.java
new file mode 100644
index 0000000..c65c6a2
--- /dev/null
+++ b/src/main/java/net/corechg/mc/transit/basic/system/AbstractSystemNode.java
@@ -0,0 +1,12 @@
+package net.corechg.mc.transit.basic.system;
+
+import net.corechg.mc.transit.basic.*;
+import net.minecraft.block.entity.BlockEntityType;
+
+public abstract class AbstractSystemNode extends AbstractNode {
+
+ public AbstractSystemNode(BlockEntityType<?> type) {
+ super(type);
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/net/corechg/transit/network/packet/IStaticPacket.java b/src/main/java/net/corechg/mc/transit/network/packet/IStaticPacket.java
index 74d5110..27dd3fb 100644
--- a/src/main/java/net/corechg/transit/network/packet/IStaticPacket.java
+++ b/src/main/java/net/corechg/mc/transit/network/packet/IStaticPacket.java
@@ -1,6 +1,6 @@
-package net.corechg.transit.network.packet;
+package net.corechg.mc.transit.network.packet;
-import net.corechg.transit.type.Type;
+import net.corechg.mc.transit.type.Type;
/** Interface describing an unchanging packet.
* @author Kyle Gunger
diff --git a/src/main/java/net/corechg/transit/network/packet/MetaPacket.java b/src/main/java/net/corechg/mc/transit/network/packet/MetaPacket.java
index e043aa1..3195198 100644
--- a/src/main/java/net/corechg/transit/network/packet/MetaPacket.java
+++ b/src/main/java/net/corechg/mc/transit/network/packet/MetaPacket.java
@@ -1,6 +1,6 @@
-package net.corechg.transit.network.packet;
+package net.corechg.mc.transit.network.packet;
-import net.corechg.transit.type.Type;
+import net.corechg.mc.transit.type.Type;
/** Static packet with extra data attached.
* @author Kyle Gunger
diff --git a/src/main/java/net/corechg/transit/network/packet/StaticPacket.java b/src/main/java/net/corechg/mc/transit/network/packet/StaticPacket.java
index 2596a8f..cf37b02 100644
--- a/src/main/java/net/corechg/transit/network/packet/StaticPacket.java
+++ b/src/main/java/net/corechg/mc/transit/network/packet/StaticPacket.java
@@ -1,6 +1,6 @@
-package net.corechg.transit.network.packet;
+package net.corechg.mc.transit.network.packet;
-import net.corechg.transit.type.Type;
+import net.corechg.mc.transit.type.Type;
/** Simple packet which stores an unchanging value.
* @author Kyle Gunger
diff --git a/src/main/java/net/corechg/transit/network/packet/dynamic/DynamicPacket.java b/src/main/java/net/corechg/mc/transit/network/packet/dynamic/DynamicPacket.java
index 73f3669..e59a762 100644
--- a/src/main/java/net/corechg/transit/network/packet/dynamic/DynamicPacket.java
+++ b/src/main/java/net/corechg/mc/transit/network/packet/dynamic/DynamicPacket.java
@@ -1,6 +1,6 @@
-package net.corechg.transit.network.packet.dynamic;
+package net.corechg.mc.transit.network.packet.dynamic;
-import net.corechg.transit.type.Type;
+import net.corechg.mc.transit.type.Type;
/**
* Simple packet which stores a fluid value.
diff --git a/src/main/java/net/corechg/transit/network/packet/dynamic/IDynamicPacket.java b/src/main/java/net/corechg/mc/transit/network/packet/dynamic/IDynamicPacket.java
index 6cf3018..096d289 100644
--- a/src/main/java/net/corechg/transit/network/packet/dynamic/IDynamicPacket.java
+++ b/src/main/java/net/corechg/mc/transit/network/packet/dynamic/IDynamicPacket.java
@@ -1,6 +1,6 @@
-package net.corechg.transit.network.packet.dynamic;
+package net.corechg.mc.transit.network.packet.dynamic;
-import net.corechg.transit.network.packet.IStaticPacket;
+import net.corechg.mc.transit.network.packet.IStaticPacket;
/** Interface describing a fluid packet.
* @author Kyle Gunger
diff --git a/src/main/java/net/corechg/transit/network/packet/dynamic/MetaDynamicPacket.java b/src/main/java/net/corechg/mc/transit/network/packet/dynamic/MetaDynamicPacket.java
index 50418b9..fd4c24d 100644
--- a/src/main/java/net/corechg/transit/network/packet/dynamic/MetaDynamicPacket.java
+++ b/src/main/java/net/corechg/mc/transit/network/packet/dynamic/MetaDynamicPacket.java
@@ -1,6 +1,6 @@
-package net.corechg.transit.network.packet.dynamic;
+package net.corechg.mc.transit.network.packet.dynamic;
-import net.corechg.transit.type.Type;
+import net.corechg.mc.transit.type.Type;
/** Static packet with extra data attached.
* @author Kyle Gunger
diff --git a/src/main/java/net/corechg/mc/transit/network/system/Connection.java b/src/main/java/net/corechg/mc/transit/network/system/Connection.java
new file mode 100644
index 0000000..bb53f93
--- /dev/null
+++ b/src/main/java/net/corechg/mc/transit/network/system/Connection.java
@@ -0,0 +1,49 @@
+package net.corechg.mc.transit.network.system;
+
+public class Connection {
+ INode node;
+ short mask;
+
+ public Connection(INode n)
+ {
+ node = n;
+ mask = 0;
+ }
+
+ public Connection(INode n, short m)
+ {
+ node = n;
+ mask = m;
+ }
+
+ public INode getNode()
+ {
+ return node;
+ }
+
+ public boolean isAccepting()
+ {
+ return (mask & 1) == 1;
+ }
+
+ public void setAccepting(boolean value)
+ {
+ if(isAccepting() && value == false)
+ mask -= 1;
+ else if(!isAccepting() && value == true)
+ mask += 1;
+ }
+
+ public boolean isProviding()
+ {
+ return (mask & 2) == 2;
+ }
+
+ public void setProviding(boolean value)
+ {
+ if(isProviding() && value == false)
+ mask -= 2;
+ else if(!isProviding() && value == true)
+ mask += 2;
+ }
+} \ No newline at end of file
diff --git a/src/main/java/net/corechg/transit/network/system/INode.java b/src/main/java/net/corechg/mc/transit/network/system/INode.java
index 94ec308..71733e6 100644
--- a/src/main/java/net/corechg/transit/network/system/INode.java
+++ b/src/main/java/net/corechg/mc/transit/network/system/INode.java
@@ -1,4 +1,4 @@
-package net.corechg.transit.network.system;
+package net.corechg.mc.transit.network.system;
/**
* @author Kyle Gunger
@@ -42,7 +42,7 @@ public interface INode
*
* @return Node[]
*/
- public INode[] getConnections();
+ public Connection[] getConnections();
/** Get the number of nodes that this node is connected to
diff --git a/src/main/java/net/corechg/transit/network/system/ISystem.java b/src/main/java/net/corechg/mc/transit/network/system/ISystem.java
index 693a3ed..0ebb656 100644
--- a/src/main/java/net/corechg/transit/network/system/ISystem.java
+++ b/src/main/java/net/corechg/mc/transit/network/system/ISystem.java
@@ -1,4 +1,4 @@
-package net.corechg.transit.network.system;
+package net.corechg.mc.transit.network.system;
/**
diff --git a/src/main/java/net/corechg/transit/network/system/swap/IAcceptorNode.java b/src/main/java/net/corechg/mc/transit/network/system/swap/IAcceptorNode.java
index 84765ac..61f6022 100644
--- a/src/main/java/net/corechg/transit/network/system/swap/IAcceptorNode.java
+++ b/src/main/java/net/corechg/mc/transit/network/system/swap/IAcceptorNode.java
@@ -1,7 +1,7 @@
-package net.corechg.transit.network.system.swap;
+package net.corechg.mc.transit.network.system.swap;
-import net.corechg.transit.network.packet.IStaticPacket;
-import net.corechg.transit.network.system.INode;
+import net.corechg.mc.transit.network.packet.IStaticPacket;
+import net.corechg.mc.transit.network.system.INode;
/**
* @author Kyle Gunger
@@ -16,21 +16,15 @@ public interface IAcceptorNode extends INode
* @param group
* @return
*/
- public boolean linkProvider(INode requester, String group);
+ public boolean linkProvider(IProviderNode requestor, String group);
/** Unlink a provider from the acceptor
*
- * @param toUnlink
+ * @param requestor
* @return
*/
- public boolean unlinkProvider(INode toUnlink);
-
-
- /**
- * @return Node[]
- */
- public IProviderNode[] getProviders();
+ public boolean unlinkProvider(IProviderNode requestor);
/** Accept a packet from a provider
diff --git a/src/main/java/net/corechg/transit/network/system/swap/IProviderNode.java b/src/main/java/net/corechg/mc/transit/network/system/swap/IProviderNode.java
index 5fd9908..62a45b7 100644
--- a/src/main/java/net/corechg/transit/network/system/swap/IProviderNode.java
+++ b/src/main/java/net/corechg/mc/transit/network/system/swap/IProviderNode.java
@@ -1,6 +1,6 @@
-package net.corechg.transit.network.system.swap;
+package net.corechg.mc.transit.network.system.swap;
-import net.corechg.transit.network.system.INode;
+import net.corechg.mc.transit.network.system.INode;
/**
* @author Kyle Gunger
@@ -14,20 +14,14 @@ public interface IProviderNode extends INode{
* @param group
* @return boolean
*/
- public boolean linkAcceptor(INode requester, String group);
+ public boolean linkAcceptor(IAcceptorNode requestor, String group);
/** Unlink a provider from the acceptor
*
- * @param toUnlink
+ * @param requestor
* @return
*/
- public boolean unlinkAcceptor(INode toUnlink);
-
-
- /**
- * @return Node[]
- */
- public IAcceptorNode[] getAcceptors();
+ public boolean unlinkAcceptor(IAcceptorNode requestor);
}
diff --git a/src/main/java/net/corechg/transit/type/TFluid.java b/src/main/java/net/corechg/mc/transit/type/TFluid.java
index 6886ab2..9f00a9b 100644
--- a/src/main/java/net/corechg/transit/type/TFluid.java
+++ b/src/main/java/net/corechg/mc/transit/type/TFluid.java
@@ -1,4 +1,4 @@
-package net.corechg.transit.type;
+package net.corechg.mc.transit.type;
import net.minecraft.fluid.Fluid;
diff --git a/src/main/java/net/corechg/transit/type/TMana.java b/src/main/java/net/corechg/mc/transit/type/TMana.java
index 1a176fc..16983b7 100644
--- a/src/main/java/net/corechg/transit/type/TMana.java
+++ b/src/main/java/net/corechg/mc/transit/type/TMana.java
@@ -1,4 +1,4 @@
-package net.corechg.transit.type;
+package net.corechg.mc.transit.type;
/** Units of mana.
* @author Kyle Gunger
@@ -9,7 +9,7 @@ public class TMana {
/** Constructor
*
- * @param t Type of mana (Fire/Water/Dark/Light/etc.)
+ * @param t Type of mana (Fire/Water/Dark/Light/etc.) leave empty string for an untyped mana system.
* @param ct Count of mana
*/
public TMana(String t, Number ct) {
diff --git a/src/main/java/net/corechg/transit/type/Type.java b/src/main/java/net/corechg/mc/transit/type/Type.java
index 3940f3f..7ac670e 100644
--- a/src/main/java/net/corechg/transit/type/Type.java
+++ b/src/main/java/net/corechg/mc/transit/type/Type.java
@@ -1,7 +1,6 @@
-package net.corechg.transit.type;
+package net.corechg.mc.transit.type;
-import net.corechg.transit.network.packet.IStaticPacket;
-import net.corechg.transit.network.packet.StaticPacket;
+import net.corechg.mc.transit.network.packet.*;
/**@author Kyle Gunger
*
diff --git a/src/main/java/net/corechg/transit/type/group/GroupRegistry.java b/src/main/java/net/corechg/mc/transit/type/group/GroupRegistry.java
index 0b04913..2d0d17f 100644
--- a/src/main/java/net/corechg/transit/type/group/GroupRegistry.java
+++ b/src/main/java/net/corechg/mc/transit/type/group/GroupRegistry.java
@@ -1,13 +1,13 @@
-package net.corechg.transit.type.group;
+package net.corechg.mc.transit.type.group;
import java.util.ArrayList;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import net.corechg.transit.type.Type;
+import net.corechg.mc.transit.type.Type;
-public class GroupRegistry {
+public final class GroupRegistry {
private static final ArrayList<TypeGroup<?>> GROUPS = new ArrayList<TypeGroup<?>>(0);
private static final Logger LOG = LogManager.getFormatterLogger("Transit|GroupRegistry");
diff --git a/src/main/java/net/corechg/transit/type/group/TypeGroup.java b/src/main/java/net/corechg/mc/transit/type/group/TypeGroup.java
index eecf6d4..4717119 100644
--- a/src/main/java/net/corechg/transit/type/group/TypeGroup.java
+++ b/src/main/java/net/corechg/mc/transit/type/group/TypeGroup.java
@@ -1,12 +1,12 @@
-package net.corechg.transit.type.group;
+package net.corechg.mc.transit.type.group;
import java.util.ArrayList;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import net.corechg.transit.network.packet.*;
-import net.corechg.transit.type.Type;
+import net.corechg.mc.transit.network.packet.*;
+import net.corechg.mc.transit.type.Type;
/**
* @author Kyle Gunger
diff --git a/src/main/java/net/corechg/transit/type/group/simple/SimpleGroups.java b/src/main/java/net/corechg/mc/transit/type/group/simple/SimpleGroups.java
index ce39fc1..73e0df7 100644
--- a/src/main/java/net/corechg/transit/type/group/simple/SimpleGroups.java
+++ b/src/main/java/net/corechg/mc/transit/type/group/simple/SimpleGroups.java
@@ -1,10 +1,9 @@
-package net.corechg.transit.type.group.simple;
+package net.corechg.mc.transit.type.group.simple;
import net.minecraft.item.ItemStack;
-import net.corechg.transit.type.group.GroupRegistry;
-import net.corechg.transit.type.group.TypeGroup;
-import net.corechg.transit.type.simple.SimpleTypes;
-import net.corechg.transit.type.*;
+import net.corechg.mc.transit.type.group.*;
+import net.corechg.mc.transit.type.simple.SimpleTypes;
+import net.corechg.mc.transit.type.*;
public final class SimpleGroups {
/** Transfers energy. Basic unit is TJoule (Transit Joule).
diff --git a/src/main/java/net/corechg/transit/type/simple/SimpleTypes.java b/src/main/java/net/corechg/mc/transit/type/simple/SimpleTypes.java
index f608bdd..79ee9a8 100644
--- a/src/main/java/net/corechg/transit/type/simple/SimpleTypes.java
+++ b/src/main/java/net/corechg/mc/transit/type/simple/SimpleTypes.java
@@ -1,7 +1,7 @@
-package net.corechg.transit.type.simple;
+package net.corechg.mc.transit.type.simple;
import net.minecraft.item.ItemStack;
-import net.corechg.transit.type.*;
+import net.corechg.mc.transit.type.*;
public final class SimpleTypes {
/** Transfers energy. Energy is stored as a numeric, base value is TJoule (TransitJoule)
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index d54a617..aee36dc 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -20,7 +20,7 @@
"environment": "*",
"entrypoints": {
"main": [
- "net.corechg.transit.Transit"
+ "net.corechg.mc.transit.Transit"
]
},