From 4135a4ea125d03ed1caa39c28d2a5daa86608d5b Mon Sep 17 00:00:00 2001 From: KaDerox Date: Mon, 30 Mar 2026 21:00:37 +0200 Subject: [PATCH] Add biome spawn registration functions --- AxoWorldGen.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/AxoWorldGen.cpp b/AxoWorldGen.cpp index 544c76a..a861534 100644 --- a/AxoWorldGen.cpp +++ b/AxoWorldGen.cpp @@ -13,6 +13,7 @@ #include "..\..\Minecraft.World\Biome.h" #include "AxoAPI.h" +#include "AxoWorldGen.h" struct AxoSpawnEntry { int blockId; @@ -20,6 +21,16 @@ struct AxoSpawnEntry { }; static std::vector sSpawnEntries; +static std::vector sBiomeSpawnEntries; + +void AxoWorldGen_RegisterBiomeSpawn(int biomeId, int weight) { + sBiomeSpawnEntries.push_back({biomeId, weight}); + printf("[AxoLoader] Registered biome spawn id=%d weight=%d\n", biomeId, weight); +} + +const std::vector& AxoWorldGen_GetCustomBiomes() { + return sBiomeSpawnEntries; +} void AxoWorldGen_RegisterSpawn(int blockId, const AxoBlockSpawnDef& spawn) { if (!spawn.enabled) return; @@ -82,4 +93,4 @@ void AxoWorldGen_Decorate(Level* level, Random* random, Biome* biome, int xo, in } } level->setInstaTick(false); -} \ No newline at end of file +}