Skip to content

Commit

Permalink
refactor: replace PacketId which is using int with MinecraftPacketIds
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Mar 19, 2023
1 parent e970901 commit 0fc0f29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LiteLoader/src/llapi/mc/PlayerAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ bool Player::refreshAttributes(std::vector<Attribute const*> const& attributes)
wp.writeString((*attribute).getName().getString());
}
wp.writeUnsignedVarInt64(0);
NetworkPacket<0x1D> pkt(wp.getAndReleaseData());
NetworkPacket<(int)MinecraftPacketIds::UpdateAttributes> pkt(wp.getAndReleaseData());
sendNetworkPacket(pkt);
return true;
}
Expand Down Expand Up @@ -692,7 +692,7 @@ bool Player::sendAddItemEntityPacket(unsigned long long runtimeID, Item const& i

wp.writeBool(false);

NetworkPacket<15> pkt(wp.getAndReleaseData());
NetworkPacket<(int)MinecraftPacketIds::AddItemActor> pkt(wp.getAndReleaseData());
sendNetworkPacket(pkt);
return true;
}
Expand Down Expand Up @@ -720,7 +720,7 @@ bool Player::sendAddEntityPacket(unsigned long long runtimeID, string entityType
// Links
bs.writeUnsignedVarInt(0);

NetworkPacket<13> pkt(bs.getAndReleaseData());
NetworkPacket<(int)MinecraftPacketIds::AddActor> pkt(bs.getAndReleaseData());
sendNetworkPacket(pkt);
return true;
}
Expand Down

0 comments on commit 0fc0f29

Please sign in to comment.