implement sheep shearing

* Added shearing sheeps

* Added empty line

* Changed comment in MobData to say what the middle 1 bit is used for

* Replaced if statements with a switch statement and early returns

* Send mob metadata to players that join

* Fixed mob metadata getting freed when exiting the switch statement

* remove currently unnecessary check

* use bitwise and in place of modulo

* style nitpicks

---------

Co-authored-by: p2r3 <p2r3@p2r3.com>
This commit is contained in:
SDFTDusername
2025-09-16 12:36:42 +02:00
committed by GitHub
parent 244c98552f
commit ba86dfd927
5 changed files with 102 additions and 7 deletions

View File

@@ -241,7 +241,7 @@ typedef struct {
uint8_t y;
short z;
// Lower 5 bits: health
// Middle 1 bit: reserved for future use
// Middle 1 bit: sheep sheared, unused for other mobs
// Upper 2 bits: panic timer
uint8_t data;
} MobData;