diff options
-rw-r--r-- | src/main/java/net/cshift/transit/Transit.java (renamed from src/main/java/net/corechg/transit/Transit.java) | 6 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/basic/AbstractAcceptorNode.java (renamed from src/main/java/net/corechg/transit/basic/AbstractAcceptorNode.java) | 12 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/basic/AbstractNode.java (renamed from src/main/java/net/corechg/transit/basic/AbstractNode.java) | 6 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/basic/AbstractProviderNode.java (renamed from src/main/java/net/corechg/transit/basic/AbstractProviderNode.java) | 10 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/basic/AbstractTwoWayNode.java (renamed from src/main/java/net/corechg/transit/basic/AbstractTwoWayNode.java) | 10 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/basic/system/AbstractSystem.java (renamed from src/main/java/net/corechg/transit/basic/system/AbstractSystem.java) | 6 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/basic/system/AbstractSystemNode.java (renamed from src/main/java/net/corechg/transit/basic/system/AbstractSystemNode.java) | 8 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/network/packet/IStaticPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/IStaticPacket.java) | 6 | ||||
-rw-r--r-- | src/main/java/net/cshift/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/cshift/transit/network/packet/StaticPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/StaticPacket.java) | 6 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/network/packet/dynamic/DynamicPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/dynamic/DynamicPacket.java) | 10 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/network/packet/dynamic/IDynamicPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/dynamic/IDynamicPacket.java) | 8 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/network/packet/dynamic/MetaDynamicPacket.java (renamed from src/main/java/net/corechg/transit/network/packet/dynamic/MetaDynamicPacket.java) | 12 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/network/system/Connection.java (renamed from src/main/java/net/corechg/transit/network/system/Connection.java) | 4 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/network/system/INode.java (renamed from src/main/java/net/corechg/transit/network/system/INode.java) | 28 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/network/system/ISystem.java (renamed from src/main/java/net/corechg/transit/network/system/ISystem.java) | 4 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/network/system/swap/IAcceptorNode.java (renamed from src/main/java/net/corechg/transit/network/system/swap/IAcceptorNode.java) | 22 | ||||
-rw-r--r-- | src/main/java/net/cshift/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/cshift/transit/type/TFluid.java (renamed from src/main/java/net/corechg/transit/type/TFluid.java) | 4 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/type/TMana.java (renamed from src/main/java/net/corechg/transit/type/TMana.java) | 2 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/type/Type.java (renamed from src/main/java/net/corechg/transit/type/Type.java) | 4 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/type/group/GroupRegistry.java (renamed from src/main/java/net/corechg/transit/type/group/GroupRegistry.java) | 4 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/type/group/TypeGroup.java (renamed from src/main/java/net/corechg/transit/type/group/TypeGroup.java) | 94 | ||||
-rw-r--r-- | src/main/java/net/cshift/transit/type/group/simple/SimpleGroups.java (renamed from src/main/java/net/corechg/transit/type/group/simple/SimpleGroups.java) | 8 | ||||
-rw-r--r-- | src/main/java/net/cshift/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.json | 12 |
26 files changed, 155 insertions, 155 deletions
diff --git a/src/main/java/net/corechg/transit/Transit.java b/src/main/java/net/cshift/transit/Transit.java index 3cf4917..ef440c5 100644 --- a/src/main/java/net/corechg/transit/Transit.java +++ b/src/main/java/net/cshift/transit/Transit.java @@ -1,10 +1,10 @@ -package net.corechg.transit; +package net.cshift.transit; import net.fabricmc.api.ModInitializer; -import net.corechg.transit.type.group.simple.SimpleGroups; +import net.cshift.transit.type.group.simple.SimpleGroups; public class Transit implements ModInitializer { - + @Override public void onInitialize() { SimpleGroups.init(); diff --git a/src/main/java/net/corechg/transit/basic/AbstractAcceptorNode.java b/src/main/java/net/cshift/transit/basic/AbstractAcceptorNode.java index eafc71e..e2e6711 100644 --- a/src/main/java/net/corechg/transit/basic/AbstractAcceptorNode.java +++ b/src/main/java/net/cshift/transit/basic/AbstractAcceptorNode.java @@ -1,9 +1,9 @@ -package net.corechg.transit.basic; +package net.cshift.transit.basic; -import net.corechg.transit.network.packet.IStaticPacket; -import net.corechg.transit.network.system.Connection; -import net.corechg.transit.network.system.swap.*; -import net.minecraft.block.entity.BlockEntityType; +import net.cshift.transit.network.packet.*; +import net.cshift.transit.network.system.*; +import net.cshift.transit.network.system.swap.*; +import net.minecraft.block.entity.*; public abstract class AbstractAcceptorNode extends AbstractNode implements IAcceptorNode { @@ -48,4 +48,4 @@ public abstract class AbstractAcceptorNode extends AbstractNode implements IAcce return false; } -}
\ No newline at end of file +} diff --git a/src/main/java/net/corechg/transit/basic/AbstractNode.java b/src/main/java/net/cshift/transit/basic/AbstractNode.java index 9c66951..a87fba4 100644 --- a/src/main/java/net/corechg/transit/basic/AbstractNode.java +++ b/src/main/java/net/cshift/transit/basic/AbstractNode.java @@ -1,8 +1,8 @@ -package net.corechg.transit.basic; +package net.cshift.transit.basic; import java.util.*; -import net.corechg.transit.network.system.*; +import net.cshift.transit.network.system.*; import net.minecraft.block.entity.*; public abstract class AbstractNode extends BlockEntity implements INode { @@ -42,4 +42,4 @@ public abstract class AbstractNode extends BlockEntity implements INode { return connections.size(); } -}
\ No newline at end of file +} diff --git a/src/main/java/net/corechg/transit/basic/AbstractProviderNode.java b/src/main/java/net/cshift/transit/basic/AbstractProviderNode.java index f57c397..cc81544 100644 --- a/src/main/java/net/corechg/transit/basic/AbstractProviderNode.java +++ b/src/main/java/net/cshift/transit/basic/AbstractProviderNode.java @@ -1,8 +1,8 @@ -package net.corechg.transit.basic; +package net.cshift.transit.basic; -import net.corechg.transit.network.system.Connection; -import net.corechg.transit.network.system.swap.*; -import net.minecraft.block.entity.BlockEntityType; +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 { @@ -44,4 +44,4 @@ public abstract class AbstractProviderNode extends AbstractNode implements IProv return false; } -}
\ No newline at end of file +} diff --git a/src/main/java/net/corechg/transit/basic/AbstractTwoWayNode.java b/src/main/java/net/cshift/transit/basic/AbstractTwoWayNode.java index 1fa90af..cc06eeb 100644 --- a/src/main/java/net/corechg/transit/basic/AbstractTwoWayNode.java +++ b/src/main/java/net/cshift/transit/basic/AbstractTwoWayNode.java @@ -1,8 +1,8 @@ -package net.corechg.transit.basic; +package net.cshift.transit.basic; -import net.corechg.transit.network.system.Connection; -import net.corechg.transit.network.system.swap.*; -import net.minecraft.block.entity.BlockEntityType; +import net.cshift.transit.network.system.*; +import net.cshift.transit.network.system.swap.*; +import net.minecraft.block.entity.*; public abstract class AbstractTwoWayNode extends AbstractAcceptorNode implements IProviderNode { @@ -44,4 +44,4 @@ public abstract class AbstractTwoWayNode extends AbstractAcceptorNode implements return false; } -}
\ No newline at end of file +} diff --git a/src/main/java/net/corechg/transit/basic/system/AbstractSystem.java b/src/main/java/net/cshift/transit/basic/system/AbstractSystem.java index 0d1c147..ef6254c 100644 --- a/src/main/java/net/corechg/transit/basic/system/AbstractSystem.java +++ b/src/main/java/net/cshift/transit/basic/system/AbstractSystem.java @@ -1,6 +1,6 @@ -package net.corechg.transit.basic.system; +package net.cshift.transit.basic.system; -import net.corechg.transit.network.system.*; +import net.cshift.transit.network.system.*; public abstract class AbstractSystem implements ISystem { @@ -10,4 +10,4 @@ public abstract class AbstractSystem implements ISystem { return null; } -}
\ No newline at end of file +} diff --git a/src/main/java/net/corechg/transit/basic/system/AbstractSystemNode.java b/src/main/java/net/cshift/transit/basic/system/AbstractSystemNode.java index 642b0e4..a246588 100644 --- a/src/main/java/net/corechg/transit/basic/system/AbstractSystemNode.java +++ b/src/main/java/net/cshift/transit/basic/system/AbstractSystemNode.java @@ -1,7 +1,7 @@ -package net.corechg.transit.basic.system; +package net.cshift.transit.basic.system; -import net.corechg.transit.basic.*; -import net.minecraft.block.entity.BlockEntityType; +import net.cshift.transit.basic.*; +import net.minecraft.block.entity.*; public abstract class AbstractSystemNode extends AbstractNode { @@ -9,4 +9,4 @@ public abstract class AbstractSystemNode extends AbstractNode { 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/cshift/transit/network/packet/IStaticPacket.java index 74d5110..bac8745 100644 --- a/src/main/java/net/corechg/transit/network/packet/IStaticPacket.java +++ b/src/main/java/net/cshift/transit/network/packet/IStaticPacket.java @@ -1,6 +1,6 @@ -package net.corechg.transit.network.packet; +package net.cshift.transit.network.packet; -import net.corechg.transit.type.Type; +import net.cshift.transit.type.*; /** Interface describing an unchanging packet. * @author Kyle Gunger @@ -20,4 +20,4 @@ public interface IStaticPacket<D> * @return IType<<D>> The type of the packet */ public Type<D> getType(); -}
\ No newline at end of file +} diff --git a/src/main/java/net/corechg/transit/network/packet/MetaPacket.java b/src/main/java/net/cshift/transit/network/packet/MetaPacket.java index e043aa1..99be83c 100644 --- a/src/main/java/net/corechg/transit/network/packet/MetaPacket.java +++ b/src/main/java/net/cshift/transit/network/packet/MetaPacket.java @@ -1,6 +1,6 @@ -package net.corechg.transit.network.packet; +package net.cshift.transit.network.packet; -import net.corechg.transit.type.Type; +import net.cshift.transit.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/cshift/transit/network/packet/StaticPacket.java index 2596a8f..7c95108 100644 --- a/src/main/java/net/corechg/transit/network/packet/StaticPacket.java +++ b/src/main/java/net/cshift/transit/network/packet/StaticPacket.java @@ -1,6 +1,6 @@ -package net.corechg.transit.network.packet; +package net.cshift.transit.network.packet; -import net.corechg.transit.type.Type; +import net.cshift.transit.type.*; /** Simple packet which stores an unchanging value. * @author Kyle Gunger @@ -33,4 +33,4 @@ public class StaticPacket<D> implements IStaticPacket<D> public Type<D> getType() { return type; } -}
\ No newline at end of file +} diff --git a/src/main/java/net/corechg/transit/network/packet/dynamic/DynamicPacket.java b/src/main/java/net/cshift/transit/network/packet/dynamic/DynamicPacket.java index 73f3669..d5feb92 100644 --- a/src/main/java/net/corechg/transit/network/packet/dynamic/DynamicPacket.java +++ b/src/main/java/net/cshift/transit/network/packet/dynamic/DynamicPacket.java @@ -1,10 +1,10 @@ -package net.corechg.transit.network.packet.dynamic; +package net.cshift.transit.network.packet.dynamic; -import net.corechg.transit.type.Type; +import net.cshift.transit.type.Type; /** * Simple packet which stores a fluid value. - * + * * @author Kyle Gunger * * @param <D> The data type (Object) that the packet transfers @@ -14,7 +14,7 @@ public class DynamicPacket<D> implements IDynamicPacket<D> { private Type<D> type; /** Constructor. Stores the given data and uses the given type. - * + * * @param dat The packet's data * @param t The packet's type */ @@ -40,4 +40,4 @@ public class DynamicPacket<D> implements IDynamicPacket<D> { public Type<D> getType() { return type; } -}
\ No newline at end of file +} diff --git a/src/main/java/net/corechg/transit/network/packet/dynamic/IDynamicPacket.java b/src/main/java/net/cshift/transit/network/packet/dynamic/IDynamicPacket.java index 6cf3018..ffb68a3 100644 --- a/src/main/java/net/corechg/transit/network/packet/dynamic/IDynamicPacket.java +++ b/src/main/java/net/cshift/transit/network/packet/dynamic/IDynamicPacket.java @@ -1,6 +1,6 @@ -package net.corechg.transit.network.packet.dynamic; +package net.cshift.transit.network.packet.dynamic; -import net.corechg.transit.network.packet.IStaticPacket; +import net.cshift.transit.network.packet.IStaticPacket; /** Interface describing a fluid packet. * @author Kyle Gunger @@ -9,8 +9,8 @@ import net.corechg.transit.network.packet.IStaticPacket; */ public interface IDynamicPacket<D> extends IStaticPacket<D>{ /**Set the packet's data. - * + * * @return <D> The packet's data */ public void setData(D dat); -}
\ No newline at end of file +} diff --git a/src/main/java/net/corechg/transit/network/packet/dynamic/MetaDynamicPacket.java b/src/main/java/net/cshift/transit/network/packet/dynamic/MetaDynamicPacket.java index 50418b9..9e7d293 100644 --- a/src/main/java/net/corechg/transit/network/packet/dynamic/MetaDynamicPacket.java +++ b/src/main/java/net/cshift/transit/network/packet/dynamic/MetaDynamicPacket.java @@ -1,6 +1,6 @@ -package net.corechg.transit.network.packet.dynamic; +package net.cshift.transit.network.packet.dynamic; -import net.corechg.transit.type.Type; +import net.cshift.transit.type.Type; /** Static packet with extra data attached. * @author Kyle Gunger @@ -13,7 +13,7 @@ public class MetaDynamicPacket<D, M> extends DynamicPacket<D> private M metaData; /** Constructor - * + * * @param dat The data to store * @param t The Type of the data * @param meta The metadata to store @@ -23,9 +23,9 @@ public class MetaDynamicPacket<D, M> extends DynamicPacket<D> super(dat, t); metaData = meta; } - + /** Get the metadata of the packet. - * + * * @return The packet's metadata */ public M getMetaData() @@ -34,7 +34,7 @@ public class MetaDynamicPacket<D, M> extends DynamicPacket<D> } /** Set the metadata of the packet. - * + * * @param meta The packet's new metadata */ public void setMetaData(M meta) diff --git a/src/main/java/net/corechg/transit/network/system/Connection.java b/src/main/java/net/cshift/transit/network/system/Connection.java index 5e34895..a111795 100644 --- a/src/main/java/net/corechg/transit/network/system/Connection.java +++ b/src/main/java/net/cshift/transit/network/system/Connection.java @@ -1,4 +1,4 @@ -package net.corechg.transit.network.system; +package net.cshift.transit.network.system; public class Connection { INode node; @@ -46,4 +46,4 @@ public class Connection { 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/cshift/transit/network/system/INode.java index 6be7d27..5c901a9 100644 --- a/src/main/java/net/corechg/transit/network/system/INode.java +++ b/src/main/java/net/cshift/transit/network/system/INode.java @@ -1,4 +1,4 @@ -package net.corechg.transit.network.system; +package net.cshift.transit.network.system; /** * @author Kyle Gunger @@ -6,32 +6,32 @@ package net.corechg.transit.network.system; */ public interface INode { - + /**Returns true if the group given is used by the node - * + * * @param groupID the group to querry * @return bool */ public boolean hasGroup(String groupID); - - + + /**Get the system managing the node or {@code null} if there isn't one - * + * * @return System */ public ISystem getSystem(); - - + + /** Get the data of one of the TypeGroups the Node supports - * + * * @param groupID * @return */ public Object getData(String groupID); - - + + /** Set the group data for the node - * + * * @param dat * @param groupID */ @@ -39,14 +39,14 @@ public interface INode /** Get the nodes that this node is connected to - * + * * @return Node[] */ public Connection[] getConnections(); /** Get the number of nodes that this node is connected to - * + * * @return int */ public int connectionCount(); diff --git a/src/main/java/net/corechg/transit/network/system/ISystem.java b/src/main/java/net/cshift/transit/network/system/ISystem.java index 693a3ed..9e01645 100644 --- a/src/main/java/net/corechg/transit/network/system/ISystem.java +++ b/src/main/java/net/cshift/transit/network/system/ISystem.java @@ -1,4 +1,4 @@ -package net.corechg.transit.network.system; +package net.cshift.transit.network.system; /** @@ -8,7 +8,7 @@ package net.corechg.transit.network.system; public interface ISystem { /**The nodes stored by the system - * + * * @return INode[] */ public INode[] getNodes(); diff --git a/src/main/java/net/corechg/transit/network/system/swap/IAcceptorNode.java b/src/main/java/net/cshift/transit/network/system/swap/IAcceptorNode.java index 5214d03..b64d4cc 100644 --- a/src/main/java/net/corechg/transit/network/system/swap/IAcceptorNode.java +++ b/src/main/java/net/cshift/transit/network/system/swap/IAcceptorNode.java @@ -1,7 +1,7 @@ -package net.corechg.transit.network.system.swap; +package net.cshift.transit.network.system.swap; -import net.corechg.transit.network.packet.IStaticPacket; -import net.corechg.transit.network.system.INode; +import net.cshift.transit.network.packet.IStaticPacket; +import net.cshift.transit.network.system.INode; /** * @author Kyle Gunger @@ -9,26 +9,26 @@ import net.corechg.transit.network.system.INode; */ public interface IAcceptorNode extends INode { - + /** Link another node as a provider - * + * * @param requester The object to be a provider * @param group * @return */ public boolean linkProvider(IProviderNode requestor, String group); - - + + /** Unlink a provider from the acceptor - * + * * @param requestor * @return */ public boolean unlinkProvider(IProviderNode requestor); - - + + /** Accept a packet from a provider - * + * * @param packet * @param group * @return diff --git a/src/main/java/net/corechg/transit/network/system/swap/IProviderNode.java b/src/main/java/net/cshift/transit/network/system/swap/IProviderNode.java index b40030e..5a3bd80 100644 --- a/src/main/java/net/corechg/transit/network/system/swap/IProviderNode.java +++ b/src/main/java/net/cshift/transit/network/system/swap/IProviderNode.java @@ -1,27 +1,27 @@ -package net.corechg.transit.network.system.swap; +package net.cshift.transit.network.system.swap; -import net.corechg.transit.network.system.INode; +import net.cshift.transit.network.system.INode; /** * @author Kyle Gunger * @apiNote A node which can provide packets of specific types */ public interface IProviderNode extends INode{ - + /** Link another node as an acceptor - * + * * @param requester The object requesting the Acceptor * @param group * @return boolean */ public boolean linkAcceptor(IAcceptorNode requestor, String group); - - + + /** Unlink a provider from the acceptor - * + * * @param requestor * @return */ public boolean unlinkAcceptor(IAcceptorNode requestor); - + } diff --git a/src/main/java/net/corechg/transit/type/TFluid.java b/src/main/java/net/cshift/transit/type/TFluid.java index 6886ab2..4f6b70f 100644 --- a/src/main/java/net/corechg/transit/type/TFluid.java +++ b/src/main/java/net/cshift/transit/type/TFluid.java @@ -1,4 +1,4 @@ -package net.corechg.transit.type; +package net.cshift.transit.type; import net.minecraft.fluid.Fluid; @@ -30,4 +30,4 @@ public class TFluid { public Number getMilliBuckets() { return millibuckets; } -}
\ No newline at end of file +} diff --git a/src/main/java/net/corechg/transit/type/TMana.java b/src/main/java/net/cshift/transit/type/TMana.java index 7a2e9f8..468b04f 100644 --- a/src/main/java/net/corechg/transit/type/TMana.java +++ b/src/main/java/net/cshift/transit/type/TMana.java @@ -1,4 +1,4 @@ -package net.corechg.transit.type; +package net.cshift.transit.type; /** Units of mana. * @author Kyle Gunger diff --git a/src/main/java/net/corechg/transit/type/Type.java b/src/main/java/net/cshift/transit/type/Type.java index 9fb79f5..46e2ace 100644 --- a/src/main/java/net/corechg/transit/type/Type.java +++ b/src/main/java/net/cshift/transit/type/Type.java @@ -1,6 +1,6 @@ -package net.corechg.transit.type; +package net.cshift.transit.type; -import net.corechg.transit.network.packet.*; +import net.cshift.transit.network.packet.*; /**@author Kyle Gunger * diff --git a/src/main/java/net/corechg/transit/type/group/GroupRegistry.java b/src/main/java/net/cshift/transit/type/group/GroupRegistry.java index d811770..f16f31a 100644 --- a/src/main/java/net/corechg/transit/type/group/GroupRegistry.java +++ b/src/main/java/net/cshift/transit/type/group/GroupRegistry.java @@ -1,11 +1,11 @@ -package net.corechg.transit.type.group; +package net.cshift.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.cshift.transit.type.Type; public final class GroupRegistry { private static final ArrayList<TypeGroup<?>> GROUPS = new ArrayList<TypeGroup<?>>(0); diff --git a/src/main/java/net/corechg/transit/type/group/TypeGroup.java b/src/main/java/net/cshift/transit/type/group/TypeGroup.java index eecf6d4..5b8f061 100644 --- a/src/main/java/net/corechg/transit/type/group/TypeGroup.java +++ b/src/main/java/net/cshift/transit/type/group/TypeGroup.java @@ -1,12 +1,12 @@ -package net.corechg.transit.type.group; +package net.cshift.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.cshift.transit.network.packet.*; +import net.cshift.transit.type.Type; /** * @author Kyle Gunger @@ -16,27 +16,27 @@ public class TypeGroup<B> { // The base Type (provides the group's identifier) private Type<B> baseType; - + // The list of types. private final ArrayList<Type<B>> TYPES = new ArrayList<Type<B>>(0); - + // Logger for events in the TypeGroup. private static final Logger LOG = LogManager.getFormatterLogger("Transit|Group"); - - + + public TypeGroup(Type<B> base) { baseType = base; addType(base); } - - + + // Type management - + /** Add a Type to the TypeGroup. * The Type must have a group-type combo not already found in this TypeGroup. * Returns {@code true} if the group was added. - * + * * @param type The Type to add * @return */ @@ -52,9 +52,9 @@ public class TypeGroup<B> LOG.info("Failed to add type " + type + " to group " + getGroup() + ". Was the type already added?"); return false; } - + /** Remove a Type from the TypeGroup. - * + * * @param type The Type to remove * @return */ @@ -64,19 +64,19 @@ public class TypeGroup<B> LOG.warn("[WARN] Failed to remove type " + type + " from group " + getGroup() + ". This is the base type and can not be removed."); return false; } - + if(TYPES.indexOf(type) != -1) { LOG.info("Removed type " + TYPES.remove(TYPES.indexOf(type)) + " from group " + getGroup()); return true; } - + LOG.warn("[WARN] Failed to remove type " + type + " from group " + getGroup() + ". Are we sure that the type was added to the group first?"); return false; } - + /** Remove a type from the group based on it's group-type identifier. - * + * * @param type * @return */ @@ -95,13 +95,13 @@ public class TypeGroup<B> return true; } } - + LOG.warn("[WARN] Failed to remove type " + groupID + ":" + typeID + " from group " + getGroup() + ". Are we sure that the type was added to the group first?"); return false; } - + /** Remove a type from the group based on it's group-type identifier. - * + * * @param type * @return */ @@ -109,12 +109,12 @@ public class TypeGroup<B> { return removeType(getGroup(), typeID); } - - + + // Check if a type is in the group - + /**Check if the type is in the group - * + * * @param type * @return boolean */ @@ -126,9 +126,9 @@ public class TypeGroup<B> } return false; } - + /**Check if the type is in the group - * + * * @param groupID * @param typeID * @return boolean @@ -141,9 +141,9 @@ public class TypeGroup<B> } return false; } - + /**Check if the type is in the group - * + * * @param typeID * @return boolean */ @@ -151,11 +151,11 @@ public class TypeGroup<B> { return isInGroup(getGroup(), typeID); } - + // Get a type in the group - + /**Get the type from the group - * + * * @param groupID The ID of the group the type is originally from * @param typeID The ID of the type * @return Type @@ -166,12 +166,12 @@ public class TypeGroup<B> { if(t.toString() == groupID + ":" + typeID) return t; } - + return null; } - + /**Get the type from the group - * + * * @param typeID The ID of the type * @return Type */ @@ -179,12 +179,12 @@ public class TypeGroup<B> { return getType(getGroup(), typeID); } - - + + // Type conversion - + /** Actually convert the packet - * + * * @param packet * @param type * @return @@ -193,9 +193,9 @@ public class TypeGroup<B> { return type.fromBase(packet.getType().toBase(packet, getGroup()), getGroup()); } - + /**Convert a packet to a new type Returns null if the type isn't in the group. - * + * * @param packet The packet to convert * @param type The type to convert to * @return Packet @@ -206,12 +206,12 @@ public class TypeGroup<B> { return convertPacketRaw(packet, type); } - + return null; } - + /**Convert a packet to a new type Returns null if the type isn't found. - * + * * @param packet The packet to convert * @param groupID The groupID of the Type to convert to * @param typeID The typeID of the Type to convert to @@ -224,12 +224,12 @@ public class TypeGroup<B> { return convertPacketRaw(packet, toType); } - + return null; } /**Convert a packet to a new type. Returns null if the type isn't found. - * + * * @param packet The packet to convert * @param typeID The typeID of the Type to convert to * @return Packet @@ -241,10 +241,10 @@ public class TypeGroup<B> { return convertPacketRaw(packet, toType); } - + return null; } - + /** The group identifier. Given by the Base Group * @return String */ diff --git a/src/main/java/net/corechg/transit/type/group/simple/SimpleGroups.java b/src/main/java/net/cshift/transit/type/group/simple/SimpleGroups.java index d45970d..24868e1 100644 --- a/src/main/java/net/corechg/transit/type/group/simple/SimpleGroups.java +++ b/src/main/java/net/cshift/transit/type/group/simple/SimpleGroups.java @@ -1,9 +1,9 @@ -package net.corechg.transit.type.group.simple; +package net.cshift.transit.type.group.simple; import net.minecraft.item.ItemStack; -import net.corechg.transit.type.group.*; -import net.corechg.transit.type.simple.SimpleTypes; -import net.corechg.transit.type.*; +import net.cshift.transit.type.group.*; +import net.cshift.transit.type.simple.SimpleTypes; +import net.cshift.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/cshift/transit/type/simple/SimpleTypes.java index f608bdd..4b231f3 100644 --- a/src/main/java/net/corechg/transit/type/simple/SimpleTypes.java +++ b/src/main/java/net/cshift/transit/type/simple/SimpleTypes.java @@ -1,7 +1,7 @@ -package net.corechg.transit.type.simple; +package net.cshift.transit.type.simple; import net.minecraft.item.ItemStack; -import net.corechg.transit.type.*; +import net.cshift.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 f3f38ce..dca6073 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,17 +1,17 @@ { "schemaVersion": 1, "id": "transit-api", - "version": "0.14.0", + "version": "0.15.0", "name": "Transit API", "description": "Move things about!", "authors": [ - "CCGKyle" + "CSKyle" ], "contact": { - "homepage": "https://github.corechg.net/", - "sources": "https://github.com/CoreChg/TransitAPI", - "issues": "https://github.com/CoreChg/TransitAPI/issues" + "homepage": "https://cshift.net/", + "sources": "https://github.com/CircleShift/TransitAPI", + "issues": "https://github.com/CircleShift/TransitAPI/issues" }, "license": "MIT", @@ -20,7 +20,7 @@ "environment": "*", "entrypoints": { "main": [ - "net.corechg.transit.Transit" + "net.cshift.transit.Transit" ] }, |