Teleport Entity relevant to Pitch & Yaw

Discussion in 'Plugin Development' started by Phasesaber, Jul 3, 2014.

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

    Phasesaber

    If you've seen the Earth to Echo minigame, then you probably noticed the little Echo robot in the corner of your screen, I tried to make something like that a long time ago, but it never worked. So I was wondering how I could do that!

    (At 1:05)
     
  2. Offline

    mythbusterma

    This is a Minecraft mod, not a plugin which is supported here. Go look at the forge forums or something.
     
  3. Offline

    Phasesaber

    No it is not, I've played it myself. Please research before making assumptions.
     
    ChipDev likes this.
  4. Offline

    fireblast709

  5. Offline

    mythbusterma

    Huh, well in that case use Entity#teleport(Location), do some match with the player's location, yaw and pitch.
     
  6. Offline

    Phasesaber

    It's a retextured bat.
    That just teleports it to the player's location, not what I want.
     
  7. Offline

    xTigerRebornx

    Phasesaber He said teleport it based on the Player's location, not teleport it to its location. You need to mess with yaw/pitch and the Player's location to get it in the spot you want.
     
  8. Offline

    unon1100

    Entity#teleport(player.getLocation().clone().add(player.getLocation().getDirection()); will show it 1 block ahead of the player.
     
  9. Offline

    Phasesaber

    unon1100 That works, but how would I get it to the right/left?
     
  10. Offline

    MeRPG

    You may want to combine a few if statements and getDirection() s and .add(...)s.
     
  11. Offline

    fireblast709

    Due to the body shape/position, I highly doubt it is a bat xD
     
  12. Offline

    MeRPG

    I agree with fireblast709 here...
     
  13. Offline

    Phasesaber

    MeRPG

    I went into the resource pack and found the texture. It was called bat.png. Then when I used it in a world, all the bats looked like that.
     
  14. Offline

    unon1100

    You may need to use trigonometry in order to set the location to the correct place. But yes, it is a bat.
     
Thread Status:
Not open for further replies.

Share This Page