Fixed-point numbers (?)

Discussion in 'Spigot Plugin Development' started by bsn_nick, May 14, 2015.

  1. So I am using an async scheduler to teleport a packet entity to my location every tick (disguise) using PacketPlayOutEntityTeleport. It uses ints as x y z args, which is what I need help with. Someone redirected me to this http://wiki.vg/Data_Types#Fixed-point_numbers but I still do not know how to use this. Right now I can get my entity to teleport to me every time i move to another block by getting the double of the coordinate and multiplying it by 32 (loc.getX() * 32). Also, moving my head vertically works smoothly, even without moving blocks, but in order to mvoe position of entity/body rotation/horizontal head movement, i need to mvoe to a different block. Code is http://hastebin.com/bemivesowu.coffee, yes the formatting stuff is being weird copying and pasting.
     
  2. Um, sending that packet will only confuse the server. As far as bukkit is concerned the player teleported to another location that it didnt track. If you dont like bukkit's methods try entityplayer.setLocation() instead.

    Of course this is my opinion, I havent tested if it works or not.
     
  3. I am using packet entities, so the entity is never even tracked by Spigot/Bukkit