Solved Werid damage animation packet?

Discussion in 'Plugin Development' started by kameronn, Oct 10, 2016.

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

    kameronn

    I'm currently using protocolib to send a damage animation to a specific player.
    Code:
                PacketContainer entityStatus = new PacketContainer(Packets.Server.ENTITY_STATUS);
                entityStatus.getIntegers().write(0, target.getEntityId());
                entityStatus.getBytes().write(0, (byte) 2);
    
                        manager.sendServerPacket(attacker, entityStatus);
    
    However when I sent it, it makes these weird leg movements that dont look right, how do I stop it?
     
  2. @kameronn
    Well, taking damage from natural movements also causes these weird leg movements, have a look at this video:

    (The /test command sends the packet). I don't think there's anything you can do to stop it.
     
  3. Offline

    kameronn

    @AlvinB
    player.damage(1);

    Doesn't do that? Is there any way to recreate that, because my current problem is that velocity also crates those leg movements so when I send a velocity packet and a damage packet to a player it just looks really awkward
     
  4. @kameronn
    When I do player.damage(1) I get let movements. I don't see why you're trying to remove them though, they're how it's done in normal minecraft.
     
  5. Offline

    kameronn

    @AlvinB
    Because sending velocity to a player does the same movement so it looks unnatural
     
  6. Offline

    Whoneedspacee

    What do you mean the same movement? If you normalize both the player and the person who's hitting the players locations, then subtract the other persons location from the players location, you'll get a vector that'll push the player away from the other, you could randomly multiply certain parts of the vector to add randomness to the hit too, I don't know if this is what you wanted but I think you wanted artificial hits?
     
  7. Offline

    kameronn



    @Whoneedspacee
    Look at the start of this video, I'm trying to figure out if there is a way to stop that, since its so much leg movement for no reason. Is there any way to fix this or no? And yes I am creating artificial hits

    nvm its not the animation its the code, im gonna try to fix it
     
    Last edited: Oct 12, 2016
Thread Status:
Not open for further replies.

Share This Page