[LIB] [1.7] Remote entities - Next generation NPC library [No support]

Discussion in 'Resources' started by kumpelblase2, Nov 10, 2012.

Thread Status:
Not open for further replies.
  1. AmoebaMan Tested again today. Works fine for me. Like I mentioned earlier, did you try changing the location to something else than the bedspawn position?

    Jenkins can now be found at: http://mineblown.com:8080/job/RemoteEntities/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  2. Offline

    AmoebaMan

    Sorry, that's not flexible enough for my purposes. The killing I'm referring to isn't by players, it's by exposure (hypo-/hyper-thermia).

    I'll try it again.

    By the way, I see you recently added the ability to put players in beds...what a considerate developer. :D
     
  3. I'm doing my best to implement all suggestions. However, free time is - sadly - limited.
     
  4. Offline

    AmoebaMan

    @kumpelblase

    1) What is the name of the desire for sleeping in beds?
    2) Potentially add the ability to force a RemotePlayer to switch stances (stand, crouch, sit, laying down, etc.)?
     
  5. 1) DesireGoToBed
    2) Probably yeah.
     
  6. Offline

    AmoebaMan

    kumpelblase2 Also, large priority number = high priority?
     
  7. yep.

    I don't know why I didn't mention it here yet, but there's a discussion going on about how to implement persistence here properly. There are already some ideas on how this might work, but since you are the ones who are going to use it, it would be nice if you participate in it.
    https://github.com/kumpelblase2/Remote-Entities/issues/27
    Thanks.

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

    AmoebaMan

    Yeah, I actually checked it out because persistence is something that I absolutely need for what I'm doing. I've actually just commented out all the RemoteEntities code in my project because it just messes things up for these entities to be vanishing when chunks unload.
     
  9. Offline

    Lolmewn

    So this new persistence thing, do I have to invoke some method in order for it to work?
    I cloned the repo, built the sources, dropped in the plugin, but nothing seems to be saved yet.
    EDIT: Lol, forgot to change branch. I'll figure this out!
    EDIT2: Getting errors, RemotePlayer class line 82. NoSuchMethodException on .getBukkitEntity() while trying to spawn it. Idea's? Full stack trace here: http://pastebin.com/10Zg1X4q
     
  10. Answer for edit2: this is a fix for the latest craftbukkit dev build,.
    There is no autosave currently and that probably won't happen. Currently there are two methods: entitymanager.saveEntities() as well as entitymanager.loadEntities() to save and load them.
     
  11. Offline

    Lolmewn

    kumpelblase2 Alright, I'll download the latest dev build. Thanks.

    Can't seem to use .getBukkitEntity still. Using source from today's push to the Persistence branch (this one to be exact), with craftbukkit version git-Bukkit-1.4.7-R0.1-26-gabccf54-b2623jnks (MC: 1.4.7). Throws NullPointer in CreateEntityContext.create(L240), the one line with .getBukkitEntity().
    This, of course, was directed at kumpelblase2

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  12. Offline

    Lolmewn

    kumpelblase2 Is there anything I can do to avoid these NoMethodExceptions described in the post above?
     
  13. No idea, I'm using the latest 1.4.7 rb and I don't get them at all. I actually never had them. Neither before I made the change nor after it.

    However, I just reverted that change as I realized it wasn't even necessary.
     
  14. Offline

    Lolmewn

    Weird, weird, weird. Downloaded latest source, built it, no errors in the IDE, no errors in my own project, both server and IDE on 1.4.7R1.0, checked the source was built right (The persistence package is in the plugin, so I take it it did), and still that error.
    Could you maybe send your built .jar perhaps? Maybe it's just my maven not liking me or something, but I'm absolutely clueless to whatever is going on here.
     
  15. Offline

    Lolmewn

    kumpelblase2 Running 1.4.7 RB1 too, getting this: http://pastebin.com/KM1Zzmtr
    Code I'm using: http://pastebin.com/K0R0NE7L
    Line 67 in my code is the line where I create the RemoteEntity object.

    Also, the Apache commons don't have to be shaded in, as they are already in the CB package too. Would just be extra work for DBO staff (such as me), as they also have to check those classes.
     
  16. Offline

    Lolmewn

    kumpelblase2 Seems to be working now, except for this (Guess what? A line with getBukkitEntity()!):
    Code:java
    1.  
    2. Caused by: java.lang.NullPointerException
    3. at de.kumpelblase2.remoteentities.persistence.EntityData.<init>(EntityData.java:36)
    4. at de.kumpelblase2.remoteentities.persistence.serializers.PreparationSerializer.prepare(PreparationSerializer.java:26)
    5. at de.kumpelblase2.remoteentities.EntityManager.saveEntities(EntityManager.java:397)
    6. at nl.lolmewn.quests.Events.remoteEntityDespawn(Events.java:243)
    7. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    8. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    9. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    10. at java.lang.reflect.Method.invoke(Unknown Source)
    11. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
    12. ... 23 more
     
  17. Offline

    Fell

    I'm using a custom method of persistence across server restarts/reloads, but when the server restarts and is down for an extended period of time, the mobs do not spawn like they're supposed to onEnable. Does the manager.saveEntities() and loadEntities() method work when the server shuts down? And if not, any ideas on why the RemoteEntities aren't spawning on Startup?
     
  18. What do you mean that they don't get spawned when the server is down for a longer period of time? It doesn't really make sense to me why that should happen, because the downtime shouldn't make any difference at all.
    The new persistence implementation is capable of saving all the important stuff from the entity (even desires and behaviors) and loading it back when you want. Time shouldn't make a difference here at all. You can, if you want to, build on top of the existing serializers (or on the base serializer -> PreparationSerializer) and use your own way of persisting the data.

    Fixed.
     
  19. Offline

    Baba43

    Any ideas why my player-npcs disappear after a while?
     
  20. Offline

    IDragonfire

    Sure they disapear after a while, or if you go away? NPC's disappear/unloaded on chunkunload. Can you post your code?
     
  21. Offline

    drampelt

    Is it in any way possible to store data with an entity to differentiate between some of the same kinds? For example, having the X zombies attack the Y zombies or something.
     
  22. Offline

    IDragonfire

    Yes,
    extend the Remote Entity, add a field like "enum type" and implement the persistence stuff ;)
    Persistence is designed to support custom remote entities ;)
     
  23. Offline

    Baba43

    If its a player-like npc? What could I do to prevent this?
     
  24. Offline

    Lolmewn

    So eeh, using Persistence there's errors while loading them. It looks like the first one to load loads fine (or is it the last?), but then NPE's occure on Bukkit.getWorld().
    Tried fixing this, and it sort of works, but why would it throw an NPE for every Entity the lib is trying to create, except for the first/last?
     
  25. Sorry for no activity in the last weeks as my pre-a-level exams just started so I was busy with school. Since the most important ones are over already I can start going back to this until the actual a-levels start.

    No idea, I'm gonna look again in the persistence stuff.

    BTW: Also created a irc channel for those who want to talk a bit more. it's -obviously- #remoteentities on irc.esper.net .
     
    Jumla likes this.
  26. Offline

    Baba43

    Can you help me? I always get the following error:
    Code:
    The type net.minecraft.server.v1_4_5.EntityLiving cannot be resolved. It is indirectly referenced from required .class files
    for this line:
    Code:
    DesireLookAtNearest desire = new DesireLookAtNearest(questNPC, null, 8F), 1);
     
  27. Have you tried an actual class instead of null? I know that you'd need to use craftbukkit, but I've got a solution coming up in the next version.
     
  28. Offline

    confuserr

    Getting a few errors with 1.4.7 RB1.0 and the latest snapshot on the maven repo. Seemed to be working with 1.4.6, I presuming the latest snapshot is 1.4.7 compatible though.

    http://pastebin.com/VWV2VA9n

    Code:
    RemoteEntity zomb = craft.EntityManager.createRemoteEntityFromExisting(event.getEntity());
                        zomb.setSpeed(zombieSpeed);
    /*line 61 */ zomb.getBukkitEntity().setMaxHealth(zombieHealth);
     
Thread Status:
Not open for further replies.

Share This Page