mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 02:15:11 +00:00
Add all Client Packets
This commit is contained in:
1 parent
ec133ce74c
commit
8a2a3e1ac3
63 files changed
+2678
-1
No files matched your search
@@ -0,0 +1,40 @@
|
||||
package kamkeel.network.packets.client;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import kamkeel.network.AbstractPacket;
|
||||
import kamkeel.network.PacketChannel;
|
||||
import kamkeel.network.PacketHandler;
|
||||
import kamkeel.network.enums.EnumClientPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.Server;
|
||||
import noppes.npcs.controllers.SyncController;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public final class SyncConfigPacket extends AbstractPacket {
|
||||
public static final String packetName = "Client|SyncConfig";
|
||||
|
||||
public SyncConfigPacket() {}
|
||||
|
||||
@Override
|
||||
public Enum getType() {
|
||||
return EnumClientPacket.SYNC_CONFIG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketChannel getChannel() {
|
||||
return PacketHandler.CLIENT_PACKET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendData(ByteBuf out) throws IOException {
|
||||
// TODO: Send Packet
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveData(ByteBuf in, EntityPlayer player) throws IOException {
|
||||
NBTTagCompound configNBT = Server.readNBT(in);
|
||||
SyncController.receiveConfigs(configNBT);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user