the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 37 lines 853 B view raw
1#include "stdafx.h" 2#include "net.minecraft.world.level.h" 3#include "LargeFeature.h" 4 5const wstring LargeFeature::STRONGHOLD = L"StrongHold"; 6 7LargeFeature::LargeFeature() 8{ 9 radius = 8; 10 random = new Random(); 11} 12 13LargeFeature::~LargeFeature() 14{ 15 delete random; 16} 17 18void LargeFeature::apply(ChunkSource *ChunkSource, Level *level, int xOffs, int zOffs, byteArray blocks) 19{ 20 int r = radius; 21 this->level = level; 22 23 random->setSeed(level->getSeed()); 24 __int64 xScale = random->nextLong(); 25 __int64 zScale = random->nextLong(); 26 27 for (int x = xOffs - r; x <= xOffs + r; x++) 28 { 29 for (int z = zOffs - r; z <= zOffs + r; z++) 30 { 31 __int64 xx = x * xScale; 32 __int64 zz = z * zScale; 33 random->setSeed(xx ^ zz ^ level->getSeed()); 34 addFeature(level, x, z, xOffs, zOffs, blocks); 35 } 36 } 37}