forked from EXTERNAL/bareiron
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:
@@ -1179,7 +1179,9 @@ int cs_interact (int client_fd) {
|
||||
// Ignore sneaking flag
|
||||
recv_all(client_fd, recv_buffer, 1, false);
|
||||
|
||||
if (type == 1) {
|
||||
if (type == 0) { // Interact
|
||||
interactEntity(entity_id, client_fd);
|
||||
} else if (type == 1) { // Attack
|
||||
hurtEntity(entity_id, client_fd, D_generic, 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user