Files
ChristianF 29523f5ba4 Rabbit follow Parents and Variants per biome
now rabbits in panic state are ok and doesnt jump far away. They spawn in a group 1 adult 1-2 baby
different weight spawn based on the biome, also they have correct variants per biome as far as i could check online
2026-03-13 19:09:15 +01:00

34 lines
1.0 KiB
C++

#include "stdafx.h"
#include "net.minecraft.world.level.levelgen.feature.h"
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.level.tile.h"
#include "net.minecraft.world.level.biome.h"
DesertBiome::DesertBiome(int id) : Biome(id)
{
// remove default mob spawn settings
friendlies.clear();
friendlies_chicken.clear(); // 4J added
friendlies_wolf.clear(); // 4J added
friendlies.push_back(new MobSpawnerData(eTYPE_RABBIT, 12, 2, 3));
topMaterial = static_cast<BYTE>(Tile::sand_Id);
material = static_cast<BYTE>(Tile::sand_Id);
decorator->treeCount = -999;
decorator->deadBushCount = 2;
decorator->reedsCount = 50;
decorator->cactusCount = 10;
}
void DesertBiome::decorate(Level *level, Random *random, int xo, int zo)
{
Biome::decorate(level, random, xo, zo);
if (random->nextInt(1000) == 0)
{
int x = xo + random->nextInt(16) + 8;
int z = zo + random->nextInt(16) + 8;
Feature *well = new DesertWellFeature();
well->place(level, random, x, level->getHeightmap(x, z) + 1, z);
}
}