From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.World/WaterLevelChunk.h | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Minecraft.World/WaterLevelChunk.h (limited to 'Minecraft.World/WaterLevelChunk.h') diff --git a/Minecraft.World/WaterLevelChunk.h b/Minecraft.World/WaterLevelChunk.h new file mode 100644 index 00000000..18dc8a05 --- /dev/null +++ b/Minecraft.World/WaterLevelChunk.h @@ -0,0 +1,45 @@ +#pragma once +#include "LevelChunk.h" +#include "Definitions.h" + +class Level; + +class WaterLevelChunk: public LevelChunk +{ +public: + using LevelChunk::getEntities; + using LevelChunk::getEntitiesOfClass; + + WaterLevelChunk(Level *level, byteArray blocks, int x, int z); + bool isAt(int x, int z); + void recalcBlockLights(); + void recalcHeightmapOnly(); + void recalcHeightmap(); + void lightLava(); + bool setTileAndData(int x, int y, int z, int _tile, int _data); + bool setTile(int x, int y, int z, int _tile); + bool setData(int x, int y, int z, int val, int mask, bool *maskedBitsChanged); // 4J added mask + void setBrightness(LightLayer::variety layer, int x, int y, int z, int brightness); + void setLevelChunkBrightness(LightLayer::variety layer, int x, int y, int z, int brightness); // 4J added - calls the setBrightness method of the parent class + void addEntity(shared_ptr e); + void removeEntity(shared_ptr e); + void removeEntity(shared_ptr e, int yc); + void skyBrightnessChanged(); + shared_ptr getTileEntity(int x, int y, int z); + void addTileEntity(shared_ptr te); + void setTileEntity(int x, int y, int z, shared_ptr tileEntity); + void removeTileEntity(int x, int y, int z); + void load(); + void unload(bool unloadTileEntities) ; // 4J - added parameter + void markUnsaved(); + void getEntities(shared_ptr except, AABB bb, vector > &es); + void getEntitiesOfClass(const type_info& ec, AABB bb, vector > &es); + int countEntities(); + bool shouldSave(bool force); + void setBlocks(byteArray newBlocks, int sub); + int setBlocksAndData(byteArray data, int x0, int y0, int z0, int x1, int y1, int z1, int p, bool includeLighting = true); // 4J - added includeLighting parameter; + bool testSetBlocksAndData(byteArray data, int x0, int y0, int z0, int x1, int y1, int z1, int p); + Random *getRandom(__int64 l); + virtual Biome *getBiome(int x, int z, BiomeSource *biomeSource); + virtual void reSyncLighting() {}; // 4J added +}; -- cgit v1.2.3