Skip to content

Commit

Permalink
Changes to naming of WrapperPlayServerHurtAnimation
Browse files Browse the repository at this point in the history
  • Loading branch information
retrooper committed Sep 11, 2023
1 parent aa34910 commit 55e3148
Showing 1 changed file with 29 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,53 @@

import com.github.retrooper.packetevents.protocol.packettype.PacketType;
import com.github.retrooper.packetevents.wrapper.PacketWrapper;
import com.github.retrooper.packetevents.event.PacketSendEvent;

public class WrapperPlayServerHurtAnimation extends PacketWrapper<WrapperPlayServerHurtAnimation> {
int entityId;
float hurtDir;
private int entityId;
private float yaw;

public WrapperPlayServerHurtAnimation() {
public WrapperPlayServerHurtAnimation(PacketSendEvent event) {
super(event);
}

public WrapperPlayServerHurtAnimation(int entityId, float yaw) {
super(PacketType.Play.Server.HURT_ANIMATION);
this.entityId = entityId;
this.yaw = yaw;
}

@Override
public void read() {
entityId = readVarInt();
hurtDir = readFloat();
yaw = readFloat();
}

@Override
public void write() {
writeVarInt(entityId);
writeFloat(hurtDir);
writeFloat(yaw);
}

@Override
public void copy(WrapperPlayServerHurtAnimation wrapper) {
this.entityId = wrapper.entityId;
this.hurtDir = wrapper.hurtDir;
this.yaw = wrapper.yaw;
}

public int getEntityId() {
return entityId;
}

public void setEntityId(int entityId) {
this.entityId = entityId;
}

public float getYaw() {
return yaw;
}

public void setYaw(float yaw) {
this.yaw = yaw;
}
}

0 comments on commit 55e3148

Please sign in to comment.