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