diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2019-11-20 12:45:16 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2019-11-20 12:45:16 -0500 |
commit | df044930bca4252ff6e4814c654a612c6aee2136 (patch) | |
tree | 906eddbbfdecb63e3525657cd4e6f75c8ba91bc3 /src/main/java/net/transit/network/packet/MetaPacket.java | |
parent | ebc33c58c8a3669822a0dba99cbfe8a451782813 (diff) |
[0.1.7 REWRITE] Codebase overhaul.
~ Codebase split into two sub-packages
~ net.transit.network for transfering between objects
~ net.transit.type for type registering and conversion
+ Added new interfaces (INode and ISystem)
+ More documentation
+ (Kinda) Working build
- Removed unnessairy interfaces (IGenerator and IConsumer)
- Removed base types
~ Restructured type system
Diffstat (limited to 'src/main/java/net/transit/network/packet/MetaPacket.java')
-rw-r--r-- | src/main/java/net/transit/network/packet/MetaPacket.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/net/transit/network/packet/MetaPacket.java b/src/main/java/net/transit/network/packet/MetaPacket.java new file mode 100644 index 0000000..e4cffdf --- /dev/null +++ b/src/main/java/net/transit/network/packet/MetaPacket.java @@ -0,0 +1,33 @@ +package net.transit.network.packet; + +import net.transit.type.Type; + +public class MetaPacket<D, M> implements IPacket<D> +{ + + private D data; + private M metaData; + private Type<D> type; + + public MetaPacket(D dat, Type<D> t, M meta) + { + data = dat; + type = t; + metaData = meta; + } + + public D getData() + { + return data; + } + + public M getMetaData() + { + return metaData; + } + + @Override + public Type<D> getType() { + return type; + } +} |