summaryrefslogtreecommitdiff
path: root/src/main/java/net/cshift/transit/network/packet
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-11-14 17:09:23 -0500
committerKyle Gunger <kgunger12@gmail.com>2023-11-14 17:09:23 -0500
commitd1680864edfbc7cec0e6decf1e3a2b30f120aa0e (patch)
treeb47154132e9f3212cc8ed4457e5d4dafee6f1124 /src/main/java/net/cshift/transit/network/packet
parent80fe25bcb811508a5fe826c37513a8a63239cb55 (diff)
Update to 1.20.2
Diffstat (limited to 'src/main/java/net/cshift/transit/network/packet')
-rw-r--r--src/main/java/net/cshift/transit/network/packet/DynamicPacket.java43
-rw-r--r--src/main/java/net/cshift/transit/network/packet/IDynamicPacket.java14
-rw-r--r--src/main/java/net/cshift/transit/network/packet/IStaticPacket.java23
-rw-r--r--src/main/java/net/cshift/transit/network/packet/MetaDynamicPacket.java44
-rw-r--r--src/main/java/net/cshift/transit/network/packet/MetaPacket.java35
-rw-r--r--src/main/java/net/cshift/transit/network/packet/StaticPacket.java36
6 files changed, 0 insertions, 195 deletions
diff --git a/src/main/java/net/cshift/transit/network/packet/DynamicPacket.java b/src/main/java/net/cshift/transit/network/packet/DynamicPacket.java
deleted file mode 100644
index 60ad177..0000000
--- a/src/main/java/net/cshift/transit/network/packet/DynamicPacket.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package net.cshift.transit.network.packet;
-
-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
- */
-public class DynamicPacket<D> implements IDynamicPacket<D> {
- private D data;
- 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
- */
- public DynamicPacket(D dat, Type<D> t)
- {
- data = dat;
- type = t;
- }
-
- @Override
- public D getData()
- {
- return data;
- }
-
- @Override
- public void setData(D dat)
- {
- data = dat;
- }
-
- @Override
- public Type<D> getType() {
- return type;
- }
-}
diff --git a/src/main/java/net/cshift/transit/network/packet/IDynamicPacket.java b/src/main/java/net/cshift/transit/network/packet/IDynamicPacket.java
deleted file mode 100644
index 8b7c330..0000000
--- a/src/main/java/net/cshift/transit/network/packet/IDynamicPacket.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package net.cshift.transit.network.packet;
-
-/** Interface describing a fluid packet.
- * @author Kyle Gunger
- *
- * @param <D> The data type (Object) that the packet transfers
- */
-public interface IDynamicPacket<D> extends IStaticPacket<D>{
- /**Set the packet's data.
- *
- * @return <D> The packet's data
- */
- public void setData(D dat);
-}
diff --git a/src/main/java/net/cshift/transit/network/packet/IStaticPacket.java b/src/main/java/net/cshift/transit/network/packet/IStaticPacket.java
deleted file mode 100644
index bac8745..0000000
--- a/src/main/java/net/cshift/transit/network/packet/IStaticPacket.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package net.cshift.transit.network.packet;
-
-import net.cshift.transit.type.*;
-
-/** Interface describing an unchanging packet.
- * @author Kyle Gunger
- *
- * @param <D> The data type (Object) that the packet transfers.
- */
-public interface IStaticPacket<D>
-{
- /**Get the packet's data.
- *
- * @return <D> The packet's data
- */
- public D getData();
-
- /**Get the packet's type.
- *
- * @return IType<<D>> The type of the packet
- */
- public Type<D> getType();
-}
diff --git a/src/main/java/net/cshift/transit/network/packet/MetaDynamicPacket.java b/src/main/java/net/cshift/transit/network/packet/MetaDynamicPacket.java
deleted file mode 100644
index b87c2ed..0000000
--- a/src/main/java/net/cshift/transit/network/packet/MetaDynamicPacket.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package net.cshift.transit.network.packet;
-
-import net.cshift.transit.type.Type;
-
-/** Static packet with extra data attached.
- * @author Kyle Gunger
- *
- * @param <D> The data type (Object) that the packet transfers
- * @param <M> The type of metadata
-*/
-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
- */
- public MetaDynamicPacket(D dat, Type<D> t, M meta)
- {
- super(dat, t);
- metaData = meta;
- }
-
- /** Get the metadata of the packet.
- *
- * @return The packet's metadata
- */
- public M getMetaData()
- {
- return metaData;
- }
-
- /** Set the metadata of the packet.
- *
- * @param meta The packet's new metadata
- */
- public void setMetaData(M meta)
- {
- metaData = meta;
- }
-}
diff --git a/src/main/java/net/cshift/transit/network/packet/MetaPacket.java b/src/main/java/net/cshift/transit/network/packet/MetaPacket.java
deleted file mode 100644
index 99be83c..0000000
--- a/src/main/java/net/cshift/transit/network/packet/MetaPacket.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package net.cshift.transit.network.packet;
-
-import net.cshift.transit.type.*;
-
-/** Static packet with extra data attached.
- * @author Kyle Gunger
- *
- * @param <D> The data type (Object) that the packet transfers
- * @param <M> The type of metadata
-*/
-public class MetaPacket<D, M> extends StaticPacket<D>
-{
- private M metaData;
-
- /** Constructor
- *
- * @param dat The data to store
- * @param t The Type of the data
- * @param meta The metadata to store
- */
- public MetaPacket(D dat, Type<D> t, M meta)
- {
- super(dat, t);
- metaData = meta;
- }
-
- /** Get the metadata of the packet.
- *
- * @return The packet's metadata
- */
- public M getMetaData()
- {
- return metaData;
- }
-}
diff --git a/src/main/java/net/cshift/transit/network/packet/StaticPacket.java b/src/main/java/net/cshift/transit/network/packet/StaticPacket.java
deleted file mode 100644
index 7c95108..0000000
--- a/src/main/java/net/cshift/transit/network/packet/StaticPacket.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package net.cshift.transit.network.packet;
-
-import net.cshift.transit.type.*;
-
-/** Simple packet which stores an unchanging value.
- * @author Kyle Gunger
- *
- * @param <D> The data type (Object) that the packet transfers.
- */
-public class StaticPacket<D> implements IStaticPacket<D>
-{
- private D data;
- 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
- */
- public StaticPacket(D dat, Type<D> t)
- {
- data = dat;
- type = t;
- }
-
- @Override
- public D getData()
- {
- return data;
- }
-
- @Override
- public Type<D> getType() {
- return type;
- }
-}