CustomEntitiesAPI HUGE ISSUE (12+ Hours)

Discussion in 'Plugin Development' started by DividedByZero, Jul 11, 2015.

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

    DividedByZero

    I am trying to use the customentitiesapi with spigot and these little issue is driving me absolutly INSANE! Please Help!

    HUGE BUG!!!
    When I spawn in ANY mob with the custom entities api and leave the area for a few seconds, when I come back the mobs loose all data it seems like and I am unable to remove them. Idk what is causing this but I really need a fix!

    It seems like when the game goes to despawn them they just loose all their data and dont despawn.

    Here is some code examples of my issue. And i have already tried add LivingEntity ent = (LivingEntity) ent;
    ent.setRemoveWhenFarAway(false);

    It makes NO difference.

    Code:
        public void spawnEntity(Location loc, String type) {
            if(type.equals("sales_particles")) {
                Entity ent = loc.getWorld().spawnEntity(loc, EntityType.SKELETON);
                CustomEntitySkeleton cent = CustomEntities.getCustomEntitySkeleton(ent);
                cent.setUnableToMove();
                cent.setUnpushable();
                cent.setCustomName(ChatColor.AQUA+"Particles");
                cent.setDamageable(false);
    
                entities.add(new HubEntity(loc, type, ent));
            }
          
            if(type.equals("sales_hats")) {
                CustomEntityVillager ent = CustomEntities.getNewCustomEntityVillager(loc);
                ent.setPushable(false);
                ent.setTradeable(false);
                ent.setAbleToMove(false);
                ent.setUndamageable(true);
                ent.setProfession(2);
                ent.setCustomName(ChatColor.DARK_AQUA+"Hats");
                ent.setCustomNameVisible(true);
                ent.newGoalSelectorPathfinderGoalLookAtPlayer(10.0F);
              
              
                entities.add(new HubEntity(loc, type, ent.getBukkitEntity()));
            }
          
            if(type.equals("sales_gear")) {
                CustomEntityVillager ent = CustomEntities.getNewCustomEntityVillager(loc);
                ent.setPushable(false);
                ent.setAbleToMove(false);
                ent.setUndamageable(true);
                ent.setTradeable(false);
                ent.setProfession(3);
                ent.setCustomName(ChatColor.YELLOW+"Gear");
                ent.setCustomNameVisible(true);
                ent.newGoalSelectorPathfinderGoalLookAtPlayer(10.0F);
              
              
                entities.add(new HubEntity(loc, type, ent.getBukkitEntity()));
            }
        }
    https://github.com/HiROs15/SakuraNetwork/blob/master/SakuraNetwork/src/dev/hiros/Hub/Entities/EntityManager.java


    https://github.com/HiROs15/SakuraNetwork/blob/master/SakuraNetwork/src/dev/hiros/Hub/HubManager.java
     
  2. Offline

    Funergy

  3. Offline

    DividedByZero

Thread Status:
Not open for further replies.

Share This Page