Volver al índice

src/main/java/ar/com/companeros/body/AgentPlayer.java

package ar.com.companeros.body;

import com.mojang.authlib.GameProfile;
import java.util.UUID;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;

/** Cuerpo inicial de un agente: inventario, hambre, daño y capacidades de jugador vanilla. */
public final class AgentPlayer extends ServerPlayer {
    public AgentPlayer(MinecraftServer server, ServerLevel level, UUID id, String name) {
        super(server, level, new GameProfile(id, name));
        // Mostrar las capas de la skin: pelo, mangas, chaqueta y pantalones.
        getEntityData().set(DATA_PLAYER_MODE_CUSTOMISATION, (byte) 0x7F);
    }
}