35 lines
678 B
Java
35 lines
678 B
Java
![]() |
package game.packet;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
|
||
|
import game.network.ClientPlayer;
|
||
|
import game.network.Packet;
|
||
|
import game.network.PacketBuffer;
|
||
|
|
||
|
public class SPacketServerTick implements Packet<ClientPlayer> {
|
||
|
private int time;
|
||
|
|
||
|
public SPacketServerTick() {
|
||
|
}
|
||
|
|
||
|
public SPacketServerTick(int time) {
|
||
|
this.time = time;
|
||
|
}
|
||
|
|
||
|
public void readPacketData(PacketBuffer buf) throws IOException {
|
||
|
this.time = buf.readInt();
|
||
|
}
|
||
|
|
||
|
public void writePacketData(PacketBuffer buf) throws IOException {
|
||
|
buf.writeInt(this.time);
|
||
|
}
|
||
|
|
||
|
public void processPacket(ClientPlayer handler) {
|
||
|
handler.handleServerTick(this);
|
||
|
}
|
||
|
|
||
|
public int getTime() {
|
||
|
return this.time;
|
||
|
}
|
||
|
}
|