Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Player Location Tracking Help

Comments in 'Plugin Development' started by Darunia18, Jul 17, 2014.

  1. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    For my Claymores plugin, I've been using the EntityMoveEvent to track a player's (and in future PocketMine updates, other entities') location, and then get the block underneath them. While testing, though, I noticed that this only tracks their location from before they begin to move, and doesn't track their location throughout the movement. Is there any way that I can track an entity's location throughout the movement, or is there any other event that I can use that'd be better to track an entity's location? Thank you.
  2. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,201
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    how about when a player steps on the claymore, they die instead? xD
  3. Dutok
    Offline

    Dutok Notable Member Plugin Developer

    Joined:
    Jun 20, 2014
    Posts:
    372
    Plugins:
    3
    Minecraft User:
    Dutok
    EntityMotionEvent ?
  4. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    Still doesn't fix the issue?
    Tried, doesn't work. I think that's more for like head movement and stuff anyways.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Monitor an entity's movement every tick?

    What do you mean? According to my tests, EntityMoveEvent is reliable. Maybe something with timings could help you? (Not sure about new things)
  6. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,710
    Plugins:
    22
    Minecraft User:
    Falkirknh
    You could use DataPacketRecieve and look at movement packets. This way you wouldn't need something running every tick. There probably is an easier way though :)
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I thought players only sent motion change packets.
  8. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,710
    Plugins:
    22
    Minecraft User:
    Falkirknh
    I haven't looked into it but there wouldn't be any way to be more specific with the motion then to look at the packets.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Right now I can't even join my own LAN server with PocketMine-MP with 0.9.2, so I can't test it.
    LDX likes this.
  10. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    Update: I've been testing things, and it seems that this only happens with slabs. Full blocks work very well with this actually, but this only happens when using slabs. I've messed around with some code and I found that it will read the half slabs too, but it lags by about two seconds when using slabs. It seems very odd. I guess it may still be an issue, but for the most part I think I found the answer.
    PEMapModder likes this.

Share This Page

Advertisement