[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

    joemort

    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

    lzravanger

    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.
    Code:java
    1. Globals.setManager(RemoteEntities.createManager(this));

    The error that comes up in console.
    Code:
    22:06:47 [SEVERE] Error occurred while enabling Conquest vALPHA 0.1 (Is it up to
    date?)
    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
    .java:457)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:382)
            at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugin(CraftServer.jav
    a:286)
            at org.bukkit.craftbukkit.v1_6_R3.CraftServer.enablePlugins(CraftServer.
    java:268)
            at net.minecraft.server.v1_6_R3.MinecraftServer.l(MinecraftServer.java:3
    21)
            at net.minecraft.server.v1_6_R3.MinecraftServer.f(MinecraftServer.java:2
    98)
            at net.minecraft.server.v1_6_R3.MinecraftServer.a(MinecraftServer.java:2
    58)
            at net.minecraft.server.v1_6_R3.DedicatedServer.init(DedicatedServer.jav
    a:165)
            at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java
    :399)
            at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:5
    83)
    Caused by: java.lang.ClassNotFoundException: de.kumpelblase2.remoteentities.Remo
    teEntities
            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
    .java:80)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:53)
            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
    Code:
        <repository>
            <id>remoteentities-repo</id>
            <url>http://repo.infinityblade.de/remoteentities/snapshots</url>
        </repository>
     
        <dependency>
          <groupId>de.kumpelblase2</groupId>
          <artifactId>remoteentities</artifactId>
          <version>1.8-SNAPSHOT</version>
          <type>jar</type>
        </dependency>
    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?
    Code:java
    1. public void spawnMob() {
    2. EntityManager manager = Globals.getEntityManager();
    3. final Area closest = WorldMap.getClosestEnemyArea(this);
    4.  
    5. final RemoteEntity entity = manager.createEntity(RemoteEntityType.Zombie, getLocation().getLocation(), true);
    6. entity.setSpeed(1.0);
    7.  
    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. }
    19.  
    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. Offline

    kumpelblase2

    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

    Ultimate_n00b

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

    Dread9Nought

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

    Diemex

    Could someone please answer my question?
     
  8. Offline

    joemort

    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

    Zake.

    kumpelblase2 - I get this error:
    Code:java
    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:
    Code:java
    1. private EntityManager npcManager;
    2.  
    3. public void onEnable(){
    4. this.npcManager = RemoteEntities.createManager(this);
    5.  
    6. RemoteEntity entity = npcManager.createNamedEntity(RemoteEntityType.Villager, npcLOC, "SHOP");
    7. entity.setStationary(true);
    8. }
     
  10. Offline

    confuserr

    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

    Zake.

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

    confuserr
     
  12. Offline

    kumpelblase2

    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

    joemort

    Please fix :(

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

    Ultimate_n00b

    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

    DevRosemberg

    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:

    Code:java
    1. PetManager.despawnCurrentPet(player);
    2.  
    3.  
    4.  
    5. RemoteEntity entity = PetManager.getEntityManager().createEntity(RemoteEntityType.Chicken, player.getLocation(), false);
    6.  
    7.  
    8.  
    9. PetManager.setPet(player, entity);
    10.  
    11.  
    12.  
    13. entity.setStationary(false);
    14.  
    15. entity.setSpeed(1.69F);
    16.  
    17. entity.getMind().addMovementDesire(new DesireFollowSpecific(entity, player, 4F, 1000F), 10);
    18.  
    19.  
    20.  
    21. entity.getBukkitEntity().setCustomNameVisible(true);
    22.  
    23. entity.getBukkitEntity().setCustomName(player.getRank().getNameColor() + player.getName() + ChatColor.WHITE + "'s Chicken");
    24.  
    25.  
    26.  
    27. ((Chicken) entity.getBukkitEntity()).setBaby();


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

    joemort

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

    Diemex

    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

    Muffin89

    its optional and turned off by default. Nevertheless Kumpelblase2 is a trustworthy individual.
     
  21. Offline

    kumpelblase2

    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

    joemort

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

    kumpelblase2

    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

    Ultimate_n00b

    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

    Quaro

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

    KingIngoHD

    Pls Repair RemoteEntities
     
  27. Offline

    Ultimate_n00b

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

    kevinspl2000

    #RepairPleaSe?
     
  29. Offline

    Jumla

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

    1TOOKURWALLET

    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