Files
MinecraftConsoles/Minecraft.World/Layer.h

36 lines
543 B
C
Raw Normal View History

2026-03-01 12:16:08 +08:00
#pragma once
#include "ArrayWithLength.h"
class LevelType;
#ifndef _CONTENT_PACAKGE
#define _BIOME_OVERRIDE
#endif
class Layer
{
private:
int64_t seed;
2026-03-01 12:16:08 +08:00
protected:
shared_ptr<Layer>parent;
2026-03-01 12:16:08 +08:00
private:
int64_t rval;
int64_t seedMixup;
2026-03-01 12:16:08 +08:00
public:
static LayerArray getDefaultLayers(int64_t seed, LevelType *levelType);
2026-03-01 12:16:08 +08:00
Layer(int64_t seedMixup);
2026-03-01 12:16:08 +08:00
virtual void init(int64_t seed);
virtual void initRandom(int64_t x, int64_t y);
2026-03-01 12:16:08 +08:00
protected:
int nextRandom(int max);
public:
virtual intArray getArea(int xo, int yo, int w, int h) = 0;
};