the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 39 lines 796 B view raw
1#include "stdafx.h" 2#include "net.minecraft.world.level.h" 3#include "net.minecraft.world.level.tile.h" 4#include "net.minecraft.h" 5#include "VinesFeature.h" 6 7 8VinesFeature::VinesFeature() 9{ 10} 11 12bool VinesFeature::place(Level *level, Random *random, int x, int y, int z) 13{ 14 int ox = x; 15 int oz = z; 16 17 while (y < 128) 18 { 19 if (level->isEmptyTile(x, y, z)) 20 { 21 for (int face = Facing::NORTH; face <= Facing::EAST; face++) 22 { 23 if (Tile::vine->mayPlace(level, x, y, z, face)) 24 { 25 level->setTileAndData(x, y, z, Tile::vine_Id, 1 << Direction::FACING_DIRECTION[Facing::OPPOSITE_FACING[face]], Tile::UPDATE_CLIENTS); 26 break; 27 } 28 } 29 } 30 else 31 { 32 x = ox + random->nextInt(4) - random->nextInt(4); 33 z = oz + random->nextInt(4) - random->nextInt(4); 34 } 35 y++; 36 } 37 38 return true; 39}