tcr/java/src/game/packet/SPacketServerTick.java
2025-05-01 15:13:38 +02:00

34 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;
}
}