Skip to content

Instantly share code, notes, and snippets.

Created March 27, 2016 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/b346dd147aedde0ef271 to your computer and use it in GitHub Desktop.
Save anonymous/b346dd147aedde0ef271 to your computer and use it in GitHub Desktop.
package com.koopamillion.Main;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import io.netty.buffer.ByteBuf;
public class JetpackMessage implements IMessage{
public String keyPressed;
public JetpackMessage(String b) {
this.keyPressed = b;
}
@Override
public void fromBytes(ByteBuf buf) {
keyPressed = ByteBufUtils.readUTF8String(buf);
}
@Override
public void toBytes(ByteBuf buf) {
ByteBufUtils.writeUTF8String(buf, keyPressed);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment