Solved Horse becoming invisible when teleported

Discussion in 'Plugin Development' started by cruck1000, Jul 13, 2013.

  1. Offline

    cruck1000

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I have a small utility plugin I make and maintain and one thing I added is when a player teleports, if they are riding a horse so does the horse. But if a player teleports to a location that is out of loaded chunks they well be teleported and so will the horse but, the player doesn't see the horse until they relog. Here is my code
    Code:java
    1. final Entity horse = player.getVehicle();
    2. horse.eject();
    3. new BukkitRunnable() {
    4. public void run() {
    5. horse.teleport(player);
    6. horse.setPassenger(player);
    7. }
    8. }.runTaskLater(this, 20L);

    This post has been edited 1 time. It was last edited by cruck1000 Jul 13, 2013.
  2. Offline

    Hoolean BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
  3. Offline

    cruck1000

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @Hoolean Do you know anyway to force the horse to rerender? Just so I can have a workaround
  4. Offline

    Hoolean BukkitDev Staff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    @cruck1000

    Not sure. You might have to look into packets, so I'd let the Bukkit team fix it. As the 1.6.2 Bukkit build is in development, the beta one should not have the bug.

    For now, I'd just continue the development of your plugin and come back to it later if it is still an issue ^_^
  5. Offline

    cruck1000

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME

Share This Page