feat: Melon Feature

fix: polished stone variants spawning on top of certain biomes.
This commit is contained in:
Lord_Cambion
2026-04-08 00:11:07 +02:00
parent 38775d0f26
commit aaae8b01a9
9 changed files with 65 additions and 0 deletions
+13
View File
@@ -5,6 +5,7 @@
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.entity.animal.h"
#include "JungleBiome.h"
#include "MelonFeature.h"
JungleBiome::JungleBiome(int id, bool isEdge) : Biome(id)
{
@@ -70,4 +71,16 @@
}
delete vines;
PIXEndNamedEvent();
PIXBeginNamedEvent(0, "Adding melons");
if (random->nextInt(4) == 0) // Common: 1 in 4 chunks
{
int x = xo + random->nextInt(16) + 8;
int z = zo + random->nextInt(16) + 8;
int y = random->nextInt(Level::genDepth);
MelonFeature *melonFeature = new MelonFeature();
melonFeature->place(level, random, x, y, z);
delete melonFeature;
}
PIXEndNamedEvent();
}