Solved Thousands of Invisible Entities (How to Fix with Bukkit?)

Discussion in 'Plugin Development' started by ccrama, Aug 6, 2014.

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

    ccrama

    Hello Bukkit,
    For some unknown reason, thousands of invisible entities have been spawning all around my server. I have not been able to pinpoint the exact reason, but that's besides the point. I want to create a plugin that clears the entities every couple minutes, but can't find a way to pinpoint only invisible entities. Is this possible with Bukkit API or will I have to dig through nms to do this?

    Thanks,
    ccrama
     
  2. ccrama Invisible in what way?
     
  3. Offline

    ccrama

    AdamQpzm Invisible in the way that it shows up on the invisible entity counter on the debug screen. The I: stands for "invisible", meaning the entity is a type that doesn't show for players.
     
  4. Offline

    Syd

    ccrama
    It means that the entity isn't rendered for the player, because the are not within the line of sight, or hidden behind something...
     
  5. Offline

    ccrama

    Syd The issue is I can see thousands of black objects in the sky and they disappear within a second or two of the chunk rendering.
     
  6. Offline

    ZeusAllMighty11

    Screenshot? I think you're seeing particles.
     
  7. Offline

    ccrama

    Last edited by a moderator: Jun 9, 2016
  8. When did you start to see this? Any plugins added around the time of this occurring?
     
  9. Offline

    ZodiacTheories

    ccrama

    Maybe its shaders?
     
  10. Offline

    ccrama

    bwfcwalshy ZodiacTheories I added shaders last night, has been happening for weeks now. Haven't added any plugins recently. I thought it might be my HOLOPopups plugin, but after testing it proved not to be. I'm stumped.
     
  11. Offline

    ccrama

    [​IMG]

    A lot of my server features are custom made by me, but none of them deal with entities at all. That is not the issue.
     
  12. ccrama is it possible a corrupt world? Make a new world and see if it still happens
     
  13. Offline

    ccrama

    bwfcwalshy well the issue is they appear where people go most. Spawn has about 1600 above it. Popular spots have upwards of 600-1000. Little used spots have 0-20.

    EDIT: Custom plugins are QuoteMe, Paths (coming soon to bukkit dev ;)), and HOLOPopup. HOLOPopup is on Bukkit dev and has been tested by me extensively to see if that's the issue. It appears as if it is NOT the issue, and they still spawn without the plugin on the server.
     
  14. ccrama I have no idea sorry.
     
  15. Offline

    evilmidget38

    Sounds like holograms to me. Holograms do some weird stuff involving spawning invisible horses(IIRC), which results in weird shapes showing up.
     
    ZeusAllMighty11 likes this.
  16. Offline

    ccrama

    evilmidget38 I know, but I coded HOLOPopups in such a way that it would delete the entities. Regardless, I took the plugin off for a week and the entities continued growing in number.

    It's also not just a visual issue, they cause severe lag on my more frequented areas on the server. These are places that no holograms are spawning anyway (like spawn, people's houses, etc.).
     
  17. Offline

    fireblast709

    ccrama use the process of elimination. First try it with no plugins, and keep adding plugins one by one until you find the cause
    evilmidget38 invisible wither skulls and glitched horses (latter could cause it) ;)
     
  18. Offline

    ccrama

    fireblast709 the issue is they stay without any plugins, so there is no way I can tell which one is causing it. It's like they are permanent.
     
  19. Offline

    Aqua

    They are not permanent I have the same problem with those black boxes in the sky. I quickly made an entity remover and every often just remove them all.
    I suspect it has to do with holograms.
    This is the code I use to remove them, it's inside a onCommand method;
    Code:
                    if (sender.hasPermission("world.clearentities")) {
                        int r = -1;
                        if (args.length > 1) {
                            try {
                                r = Integer.parseInt(args[1]);
                            } catch (Exception e) {}
                        }
                        int i = 0;
                        if (r < 0) {
                            for (Entity e : p.getWorld().getEntities()) {
                                if (!(e instanceof LivingEntity || e instanceof Attachable)) {
                                    i++;
                                    e.remove();
                                }
                            }
                        } else {
                            for (Entity e : p.getNearbyEntities(r, 255, r)) {
                                if (!(e instanceof LivingEntity || e instanceof Attachable)) {
                                    i++;
                                    e.remove();
                                }
                            }
                        }
                        sender.sendMessage(ChatColor.BLUE + "Removed a total of " + i + " entities in the world.");
                    } else {
                        sender.sendMessage(Constants.NO_PERMISSION);
                        return false;
                    }
     
  20. Offline

    fireblast709

    ccrama do the above, verify that all invis entities are gone, and start the process of elimination
     
    AdamQpzm likes this.
  21. Offline

    ccrama

    Aqua fireblast709 AWESOME aqua. That fixed it right up. Might have been residual from an old plugin now that I think about it. Anyways, that code fixed it.

    Over 2500 entities removed >:D

    Thanks all
     
Thread Status:
Not open for further replies.

Share This Page