minor changes

This commit is contained in:
2026-03-17 23:08:56 +03:00
parent d15051aab6
commit 4769d4ae72
4 changed files with 5 additions and 6 deletions

View File

@@ -23,7 +23,7 @@
ServerPlayer::ServerPlayer( Minecraft* minecraft, Level* level )
: super(level, minecraft->isCreativeMode()),
_mc(minecraft),
_sentHealth(-999),
_prevHealth(-999),
_containerCounter(0)
{
hasFakeInventory = true;
@@ -58,8 +58,8 @@ void ServerPlayer::tick() {
if (containerMenu)
containerMenu->broadcastChanges();
if (health != _sentHealth) {
_sentHealth = health;
if (health != _prevHealth) {
_prevHealth = health;
SetHealthPacket packet(health);
_mc->raknetInstance->send(owner, packet);
}

View File

@@ -48,7 +48,7 @@ private:
void setContainerMenu( BaseContainerMenu* menu );
Minecraft* _mc;
int _sentHealth;
int _prevHealth;
int _containerCounter;
};