com.github.isaichkindanila.g.net.client.entities.Entity Maven / Gradle / Ivy
package com.github.isaichkindanila.g.net.client.entities;
import com.github.isaichkindanila.g.net.client.util.Vector;
import lombok.Getter;
import lombok.ToString;
import org.jetbrains.annotations.NotNull;
import java.io.DataInput;
import java.io.IOException;
@Getter
@ToString
public abstract class Entity {
private final int id;
private final double radius;
private final @NotNull Vector position;
private final @NotNull Vector velocity;
public Entity(DataInput input) throws IOException {
id = input.readInt();
radius = input.readDouble();
position = new Vector(input);
velocity = new Vector(input);
}
}