aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main/java/moe/ymc/acron/net/ClientConfiguration.java
blob: 450ccd427aa95deb04925942ee9856ee7411baee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package moe.ymc.acron.net;

import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.Vec2f;
import net.minecraft.util.math.Vec3d;
import org.jetbrains.annotations.NotNull;

public record ClientConfiguration(@NotNull Vec3d pos,
                                  @NotNull Vec2f rot,
                                  @NotNull ServerWorld world,
                                  @NotNull String name) {
    public ClientConfiguration(@NotNull ServerWorld world,
                               @NotNull String name) {
        // Rcon defaults. @see RconCommandOutput
        this(Vec3d.of(world.getSpawnPos()),
                Vec2f.ZERO,
                world,
                name);
    }
}