forked from EXTERNAL/bareiron
spawn only hostile mobs in caves
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user