diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/Region.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.World/Region.h')
| -rw-r--r-- | Minecraft.World/Region.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Minecraft.World/Region.h b/Minecraft.World/Region.h new file mode 100644 index 00000000..0d200a35 --- /dev/null +++ b/Minecraft.World/Region.h @@ -0,0 +1,51 @@ +#pragma once + +#include "LevelSource.h" + +class Material; +class TileEntity; +class BiomeSource; + +class Region : public LevelSource +{ +private: + int xc1, zc1; + LevelChunk2DArray *chunks; + Level *level; + bool allEmpty; + + // AP - added a caching system for Chunk::rebuild to take advantage of + int xcCached, zcCached; + unsigned char *CachedTiles; + +public: + Region(Level *level, int x1, int y1, int z1, int x2, int y2, int z2); + virtual ~Region(); + bool isAllEmpty(); + int getTile(int x, int y, int z); + shared_ptr<TileEntity> getTileEntity(int x, int y, int z); + float getBrightness(int x, int y, int z, int emitt); + float getBrightness(int x, int y, int z); + int getLightColor(int x, int y, int z, int emitt, int tileId = -1); // 4J - change brought forward from 1.8.2 + int getRawBrightness(int x, int y, int z); + int getRawBrightness(int x, int y, int z, bool propagate); + int getData(int x, int y, int z); + Material *getMaterial(int x, int y, int z); + BiomeSource *getBiomeSource(); + Biome *getBiome(int x, int z); + bool isSolidRenderTile(int x, int y, int z); + bool isSolidBlockingTile(int x, int y, int z); + bool isTopSolidBlocking(int x, int y, int z); + bool isEmptyTile(int x, int y, int z); + + // 4J - changes brought forward from 1.8.2 + int getBrightnessPropagate(LightLayer::variety layer, int x, int y, int z, int tileId); // 4J added tileId + int getBrightness(LightLayer::variety layer, int x, int y, int z); + + int getMaxBuildHeight(); + + LevelChunk* getLevelChunk(int x, int y, int z); + + // AP - added a caching system for Chunk::rebuild to take advantage of + void setCachedTiles(unsigned char *tiles, int xc, int zc); +};
\ No newline at end of file |
