feat: Melon Feature
fix: polished stone variants spawning on top of certain biomes.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user