-
-
Save anonymous/b346dd147aedde0ef271 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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