mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-05 18:35:06 +00:00
chore: format Minecraft.Client
This commit is contained in:
@@ -3,45 +3,48 @@
|
||||
#include "../../Minecraft.World/Headers/net.minecraft.world.level.chunk.h"
|
||||
#include "../../Minecraft.World/Level/RandomLevelSource.h"
|
||||
|
||||
|
||||
class ServerChunkCache;
|
||||
|
||||
// 4J - various alterations here to make this thread safe, and operate as a fixed sized cache
|
||||
class MultiPlayerChunkCache : public ChunkSource
|
||||
{
|
||||
friend class LevelRenderer;
|
||||
// 4J - various alterations here to make this thread safe, and operate as a
|
||||
// fixed sized cache
|
||||
class MultiPlayerChunkCache : public ChunkSource {
|
||||
friend class LevelRenderer;
|
||||
|
||||
private:
|
||||
LevelChunk *emptyChunk;
|
||||
LevelChunk *waterChunk;
|
||||
LevelChunk* emptyChunk;
|
||||
LevelChunk* waterChunk;
|
||||
|
||||
std::vector<LevelChunk *> loadedChunkList;
|
||||
std::vector<LevelChunk*> loadedChunkList;
|
||||
|
||||
LevelChunk **cache;
|
||||
// 4J - added for multithreaded support
|
||||
CRITICAL_SECTION m_csLoadCreate;
|
||||
// 4J - size of cache is defined by size of one side - must be even
|
||||
int XZSIZE;
|
||||
int XZOFFSET;
|
||||
bool *hasData;
|
||||
LevelChunk** cache;
|
||||
// 4J - added for multithreaded support
|
||||
CRITICAL_SECTION m_csLoadCreate;
|
||||
// 4J - size of cache is defined by size of one side - must be even
|
||||
int XZSIZE;
|
||||
int XZOFFSET;
|
||||
bool* hasData;
|
||||
|
||||
Level *level;
|
||||
Level* level;
|
||||
|
||||
public:
|
||||
MultiPlayerChunkCache(Level *level);
|
||||
~MultiPlayerChunkCache();
|
||||
MultiPlayerChunkCache(Level* level);
|
||||
~MultiPlayerChunkCache();
|
||||
virtual bool hasChunk(int x, int z);
|
||||
virtual bool reallyHasChunk(int x, int z);
|
||||
virtual bool reallyHasChunk(int x, int z);
|
||||
virtual void drop(int x, int z);
|
||||
virtual LevelChunk *create(int x, int z);
|
||||
virtual LevelChunk *getChunk(int x, int z);
|
||||
virtual bool save(bool force, ProgressListener *progressListener);
|
||||
virtual LevelChunk* create(int x, int z);
|
||||
virtual LevelChunk* getChunk(int x, int z);
|
||||
virtual bool save(bool force, ProgressListener* progressListener);
|
||||
virtual bool tick();
|
||||
virtual bool shouldSave();
|
||||
virtual void postProcess(ChunkSource *parent, int x, int z);
|
||||
virtual void postProcess(ChunkSource* parent, int x, int z);
|
||||
virtual std::wstring gatherStats();
|
||||
virtual std::vector<Biome::MobSpawnerData *> *getMobsAt(MobCategory *mobCategory, int x, int y, int z);
|
||||
virtual TilePos *findNearestMapFeature(Level *level, const std::wstring &featureName, int x, int y, int z);
|
||||
virtual void dataReceived(int x, int z); // 4J added
|
||||
virtual std::vector<Biome::MobSpawnerData*>* getMobsAt(
|
||||
MobCategory* mobCategory, int x, int y, int z);
|
||||
virtual TilePos* findNearestMapFeature(Level* level,
|
||||
const std::wstring& featureName,
|
||||
int x, int y, int z);
|
||||
virtual void dataReceived(int x, int z); // 4J added
|
||||
|
||||
virtual LevelChunk **getCache() { return cache; } // 4J added
|
||||
virtual LevelChunk** getCache() { return cache; } // 4J added
|
||||
};
|
||||
Reference in New Issue
Block a user