the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "WaterlilyFeature.h"
3#include "net.minecraft.world.level.tile.h"
4#include "net.minecraft.world.level.h"
5
6bool WaterlilyFeature::place(Level *level, Random *random, int x, int y, int z)
7{
8 for (int i = 0; i < 10; i++)
9 {
10 int x2 = x + random->nextInt(8) - random->nextInt(8);
11 int y2 = y + random->nextInt(4) - random->nextInt(4);
12 int z2 = z + random->nextInt(8) - random->nextInt(8);
13 if (level->isEmptyTile(x2, y2, z2))
14 {
15 if (Tile::waterLily->mayPlace(level, x2, y2, z2))
16 {
17 level->setTileAndData(x2, y2, z2, Tile::waterLily_Id, 0, Tile::UPDATE_CLIENTS);
18 }
19 }
20 }
21
22 return true;
23}