Get a Living Entity's bounding box sizes

Discussion in 'Plugin Development' started by Mr. Sandwich, Oct 30, 2017.

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

    Mr. Sandwich

    Hey so I am trying to create some kind of aura with particles for living entities but I don't know how to get the entity's bounding box size so I don't know where exactly to play the particles, I tried to search it but I didn't really find answers(or at least answers I understood I am not really good with nms) so I am asking for someone to help me and explain to me how to do it, thanks in advance.
     
  2. Offline

    MightyOne

    ((CraftPlayer) player).getHandle().getBoundingBox(). That returns a AxisAlignedBB.
     
  3. Offline

    Mr. Sandwich

    And
    It says there's no such method as getBoundingBox() (I am on 1.7.10 btw) also I am trying t do it for Living Entities not only players is there a way to make it for Living Entities too?
    EDIT: I found .boundingBox instead of getBoundingBox() and I guess you can do the same with entities, thanks I will mark this solved once I see it works.
     
    Last edited: Oct 30, 2017
  4. Offline

    MightyOne

    Well actally i have never worked with AxisAlignedBB's and I am not so sure how much it can help you with creating an aura. How shall that aura look?
     
  5. Offline

    Mr. Sandwich

    I am trying to do a some kind of roll of particles and inside it the entity, the roll need to be of course adjusted according to the entity's size so now after getting the entity's size problem I need to find out how to do this roll
     
  6. Offline

    MightyOne

    I have worked already alot with ... geometric and trigonometric stuff. I dont know. Id you need some help you could maybe draw a picture of how the roll should look and i could give you some tips
     
  7. Offline

    Mr. Sandwich

    Well it doesn't matter too much if its a roll I just want the particles to move a bit but also to stay relatively close to the entity and not go too far from it like in a radius of 1/4 a block from it, and I tried to use particle APIs but I code this for a cauldron server and they for some reason seem to not work with cauldron
     
  8. Offline

    MightyOne

    Does cauldron have this bukkit world class? I always used wolrd.spawnParticle() or world.playEffect()
     
  9. Offline

    Mr. Sandwich

    spawnParticle() is 1.8+ I am coding for 1.7.10 and there is world.playEffect() but its not exact enough I need some kind of formula to keep them close to the entity yet still moving I dont know how to do it I never really messed with particles
     
  10. Offline

    MightyOne

    Well one trick about spawnParticle was to set the amount to zero and use the offset as velocity instead. But if playEffect does not have a offset then in sorry
     
  11. Offline

    timtower Administrator Administrator Moderator

    Locked
    Modded servers are not supported by Bukkit
     
Thread Status:
Not open for further replies.

Share This Page