Create a new mob with existing Vanilla models.

Discussion in 'Plugin Development' started by Jamboozlez, Apr 5, 2013.

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

    Jamboozlez

    Hello guys.
    What I'm trying to do is create a plugin which adds more advanced villagers to the game. My task here is to use the existing player model from Vanilla Minecraft, and then add more functionality to the 'players' like building houses and mining. Then villagers can spawn naturally in the world.

    Basically, what I need you guys to help me with, is how can I create a new class with the 'villagers' functionality that links to the Vanilla player model, and how can I make villagers spawn in groups naturally, but rarely.
     
  2. Offline

    AidoP

    Im not going to give you code (As this is EXTREMELY difficult for a plugin and I dont have any. So expect to take time...). First you would spawn the packet. Then you would have an AI controlling the packet. Lastly you would make interaction events on the players side (
    Code:
    onPlayerInteract(sender)
    ). Otherwise it wouldn't work very well...
     
  3. Offline

    Cirno

    Take a look at the Citizen source code for how to spawn the players in. Other then that, you'll probably be working heavily with Packets and NMS code.
     
    Jamboozlez likes this.
  4. Offline

    Codisimus

    Sounds like quite a bit of AI involved. good luck coding that.
     
    Jamboozlez likes this.
  5. Offline

    Jamboozlez

    AidoP I do understand that this would probably take a long time to make, but I will try to put as much time and effort into this as possible! ;)

    Cirno I didn't actually realise that the source code is available for this. I will take a look at that now! Thanks :D

    Codisimus Thanks :)
     
  6. Offline

    oscarshi1995

    if you have never made a plugin before this is probably not the best place to start... unless of course if you have previous experience
     
  7. Offline

    Hoolean

    Looks like this library would make your life a bit easier
     
    Jamboozlez likes this.
  8. Offline

    Jamboozlez

    oscarshi1995 I followed the tutorial on the Wiki to make some simple commands, do you recommend me doing anything else first too?

    Wow, thanks! I will have a look at this now ;)

    EDIT: I've had a look at the RemoteEntities library, it works great! Thanks MrBluebear3
     
  9. Offline

    AstramG

    Well if you only made simple commands, I don't think you should be coding a whole AI yet.
     
  10. Offline

    Jogy34

    The AI might be kind of hard to work out but creating the model based off of a villager isn't hard at all. Here's a basic tutorial for what you want to do it is fairly outdated though so I would recommend looking at his code too:

    Tutorial | Code

    That isn't in any way my code but I have worked with stuff like that before so if you are having trouble with creating it then I can help you there. I probably can't help you with the AI though.
     
  11. Offline

    devilquak

    Jamboozlez

    Everything you want to do is something that Citizens 2/Denizens does already. Sorry if I'm a party popper, but there's no point in trying to recreate the wheel, especially when this wheel is really more complicated than most developers would like to admit. Take a look at the Citizens 2 Github repo just to see how complicated it is.

    When I first started making plugins, I wanted to do exactly this. I tried for a few days, but after I saw how incredibly complex it was just to spawn a simple human entity that just stood in one place and did nothing, not even being saved so it would reappear after a restart, it nearly gave me a heart attack. AidoP and many other people in this thread are vastly underestimating how difficult it is. I really don't mean to put you down, but don't get your hopes up about making this on your own anytime soon.
     
  12. Offline

    Jamboozlez

    Jogy34 I've had a look at this before. I don't think it suits my needs though as it changes a mob that spawns into my custom mob, not spawn them itself. So in my case it would be spawning my custom villagers in a normal village. I guess I could use this as a sort of last resort if I can't make my own sort of spawning creatures code, but thanks for your help.

    devilquak As I said in a previous post, I am willing to put in as much time is this project needs to get finished. Also, I do understand that other plugins are out there such as Citizens 2, but I would like to create something for myself (like a personal accomplishment). Also, just because other people have the same sort of plugins, that doesn't mean I can't make one. If that was the case, how would there be all of the different permissions plugins?

    EDIT: How is AdioP underestimating this? He said, and I quote
     
  13. Offline

    Pim1234

    devilquak Also, just because other people have the same sort of plugins, that doesn't mean I can't make one. If that was the case, how would there be all of the different permissions plugins?[/quote]

    Well, it IS rather annoying that there are many plugins that do exactly the same thing...
     
  14. Offline

    Deckerz

    Why is the bump needed?
     
Thread Status:
Not open for further replies.

Share This Page