Solved Fake Player NPC. Overlay Texture Missing.

Discussion in 'Plugin Development' started by DanielTheDev, Mar 25, 2018.

Thread Status:
Not open for further replies.
  1. I created a npc but when I spawn it, The overlay texture will not submit.
    So only the main texture will load.

    Code:
                            GameProfile profile = ((CraftPlayer)player).getProfile();
    
                            MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
    
                            WorldServer world = ((CraftWorld)player.getWorld()).getHandle();
    
    
                            EntityPlayer npc = new EntityPlayer(server, world, profile, new PlayerInteractManager(world));
                            npc.setLocation(player.getLocation().getX(), player.getLocation().getY(), player.getLocation().getZ(), 0 , 0);
    
                            PlayerConnection connection = ((CraftPlayer)player).getHandle().playerConnection;
                            connection.sendPacket(new PacketPlayOutNamedEntitySpawn(npc));
    //EDIT


    I found a new way of doing it by editing the gameprofile with signature + value.
    this.gameprofile.getProperties().put("textures", new Property("textures", value, signature));
     
    Last edited: Mar 25, 2018
Thread Status:
Not open for further replies.

Share This Page