Rotating animals, shave them

Discussion in 'Plugin Development' started by XbannisherX, Nov 29, 2012.

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

    XbannisherX

    Is there a way to shave a sheep without a player? Is there mayby a code that makes a sheep a shaved one? and also, is there a way to rotate a animal? havent found out how to actually do that yet :/
     
  2. Offline

    jorisk322

  3. Offline

    XbannisherX

    aha :p
    Well the shave part is pretty much done
    Still not going so well with the rotating of animals without replacing/teleporting them
     
  4. I couldn't find anything in the bukkit api, but you could use this: Entity Look Packet ...
    Edit: Maybe this could work too with setting the location : setYaw and setPitch
     
  5. Offline

    Malikk

    You'll have to teleport them to the same x,y,z but different pitch/yaw
     
  6. Offline

    XbannisherX

    Any clue how to do that? :/
     
  7. Offline

    Terradominik

    like that:

    Code:
    Entity turningSheep = //do you initialisation here
    Location turningLoc = turningSheep.getLocation();
    int rotationGrade = 90;
    turningLoc.setYaw(turningLoc.getYaw()+rotationGrade);
    turningSheep.teleport(turningLoc);
    
     
    XbannisherX and ferrybig like this.
  8. Offline

    XbannisherX

    Oh Thanks :p
     
    Terradominik likes this.
  9. Offline

    Terradominik

    no problem :)
     
  10. Offline

    XbannisherX

    Hmmm weird thing is, it does teleport them but it wont turn chickens? gonna try on other animals right now but it wont work on chickens

    Nvm it works with almost every mob but not chickens for some weird reason 0_0

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
Thread Status:
Not open for further replies.

Share This Page