[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. Offline


    I have even tried using default desires on basic entities like zombies, and I still can't get it to work. Does anyone have ideas?
    9903286 and njb_said like this.
  2. Offline


    kumpelblase2 So after importing this API using Maven and coding what I want to code. I'm being attacked by a NoClassDefError when enabling my plugin.
    My code that is causing the error. (This just saves the EntityManager.) This is run in the onEnable. My plugin.yml does have [RemoteEntities] in its depend. Moving this code to the actual event doesn't help either, so it's not a timing issue.
    1. Globals.setManager(RemoteEntities.createManager(this));

    The error that comes up in console.
    22:06:47 [SEVERE] Error occurred while enabling Conquest vALPHA 0.1 (Is it up to
    java.lang.NoClassDefFoundError: de/kumpelblase2/remoteentities/RemoteEntities
            at com.legendzero.conquest.plugin.Conquest.onEnable(Conquest.java:26)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
            at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugin(CraftServer.jav
            at org.bukkit.craftbukkit.v1_6_R3.CraftServer.enablePlugins(CraftServer.
            at net.minecraft.server.v1_6_R3.MinecraftServer.l(MinecraftServer.java:3
            at net.minecraft.server.v1_6_R3.MinecraftServer.f(MinecraftServer.java:2
            at net.minecraft.server.v1_6_R3.MinecraftServer.a(MinecraftServer.java:2
            at net.minecraft.server.v1_6_R3.DedicatedServer.init(DedicatedServer.jav
            at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java
            at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:5
    Caused by: java.lang.ClassNotFoundException: de.kumpelblase2.remoteentities.Remo
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 12 more
    Trying to shade the plugin throws an error that RemoteEntities isn't enabled but trying to be used. I'm very lost on how to fix this problem.
    Maven pom.xml
    EDIT: Added maven and clarified where code is run.
    EDIT 2: Apparently the jenkins build was not for 1.6.4 and that was giving me problems.

    New problem!

    So I'm running this method every minute to spawn a mob that attacks nearby enemy locations. For some reason, the mobs seem fixated on the location they spawned at. They are constantly moving toward the center of the block they spawned on, and pushing them away just makes them come back. If I push them out of the way and place a block on the location they are fixated to, they just run into the side of the block, not jumping or anything. Am I forgetting something stupid here?
    1. public void spawnMob() {
    2. EntityManager manager = Globals.getEntityManager();
    3. final Area closest = WorldMap.getClosestEnemyArea(this);
    5. final RemoteEntity entity = manager.createEntity(RemoteEntityType.Zombie, getLocation().getLocation(), true);
    6. entity.setSpeed(1.0);
    8. if(closest != null) {
    9. entity.setPathfindingRange(40.0);
    10. entity.getMind().clearMovementDesires();
    11. entity.move(entity.getBukkitEntity().getLocation().add(0, 5, 0));
    12. //entity.getMind().addMovementDesire(new DesireMoveToLocation(getLocation().getLocation().add(5, 0, 0)), 10);
    13. //entity.getMind().addMovementDesire(new DesireLookAtNearest(Player.class, 8F), 2);
    14. Bukkit.broadcastMessage(getName() + " has targetted " + closest.getName());
    15. Bukkit.broadcastMessage(closest.getLocation().getLocation().toString());
    16. } else {
    17. Bukkit.broadcastMessage("Closest area not found.");
    18. }
    20. //entity.getMind().addTargetingDesire(new DesireFindNearestTarget(EntityZombie.class, 10, false, true, 1, new EntitySelectorMinion(getOwner())), 14);
    21. //entity.getMind().addTargetingDesire(new DesireFindNearestTarget(EntitySkeleton.class, 10, false, true, 1, new EntitySelectorMinion(getOwner())), 13);
    22. //entity.getMind().addTargetingDesire(new DesireFindNearestTarget(EntityGiantZombie.class, 10, false, true, 1, new EntitySelectorMinion(getOwner())), 12);
    23. //entity.getMind().addTargetingDesire(new DesireFindNearestTarget(EntityPlayer.class, 10, false, true, 1, new EntitySelectorMinion(getOwner())), 11);
    24. }

    EDIT 3: Now I'm beyond confused. I tried to spawn a Zombie with the standard traits and all, and its fixated on the location. Litterally creating a remote entity from existing or thin air, with or without a name, of any type, with or without default movement desires is focusing on the spawn location. I don't know what is happening, but it's ridiculous.
  3. Hey how would i stop a custom entity from moveing but not stop custom movement?
  4. On the future of RemoteEntities: It will be more or less minecraft version independent and I will be able to push nms or general updates way easier. It will be cool. That's all I have to say at the moment, thank you.
  5. Offline


    I noticed that DesireSwim throws an exception when you create a Entity with default desires. Any reason why?
  6. Offline


    Was the movement bug fixed? It's on your github as an issue too...
  7. Offline


    Could someone please answer my question?
  8. Offline


    I would be more worried about this working at all. At the moment, there are a lot of people who aren't getting any functionality from this for even basic entities like zombies. It should theoretically work for squids and bats, there is code there for them as entities, but at the moment a lot of people (everyone I've talked to) are having problems getting even default desires working for skeletons and zombies.

    If anyone can prove me wrong and show they are having the latest snapshot (1.8-snapshot) work right, I would be delighted to see some code for what you did.
  9. Offline


    kumpelblase2 - I get this error:
    1. java.lang.NoClassDefFoundError: de/kumpelblase2/remoteentities/RemoteEntities
    2. at me.kaZep.XSG.Main.Main.onEnable(Main.java:34)

    Can someone help me? That's the code:
    1. private EntityManager npcManager;
    3. public void onEnable(){
    4. this.npcManager = RemoteEntities.createManager(this);
    6. RemoteEntity entity = npcManager.createNamedEntity(RemoteEntityType.Villager, npcLOC, "SHOP");
    7. entity.setStationary(true);
    8. }
  10. Offline


    Add the following in your plugin.yml file. Ensure you have the RemoteEntities jar file within your plugins folder as well.
    depend: [RemoteEntities]
  11. Offline


    I already did that. I have the plugin too.. Not sure what's the cause of this...

  12. Since I still can't figure out why zombies and other entities don't move, I did something else in my spare free time. Like I announce, Remote Entities is now pseudo-version-independent.
    What does this mean? You can tell remote entities to automatically pull new sources from the repo when a new minecraft version comes out. That means, you don't have to wait for a complete new version of remote entities to get released. Since this downloads stuff from the web, it's off by default and can be turned on in the config.
    The latest snapshot is the first build to support this feature.
    If you want to find out more about it, you can take a look at the commit here.

    Since that is done now, I'll get to the bugs but I don't really know if I can fix them now.
    confuserr likes this.
  13. Offline


    Please fix :(

    I don't want to have to re-implement all my AI from scratch for my current projects
  14. Offline


    He just implemented something big as to make this easier. So now you think he's going to abandon/not fix this?
  15. willyou update this lib to 1.6.4?
  16. Offline


    kumpelblase2 Im having trouble creating a chicken to follow a specific player, it just stays there walking in circles and flying.

    this is my code:

    1. PetManager.despawnCurrentPet(player);
    5. RemoteEntity entity = PetManager.getEntityManager().createEntity(RemoteEntityType.Chicken, player.getLocation(), false);
    9. PetManager.setPet(player, entity);
    13. entity.setStationary(false);
    15. entity.setSpeed(1.69F);
    17. entity.getMind().addMovementDesire(new DesireFollowSpecific(entity, player, 4F, 1000F), 10);
    21. entity.getBukkitEntity().setCustomNameVisible(true);
    23. entity.getBukkitEntity().setCustomName(player.getRank().getNameColor() + player.getName() + ChatColor.WHITE + "'s Chicken");
    27. ((Chicken) entity.getBukkitEntity()).setBaby();

    What should i do to fix it?
  17. how do i use 1.6.4 snap shot?
  18. Offline


    It is currently broken, wait for a major update with the fix :(. I'm stuck too
  19. Offline


    I'm a bit skeptical that any admin would want something that can load classes dynamically from the web after the fiasco with the plugins that downloaded bots. I hope that the bukkitdev staff approves it nevertheless.
  20. Offline


    its optional and turned off by default. Nevertheless Kumpelblase2 is a trustworthy individual.
  21. Diemex Well, that's why I don't force you to. It's meant to provide a faster way of updating to a new minecraft version without needing to wait for a complete new release. Furthermore it's open source, you can look at what it does and compile it yourself plus the fact you can download the classes by yourself and also take a look at them. However, it is not the only purpose. You can also easily modify my code by just dropping a compiled new class into the downloaded classes folder and it'll load it.
  22. Offline


    When do you think you'll have a fix on this? It's been quite a while now. Should I assume the project is dead and move on to something else?
  23. joemort I can't give you a reliable answer for that. I might not be able to fix this, not even in months. Or I might find a fix tomorrow. I don't know, I can't tell. I don't want to end it here. Not yet.
  24. Offline


    Why does everyone assume kumpelblase2 isn't trying/won't try to fix this? It's a tad rude, don't you think?
    Pim1234 and Cirno like this.
  25. Offline


    Doesn't work if you want to make NPC move... :( (NPC flying) I hope you'll fix it.
  26. Offline


    Pls Repair RemoteEntities
  27. Offline


    He put in the title "Currently Broken", just wait for him to fix it.
  28. Offline


  29. Offline


    What's the exact issue that makes this broken at the moment, and what restrictions are there from fixing it?
  30. Offline


    does the 1.7 version of this work on 1.6.4 too...because i see that the title says its broken. is just the 1.6.4 version broke or is it both...
Thread Status:
Not open for further replies.

Share This Page