Code:java package de.npc.npcproject; import com.mojang.authlib.GameProfile;import net.minecraft.network.Connection;import net.minecraft.network.protocol.login.ClientboundHelloPacket;import net.minecraft.resources.ResourceKey;import net.minecraft.server.MinecraftServer;import net.minecraft.server.level.ClientInformation;import net.minecraft.server.level.ServerLevel;import net.minecraft.server.level.ServerPlayer;import net.minecraft.server.network.ServerGamePacketListenerImpl;import net.minecraft.world.entity.HumanoidArm;import net.minecraft.world.entity.player.ChatVisiblity;import net.minecraft.world.level.Level;import net.minecraft.world.phys.Vec3;import org.bukkit.Bukkit;import org.bukkit.craftbukkit.entity.CraftPlayer;import org.bukkit.entity.Player;import net.minecraft.network.protocol.game.*; import java.util.*; public class NPC2 { private static final List<ServerPlayer> NPC_LIST = new ArrayList<>(); public NPC2(Player player) { CraftPlayer craftPlayer = (CraftPlayer) player; ServerPlayer serverPlayer = craftPlayer.getHandle(); MinecraftServer minecraftServer = serverPlayer.getServer(); ServerLevel serverLevel = serverPlayer.serverLevel(); GameProfile gameProfile = new GameProfile(UUID.randomUUID(), "Billy Bob"); // ClientInformation setup (Language, Chat Visibility, etc.) ClientInformation clientInfo = new ClientInformation( "en_us", 10, ChatVisiblity.FULL, true, 0, HumanoidArm.RIGHT, false, true ); // Create NPC ServerPlayer with new ClientInformation ServerPlayer npc = new ServerPlayer(minecraftServer, serverLevel, gameProfile, clientInfo); // Set a dummy connection for the NPC Connection connection = new Connection(null); npc.connection = new DummyConnection(minecraftServer, connection, npc); // Set NPC location based on the player's location npc.moveTo( player.getLocation().getX(), player.getLocation().getY(), player.getLocation().getZ(), player.getLocation().getYaw(), player.getLocation().getPitch() ); // Add NPC to the world serverLevel.addNewPlayer(npc); // Send packets to all players to make the NPC visible addNPCPacket(npc); // Add the NPC to the list NPC_LIST.add(npc); } public static void addNPCPacket(ServerPlayer npc) { for (Player onlinePlayer : Bukkit.getOnlinePlayers()) { CraftPlayer craftPlayer = (CraftPlayer) onlinePlayer; ServerPlayer serverPlayer = craftPlayer.getHandle(); ServerGamePacketListenerImpl connection = serverPlayer.connection; if (connection != null && serverPlayer != npc) { // Send player info packets to make the NPC visible connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, npc)); connection.send(new ClientboundAnimatePacket(npc, 1)); // Simulate animation connection.send(new ClientboundRotateHeadPacket(npc, (byte) (npc.getYHeadRot() * 256 / 360))); connection.send(new ClientboundSetEntityDataPacket(npc.getId(), npc.getEntityData().getNonDefaultValues())); // Define last NPC position for movement updates double lastX = npc.getX(); double lastY = npc.getY(); double lastZ = npc.getZ(); // Calculate delta values for the next movement short deltaX = (short) ((npc.getX() - lastX) * 32); short deltaY = (short) ((npc.getY() - lastY) * 32); short deltaZ = (short) ((npc.getZ() - lastZ) * 32); byte yaw = (byte) ((npc.getYRot() * 256.0F) / 360.0F); byte pitch = (byte) ((npc.getXRot() * 256.0F) / 360.0F); boolean onGround = npc.getY() % 1 == 0; // Check if NPC stands on a full block height // Send movement and teleport packets connection.send(new ClientboundMoveEntityPacket.PosRot(npc.getId(), deltaX, deltaY, deltaZ, yaw, pitch, onGround)); connection.send(new ClientboundTeleportEntityPacket(npc)); // Add NPC to the server (alternative method for Minecraft 1.21) } } } Hi, I need help creating an NPC using NMS paper, and the Minecraft version is 1.21.1. The NPC spawns, but it is invisible. EDIT by Moderator: merged posts, please use the edit button instead of double posting.