diff --git a/src/main.c b/src/main.c index 83a6712..e7d0e35 100644 --- a/src/main.c +++ b/src/main.c @@ -328,8 +328,9 @@ void handlePacket (int client_fd, int length, int packet_id, int state) { mob_y ++; } if (mob_y != 255) { - // Spawn passive mobs during the day, hostiles during the night - if (world_time < 13000) { + // Spawn passive mobs above ground during the day, + // or hostiles underground and during the night + if (world_time < 13000 && mob_y > 48) { uint32_t mob_choice = (r >> 12) & 3; if (mob_choice == 0) spawnMob(25, mob_x, mob_y, mob_z, 4); // Chicken else if (mob_choice == 1) spawnMob(28, mob_x, mob_y, mob_z, 10); // Cow