Skip to content

Instantly share code, notes, and snippets.

Created Mar 28, 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 static int i;
public JetpackMessage() {}
public JetpackMessage(int i) {
this.i = i;
}
@Override
public void fromBytes(ByteBuf buf) {
i = buf.readInt();
}
@Override
public void toBytes(ByteBuf buf) {
buf.writeInt(i);
}
public static final void sendToServer(IMessage message) {
MainRegistry.network.sendToServer(message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment