1
0
mirror of https://github.com/p2r3/bareiron.git synced 2025-10-01 23:25:09 +02:00

implement fall damage

This commit is contained in:
p2r3
2025-08-21 15:07:49 +03:00
parent 2a0d465ad7
commit 05f17399f5
6 changed files with 67 additions and 18 deletions

View File

@@ -65,6 +65,9 @@ typedef struct {
#endif
int8_t yaw;
int8_t pitch;
short grounded_y;
uint8_t health;
uint8_t hunger;
uint8_t hotbar;
uint16_t inventory_items[41];
uint16_t craft_items[9];

View File

@@ -7,9 +7,9 @@ int cs_clientInformation (int client_fd);
int cs_pluginMessage (int client_fd);
int cs_playerAction (int client_fd);
int cs_useItemOn (int client_fd);
int cs_setPlayerPositionAndRotation (int client_fd, double *x, double *y, double *z, float *yaw, float *pitch);
int cs_setPlayerPosition (int client_fd, double *x, double *y, double *z);
int cs_setPlayerRotation(int client_fd, float *yaw, float *pitch);
int cs_setPlayerPositionAndRotation (int client_fd, double *x, double *y, double *z, float *yaw, float *pitch, uint8_t *on_ground);
int cs_setPlayerPosition (int client_fd, double *x, double *y, double *z, uint8_t *on_ground);
int cs_setPlayerRotation (int client_fd, float *yaw, float *pitch, uint8_t *on_ground);
int cs_setHeldItem (int client_fd);
int cs_clickContainer (int client_fd);
int cs_closeContainer (int client_fd);
@@ -37,6 +37,8 @@ int sc_spawnEntityPlayer (int client_fd, PlayerData player);
int sc_teleportEntity (int client_fd, int id, double x, double y, double z, float yaw, float pitch);
int sc_setHeadRotation (int client_fd, int id, uint8_t yaw);
int sc_updateEntityRotation (int client_fd, int id, uint8_t yaw, uint8_t pitch);
int sc_damageEvent (int client_fd, int id, int type);
int sc_setHealth (int client_fd, uint8_t health, uint8_t food);
int sc_registries(int client_fd);
#endif