[Lib] [1.7.10] NPCFactory v1.4 - Create walking npcs with custom names and skins!

Discussion in 'Resources' started by lenis0012, May 26, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    Amazing. Definitely will use it in my plugins. :)
    lenis0012 likes this.
  2. Offline


    Will this work for 1.7.2 or only 1.7.9?
  3. Offline


    only 1.7.9
  4. Offline


    If you remove NPCProfile and change the NPCEntity constructor to use a clean name it works with 1.7.2
  5. Offline


    it's a new feature in 1.7.9, you know that yourself too. Please don't act like you are the one who made the whole system, Mojang did ;)
  6. Offline


    You may not understand that it was a joke.
    But I was first to use game profiles properly.
  7. Offline


  8. Offline


    How can I prevent the NPC's from being pushed around by players?
  9. Offline


    Good one, forgot to implement that after adding velocity fixes
  10. lenis0012 great job :) can we include this in our plugin? should we give credit ?

    RealDope I think you can override the collide method (?)
  11. Offline


    I would overide g(double, double, double)
    Credit would be nice, check our license: https://github.com/lenis0012/NPCFactory/blob/master/LICENSE

    Released v1.3
    • Fixed NPCInteractEvent
    • Added gravity
    • Added equipment methods
    • Changed NPC to an interface
    • Changed target to Entity intead of LivingEntity (thx DoctorDark)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 8, 2016
    Someone_Like_You likes this.
  12. Offline


    lenis0012 Can we make the NPC look like a villager rather than a human player?

    Also I'm not particularly familiar with this stuff, could you provide an example as to how to override g other than:

    2. @Override
    3. public void g(double x, double y, double z) {
    5. }
  13. Offline

    Deleted user

    This may or may not be me, but I found an issue when trying to spawn an NPC with the same username and skin name as a player who has already joined (but not online) the server. It'll use the player's UUID from the player file, not the actual UUID, and then throw an exception when it tries to connect to Mojang's sessionserver.

    Is there something I'm doing wrong?
  14. Offline


    RealDope That is how you do it actualy.

    zombiekiller753 My latest versions are having some tiny problems.
    I will look at it tomorrow for you
  15. Offline


    And in regards to making the NPC look like a villager?
  16. Offline

    Deleted user

  17. Offline


    Villagers and players have different models; they look different in more ways than just skin.
  18. Offline

    Deleted user

    Why not just spawn in a villager then?
  19. Offline


    any plugins using this? be interesting to see :)
  20. Offline


    I would just make a villager npc then.
    Make NPCEntity extend EntityVillager.

    Or manipulate the spawn packet.

    TeamJesus I will make one soon

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 8, 2016
  21. Offline


    You might want to update the readme, the code looks like it's pulling data directly from Mojang, not SwordPVP (since, well, it's dead).
  22. Offline


    Will do
  23. Offline


    Does v1.3 fix the "not being effected by momentum" thing?
  24. Offline


    Awesome work here, trying to use this and works great so far :)

    Just one question though, are there any efficient ways to block the NPC from getting pushed around or do I need to do this myself?
  25. Offline


    I think ive read through this thoroughly, is it possible to make the NPC attack based on it's weapon?
  26. Offline


    ThatUltraSeal You could try something like:
    1. NPC npc = getNpcInstance;
    2. if (npc.getEquipment(EquipmentSlot.HAND).equals(new ItemStack(Material.DIAMOND_SWORD)))
    3. npc.playAnimation(NPCAnimation.SWING_ARM);
    4. }
  27. Offline


    lenis0012 I am currently having issues using they NPC events, it seems that not being called, i have not modified the code.

    Edit: Apparently being Invulnerable makes the Interact event not run
  28. Offline


    DoctorDark npc.getEquipment(EquipmentSlot.HAND).getType() == Material.DIAMOND_SWORD
    DoctorDark likes this.
  29. Offline


    Having problems compiling it in Eclipse as an API.

    I can't depend the API, the API is known as 'unknown'.
  30. Offline


    Clone the code form github and add it manually.

    But the interact event is being buggy anyway
Thread Status:
Not open for further replies.

Share This Page