package net.divinerpg.network;
public class MessageDivineAccumulator
implements IMessage {
private float x;
private float y;
private float z;
public MessageDivineAccumulator() {
}
public MessageDivineAccumulator(double x, double y, double z) {
this.x = x;
this.y = y;
this.z = z;
}
public void toBytes(ByteBuf buf) {
buf.writeFloat(this.x);
buf.writeFloat(this.y);
buf.writeFloat(this.z);
}
public void fromBytes(ByteBuf buf) {
this.x = buf.readFloat();
this.y = buf.readFloat();
this.z = buf.readFloat();
}
public static class Handler
implements IMessageHandler<MessageDivineAccumulator, IMessage> {
public IMessage onMessage(MessageDivineAccumulator msg, MessageContext ctx) {
for (float r = 0.0; r < 4.0; r += 0.1) {
for (float theta = 0.0; theta < 6.283185307179586; theta += 0.1308996938995747) {
DivineRPG.proxy.spawnParticle(null, msg.x + r * Math.cos(theta), msg.y, msg.z + r * Math.sin(theta), "eden", true);
}
}
return null;
}
}
}