Weird errors teleporting non-player entities from one world to another

Discussion in 'Plugin Development' started by V10lator, Jan 4, 2012.

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

    V10lator

    I'm trying to make a new Inception plugin but right now it's only able to teleport non-players. If I try to teleport other entities (for example from the lower end of "world" to the upper end of "world_nether") it loops the message that it's teleporting it:
    Also I can see the entity falling from the sky in "world" again and again.
    Here's the task itself: http://pastebin.com/7uw557va

    BTW: The task get's executed every 10 ticks (0.5 seconds).
     
  2. Offline

    Don Redhorse

    hmm do you force the chunk to load before you do that?
     
  3. Offline

    V10lator

    You mean like this:
    Code:java
    1. loc.setWorld(to);
    2. loc.setY(to.getMaxHeight() - 1);
    3. Chunk tc = loc.getChunk();
    4. if(!tc.isLoaded())
    5. tc.load();
    6. e.teleport(loc);

    ? Yes, I tried it, but it didn't make any difference.
     
  4. Offline

    Don Redhorse

    hmm don't know than
     
  5. Offline

    V10lator

    I just extended the debugging lines to this:
    Code:java
    1. System.out.print("Teleporting "+e.getClass().getName()+" from "+world+" down to "+to.getName());
    2. System.out.print("New world: "+e.getWorld().getName());

    and made a little video showing what's going on:

    As you can see it confirms that the entity was teleported to the nether (again and again...) but it seems like it's really teleported to the world. Could this be a bug in bukkit?
     
Thread Status:
Not open for further replies.

Share This Page