aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/net/GT_Packet.java
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-05-30 20:40:52 +0200
committerGitHub <noreply@github.com>2021-05-30 20:40:52 +0200
commit3c8c3b4ca647e219a49c96a1775456967fb07501 (patch)
tree32203c1e7fb3bbd14b8337aab24a912f4181a1c6 /src/main/java/gregtech/api/net/GT_Packet.java
parent12582fb1cec74a5d05a1adfedc1eb04e4f7409c1 (diff)
parentec47d0dfccbdf56a802a3a382a0513d643c708a4 (diff)
downloadGT5-Unofficial-3c8c3b4ca647e219a49c96a1775456967fb07501.tar.gz
GT5-Unofficial-3c8c3b4ca647e219a49c96a1775456967fb07501.tar.bz2
GT5-Unofficial-3c8c3b4ca647e219a49c96a1775456967fb07501.zip
Merge pull request #549 from GTNewHorizons/client-preference
Allow client send preference to server
Diffstat (limited to 'src/main/java/gregtech/api/net/GT_Packet.java')
-rw-r--r--src/main/java/gregtech/api/net/GT_Packet.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/net/GT_Packet.java b/src/main/java/gregtech/api/net/GT_Packet.java
index 4bf435ca0c..48cc171d61 100644
--- a/src/main/java/gregtech/api/net/GT_Packet.java
+++ b/src/main/java/gregtech/api/net/GT_Packet.java
@@ -2,6 +2,7 @@ package gregtech.api.net;
import com.google.common.io.ByteArrayDataInput;
import io.netty.buffer.ByteBuf;
+import net.minecraft.network.INetHandler;
import net.minecraft.world.IBlockAccess;
/**
@@ -46,4 +47,9 @@ public abstract class GT_Packet {
* @param aWorld null if message is received on server side, the client world if message is received on client side
*/
public abstract void process(IBlockAccess aWorld);
+
+ /**
+ * This will be called just before {@link #process(IBlockAccess)} to inform the handler about the source and type of connection
+ */
+ public void setINetHandler(INetHandler aHandler) {}
}