Skip to content

Instantly share code, notes, and snippets.

Created Mar 27, 2016
Embed
What would you like to do?
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