FEAT: New proto check

This commit is contained in:
2026-03-27 20:16:59 +02:00
parent 8be842a8ac
commit 97b0fb4d46
6 changed files with 41 additions and 20 deletions

View File

@@ -22,11 +22,12 @@
#include "network/packet/SendInventoryPacket.h"
#include "world/entity/player/Inventory.h"
ServerPlayer::ServerPlayer( Minecraft* minecraft, Level* level )
ServerPlayer::ServerPlayer( Minecraft* minecraft, Level* level, bool proto)
: super(level, minecraft->isCreativeMode()),
_mc(minecraft),
_prevHealth(-999),
_containerCounter(0)
_containerCounter(0),
isNewProto(proto)
{
// hasFakeInventory = true;
footSize = 0;

View File

@@ -15,7 +15,7 @@ class ServerPlayer: public Player,
{
typedef Player super;
public:
ServerPlayer(Minecraft* minecraft, Level* level);
ServerPlayer(Minecraft* minecraft, Level* level, bool proto);
~ServerPlayer();
@@ -44,10 +44,14 @@ public:
void completeUsingItem();
// Getter and setter? Doesnt hear about that
// TODO: Getter and setter :trollface:
int lastMoveTicks = 0;
int ticksInAir = 0;
void setLastMoveTicks(int lastMoveTicks) { this->lastMoveTicks = lastMoveTicks; }
int getLastMoveTicks() { return lastMoveTicks; }
void setTicksInAir(int ticksInAir) { this->ticksInAir = ticksInAir; }
int getTicksInAir() { return ticksInAir; }
void setNewProto(bool proto) { isNewProto = proto; }
bool getProto() { return isNewProto; }
private:
void nextContainerCounter();
void setContainerMenu( BaseContainerMenu* menu );
@@ -55,6 +59,11 @@ private:
Minecraft* _mc;
int _prevHealth;
int _containerCounter;
int lastMoveTicks = 0;
int ticksInAir = 0;
bool isNewProto = false;
};
#endif /*ServerPlayer_H__*/