aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/net/GT_Packet_Pollution.java
diff options
context:
space:
mode:
authorKiwi <42833050+Kiwi233@users.noreply.github.com>2021-07-05 22:06:44 +0800
committerGitHub <noreply@github.com>2021-07-05 22:06:44 +0800
commit4eaefbb5455dc3402b43dcbf6cba208cea4e301a (patch)
treeb7e34b2e20af663cdd72c616fd7424301304e3e4 /src/main/java/gregtech/api/net/GT_Packet_Pollution.java
parent36406947fc5c0de1ee71da2644ec057b5fbc8d25 (diff)
parent703a8930bee25b1f908e9c4ea4f52cef24337d03 (diff)
downloadGT5-Unofficial-4eaefbb5455dc3402b43dcbf6cba208cea4e301a.tar.gz
GT5-Unofficial-4eaefbb5455dc3402b43dcbf6cba208cea4e301a.tar.bz2
GT5-Unofficial-4eaefbb5455dc3402b43dcbf6cba208cea4e301a.zip
Merge pull request #3 from GTNewHorizons/experimental
gregtech-5.09.35.00
Diffstat (limited to 'src/main/java/gregtech/api/net/GT_Packet_Pollution.java')
-rw-r--r--src/main/java/gregtech/api/net/GT_Packet_Pollution.java18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/main/java/gregtech/api/net/GT_Packet_Pollution.java b/src/main/java/gregtech/api/net/GT_Packet_Pollution.java
index 7f717c1a47..20efe41679 100644
--- a/src/main/java/gregtech/api/net/GT_Packet_Pollution.java
+++ b/src/main/java/gregtech/api/net/GT_Packet_Pollution.java
@@ -2,12 +2,11 @@ package gregtech.api.net;
import com.google.common.io.ByteArrayDataInput;
import gregtech.common.GT_Client;
+import io.netty.buffer.ByteBuf;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.IBlockAccess;
-import java.nio.ByteBuffer;
-
-public class GT_Packet_Pollution extends GT_Packet {
+public class GT_Packet_Pollution extends GT_Packet_New {
private ChunkCoordIntPair chunk;
private int pollution;
@@ -22,17 +21,12 @@ public class GT_Packet_Pollution extends GT_Packet {
}
@Override
- public byte[] encode() {
- return ByteBuffer
- .allocate(12)
- .putInt(chunk.chunkXPos)
- .putInt(chunk.chunkZPos)
- .putInt(pollution)
- .array();
+ public void encode(ByteBuf aOut) {
+ aOut.writeInt(chunk.chunkXPos).writeInt(chunk.chunkZPos).writeInt(pollution);
}
@Override
- public GT_Packet decode(ByteArrayDataInput aData) {
+ public GT_Packet_New decode(ByteArrayDataInput aData) {
return new GT_Packet_Pollution(
new ChunkCoordIntPair(aData.readInt(), aData.readInt()),
aData.readInt()
@@ -48,4 +42,4 @@ public class GT_Packet_Pollution extends GT_Packet {
public byte getPacketID() {
return 4;
}
-} \ No newline at end of file
+}