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 "net.minecraft.world.level.biome.h"
3#include "net.minecraft.world.level.newbiome.layer.h"
4
5DownfallMixerLayer::DownfallMixerLayer(shared_ptr<Layer>downfall, shared_ptr<Layer>parent, int layer) : Layer(0)
6{
7 this->parent = parent;
8 this->downfall = downfall;
9 this->layer = layer;
10}
11
12intArray DownfallMixerLayer::getArea(int xo, int yo, int w, int h)
13{
14 intArray b = parent->getArea(xo, yo, w, h);
15 intArray d = downfall->getArea(xo, yo, w, h);
16
17 intArray result = IntCache::allocate(w * h);
18 for (int i = 0; i < w * h; i++)
19 {
20 result[i] = d[i] + (Biome::biomes[b[i]]->getDownfallInt() - d[i]) / (layer + 1);
21 }
22
23 return result;
24}