aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/EmptyLevelChunk.h
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/EmptyLevelChunk.h
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.World/EmptyLevelChunk.h')
-rw-r--r--Minecraft.World/EmptyLevelChunk.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/Minecraft.World/EmptyLevelChunk.h b/Minecraft.World/EmptyLevelChunk.h
new file mode 100644
index 00000000..02ffc176
--- /dev/null
+++ b/Minecraft.World/EmptyLevelChunk.h
@@ -0,0 +1,54 @@
+#pragma once
+#include "LevelChunk.h"
+#include "Definitions.h"
+
+class Level;
+
+class EmptyLevelChunk: public LevelChunk
+{
+public:
+ using LevelChunk::getBlocksAndData;
+ using LevelChunk::getEntities;
+ using LevelChunk::getEntitiesOfClass;
+
+ EmptyLevelChunk(Level *level, int x, int z);
+ EmptyLevelChunk(Level *level, byteArray blocks, int x, int z);
+ bool isAt(int x, int z);
+ int getHeightmap(int x, int z);
+ void recalcBlockLights();
+ void recalcHeightmapOnly();
+ void recalcHeightmap();
+ void lightLava();
+ int getTile(int x, int y, int z);
+ bool setTileAndData(int x, int y, int z, int _tile, int _data);
+ bool setTile(int x, int y, int z, int _tile);
+ int getData(int x, int y, int z);
+ bool setData(int x, int y, int z, int val, int mask, bool *maskedBitsChanged); // 4J added mask
+ int getBrightness(LightLayer::variety layer, int x, int y, int z);
+ void getNeighbourBrightnesses(int *brightnesses, LightLayer::variety layer, int x, int y, int z); // 4J added
+ void setBrightness(LightLayer::variety layer, int x, int y, int z, int brightness);
+ int getRawBrightness(int x, int y, int z, int skyDampen);
+ void addEntity(shared_ptr<Entity> e);
+ void removeEntity(shared_ptr<Entity> e);
+ void removeEntity(shared_ptr<Entity> e, int yc);
+ bool isSkyLit(int x, int y, int z);
+ void skyBrightnessChanged();
+ shared_ptr<TileEntity> getTileEntity(int x, int y, int z);
+ void addTileEntity(shared_ptr<TileEntity> te);
+ void setTileEntity(int x, int y, int z, shared_ptr<TileEntity> tileEntity);
+ void removeTileEntity(int x, int y, int z);
+ void load();
+ void unload(bool unloadTileEntities) ; // 4J - added parameter
+ void markUnsaved();
+ void getEntities(shared_ptr<Entity> except, AABB bb, vector<shared_ptr<Entity> > &es);
+ void getEntitiesOfClass(const type_info& ec, AABB bb, vector<shared_ptr<Entity> > &es);
+ int countEntities();
+ bool shouldSave(bool force);
+ void setBlocks(byteArray newBlocks, int sub);
+ int getBlocksAndData(byteArray data, int x0, int y0, int z0, int x1, int y1, int z1, int p, bool includeLighting = true); // 4J - added includeLighting parameter
+ 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); // 4J added
+ Random *getRandom(__int64 l);
+ bool isEmpty();
+ virtual void reSyncLighting() {}; // 4J added
+};