the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 55 lines 2.5 kB view raw
1#pragma once 2#include "LevelChunk.h" 3#include "Definitions.h" 4 5class Level; 6 7class EmptyLevelChunk: public LevelChunk 8{ 9public: 10 using LevelChunk::getBlocksAndData; 11 using LevelChunk::getEntities; 12 using LevelChunk::getEntitiesOfClass; 13 14 EmptyLevelChunk(Level *level, int x, int z); 15 EmptyLevelChunk(Level *level, byteArray blocks, int x, int z); 16 bool isAt(int x, int z); 17 int getHeightmap(int x, int z); 18 void recalcBlockLights(); 19 void recalcHeightmapOnly(); 20 void recalcHeightmap(); 21 void lightLava(); 22 int getTile(int x, int y, int z); 23 bool setTileAndData(int x, int y, int z, int _tile, int _data); 24 bool setTile(int x, int y, int z, int _tile); 25 int getData(int x, int y, int z); 26 bool setData(int x, int y, int z, int val, int mask, bool *maskedBitsChanged); // 4J added mask 27 int getBrightness(LightLayer::variety layer, int x, int y, int z); 28 void getNeighbourBrightnesses(int *brightnesses, LightLayer::variety layer, int x, int y, int z); // 4J added 29 void setBrightness(LightLayer::variety layer, int x, int y, int z, int brightness); 30 int getRawBrightness(int x, int y, int z, int skyDampen); 31 void addEntity(shared_ptr<Entity> e); 32 void removeEntity(shared_ptr<Entity> e); 33 void removeEntity(shared_ptr<Entity> e, int yc); 34 bool isSkyLit(int x, int y, int z); 35 void skyBrightnessChanged(); 36 shared_ptr<TileEntity> getTileEntity(int x, int y, int z); 37 void addTileEntity(shared_ptr<TileEntity> te); 38 void setTileEntity(int x, int y, int z, shared_ptr<TileEntity> tileEntity); 39 void removeTileEntity(int x, int y, int z); 40 void load(); 41 void unload(bool unloadTileEntities) ; // 4J - added parameter 42 bool containsPlayer(); // 4J added 43 void markUnsaved(); 44 void getEntities(shared_ptr<Entity> except, AABB bb, vector<shared_ptr<Entity> > &es, EntitySelector *selector); 45 void getEntitiesOfClass(const type_info& ec, AABB bb, vector<shared_ptr<Entity> > &es, EntitySelector *selector); 46 int countEntities(); 47 bool shouldSave(bool force); 48 void setBlocks(byteArray newBlocks, int sub); 49 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 50 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 51 bool testSetBlocksAndData(byteArray data, int x0, int y0, int z0, int x1, int y1, int z1, int p); // 4J added 52 Random *getRandom(__int64 l); 53 bool isEmpty(); 54 virtual void reSyncLighting() {}; // 4J added 55};