mirror of
https://github.com/p2r3/bareiron.git
synced 2025-10-02 07:35:08 +02:00
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 ++;
|
mob_y ++;
|
||||||
}
|
}
|
||||||
if (mob_y != 255) {
|
if (mob_y != 255) {
|
||||||
// Spawn passive mobs during the day, hostiles during the night
|
// Spawn passive mobs above ground during the day,
|
||||||
if (world_time < 13000) {
|
// or hostiles underground and during the night
|
||||||
|
if (world_time < 13000 && mob_y > 48) {
|
||||||
uint32_t mob_choice = (r >> 12) & 3;
|
uint32_t mob_choice = (r >> 12) & 3;
|
||||||
if (mob_choice == 0) spawnMob(25, mob_x, mob_y, mob_z, 4); // Chicken
|
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
|
else if (mob_choice == 1) spawnMob(28, mob_x, mob_y, mob_z, 10); // Cow
|
||||||
|
Reference in New Issue
Block a user