mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
Remove BYTE from mob effect packets
This commit is contained in:
parent
97d12ae2d8
commit
3da761347f
|
|
@ -17,7 +17,7 @@ UpdateMobEffectPacket::UpdateMobEffectPacket()
|
||||||
UpdateMobEffectPacket::UpdateMobEffectPacket(int entityId, MobEffectInstance *effect)
|
UpdateMobEffectPacket::UpdateMobEffectPacket(int entityId, MobEffectInstance *effect)
|
||||||
{
|
{
|
||||||
this->entityId = entityId;
|
this->entityId = entityId;
|
||||||
this->effectId = (BYTE) (effect->getId() & 0xff);
|
this->effectId = static_cast<std::uint8_t>(effect->getId() & 0xff);
|
||||||
this->effectAmplifier = (char) (effect->getAmplifier() & 0xff);
|
this->effectAmplifier = (char) (effect->getAmplifier() & 0xff);
|
||||||
this->effectDurationTicks = (short) effect->getDuration();
|
this->effectDurationTicks = (short) effect->getDuration();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "Packet.h"
|
#include "Packet.h"
|
||||||
|
|
||||||
|
|
@ -8,7 +9,7 @@ class UpdateMobEffectPacket : public Packet, public std::enable_shared_from_this
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int entityId;
|
int entityId;
|
||||||
BYTE effectId;
|
std::uint8_t effectId;
|
||||||
char effectAmplifier;
|
char effectAmplifier;
|
||||||
short effectDurationTicks;
|
short effectDurationTicks;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue