tcr/java/src/game/packet/SPacketServerTick.java

35 lines
678 B
Java
Raw Normal View History

2025-05-01 15:13:38 +02:00
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;
}
}