the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 39 lines 951 B view raw
1#include "stdafx.h" 2#include "net.minecraft.world.level.newbiome.layer.h" 3#include "net.minecraft.world.level.biome.h" 4 5AddSnowLayer::AddSnowLayer(__int64 seedMixup, shared_ptr<Layer> parent) : Layer(seedMixup) 6{ 7 this->parent = parent; 8} 9 10intArray AddSnowLayer::getArea(int xo, int yo, int w, int h) 11{ 12 int px = xo - 1; 13 int py = yo - 1; 14 int pw = w + 2; 15 int ph = h + 2; 16 intArray p = parent->getArea(px, py, pw, ph); 17 18 intArray result = IntCache::allocate(w * h); 19 for (int y = 0; y < h; y++) 20 { 21 for (int x = 0; x < w; x++) 22 { 23 int c = p[(x + 1) + (y + 1) * pw]; 24 initRandom(x + xo, y + yo); 25 if (c == 0) 26 { 27 result[x + y * w] = 0; 28 } 29 else 30 { 31 int r = nextRandom(5); 32 if (r == 0) r = Biome::iceFlats->id; 33 else r = 1; 34 result[x + y * w] = r; 35 } 36 } 37 } 38 return result; 39}