mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-30 17:06:00 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -5,155 +5,116 @@
|
||||
#include "WaterLevelChunk.h"
|
||||
#include "../Headers/net.minecraft.world.level.biome.h"
|
||||
|
||||
WaterLevelChunk::WaterLevelChunk(Level *level, byteArray blocks, int x, int z): LevelChunk(level,blocks,x,z)
|
||||
{
|
||||
dontSave = true;
|
||||
// Set this as fully post-processed, so we don't try and run post-processing on any edge chunks that will overlap into real chunks
|
||||
terrainPopulated = LevelChunk::sTerrainPopulatedAllNeighbours | LevelChunk::sTerrainPostPostProcessed;
|
||||
WaterLevelChunk::WaterLevelChunk(Level* level, byteArray blocks, int x, int z)
|
||||
: LevelChunk(level, blocks, x, z) {
|
||||
dontSave = true;
|
||||
// Set this as fully post-processed, so we don't try and run post-processing
|
||||
// on any edge chunks that will overlap into real chunks
|
||||
terrainPopulated = LevelChunk::sTerrainPopulatedAllNeighbours |
|
||||
LevelChunk::sTerrainPostPostProcessed;
|
||||
}
|
||||
|
||||
bool WaterLevelChunk::isAt(int x, int z)
|
||||
{
|
||||
return x == this->x && z == this->z;
|
||||
bool WaterLevelChunk::isAt(int x, int z) {
|
||||
return x == this->x && z == this->z;
|
||||
}
|
||||
|
||||
void WaterLevelChunk::recalcBlockLights()
|
||||
{
|
||||
void WaterLevelChunk::recalcBlockLights() {}
|
||||
|
||||
void WaterLevelChunk::recalcHeightmapOnly() {}
|
||||
|
||||
void WaterLevelChunk::recalcHeightmap() {}
|
||||
|
||||
void WaterLevelChunk::lightLava() {}
|
||||
|
||||
bool WaterLevelChunk::setTileAndData(int x, int y, int z, int _tile,
|
||||
int _data) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void WaterLevelChunk::recalcHeightmapOnly()
|
||||
{
|
||||
bool WaterLevelChunk::setTile(int x, int y, int z, int _tile) { return true; }
|
||||
|
||||
bool WaterLevelChunk::setData(int x, int y, int z, int val, int mask,
|
||||
bool* maskedBitsChanged) {
|
||||
*maskedBitsChanged = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void WaterLevelChunk::recalcHeightmap()
|
||||
{
|
||||
void WaterLevelChunk::setBrightness(LightLayer::variety layer, int x, int y,
|
||||
int z, int brightness) {}
|
||||
|
||||
void WaterLevelChunk::addEntity(std::shared_ptr<Entity> e) {}
|
||||
|
||||
void WaterLevelChunk::removeEntity(std::shared_ptr<Entity> e) {}
|
||||
|
||||
void WaterLevelChunk::removeEntity(std::shared_ptr<Entity> e, int yc) {}
|
||||
|
||||
void WaterLevelChunk::skyBrightnessChanged() {}
|
||||
|
||||
std::shared_ptr<TileEntity> WaterLevelChunk::getTileEntity(int x, int y,
|
||||
int z) {
|
||||
return std::shared_ptr<TileEntity>();
|
||||
}
|
||||
|
||||
void WaterLevelChunk::lightLava()
|
||||
{
|
||||
}
|
||||
void WaterLevelChunk::addTileEntity(std::shared_ptr<TileEntity> te) {}
|
||||
|
||||
bool WaterLevelChunk::setTileAndData(int x, int y, int z, int _tile, int _data)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
void WaterLevelChunk::setTileEntity(int x, int y, int z,
|
||||
std::shared_ptr<TileEntity> tileEntity) {}
|
||||
|
||||
bool WaterLevelChunk::setTile(int x, int y, int z, int _tile)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
void WaterLevelChunk::removeTileEntity(int x, int y, int z) {}
|
||||
|
||||
bool WaterLevelChunk::setData(int x, int y, int z, int val, int mask, bool *maskedBitsChanged)
|
||||
{
|
||||
*maskedBitsChanged = true;
|
||||
return true;
|
||||
}
|
||||
void WaterLevelChunk::load() {}
|
||||
|
||||
void WaterLevelChunk::setBrightness(LightLayer::variety layer, int x, int y, int z, int brightness)
|
||||
{
|
||||
}
|
||||
void WaterLevelChunk::unload(bool unloadTileEntities) // 4J - added parameter
|
||||
{}
|
||||
|
||||
void WaterLevelChunk::addEntity(std::shared_ptr<Entity> e)
|
||||
{
|
||||
}
|
||||
void WaterLevelChunk::markUnsaved() {}
|
||||
|
||||
void WaterLevelChunk::removeEntity(std::shared_ptr<Entity> e)
|
||||
{
|
||||
}
|
||||
void WaterLevelChunk::getEntities(std::shared_ptr<Entity> except, AABB bb,
|
||||
std::vector<std::shared_ptr<Entity> >& es) {}
|
||||
|
||||
void WaterLevelChunk::removeEntity(std::shared_ptr<Entity> e, int yc)
|
||||
{
|
||||
}
|
||||
void WaterLevelChunk::getEntitiesOfClass(
|
||||
const std::type_info& ec, AABB bb,
|
||||
std::vector<std::shared_ptr<Entity> >& es) {}
|
||||
|
||||
void WaterLevelChunk::skyBrightnessChanged()
|
||||
{
|
||||
}
|
||||
int WaterLevelChunk::countEntities() { return 0; }
|
||||
|
||||
std::shared_ptr<TileEntity> WaterLevelChunk::getTileEntity(int x, int y, int z)
|
||||
{
|
||||
return std::shared_ptr<TileEntity>();
|
||||
}
|
||||
bool WaterLevelChunk::shouldSave(bool force) { return false; }
|
||||
|
||||
void WaterLevelChunk::addTileEntity(std::shared_ptr<TileEntity> te)
|
||||
{
|
||||
}
|
||||
void WaterLevelChunk::setBlocks(byteArray newBlocks, int sub) {}
|
||||
|
||||
void WaterLevelChunk::setTileEntity(int x, int y, int z, std::shared_ptr<TileEntity> tileEntity)
|
||||
{
|
||||
}
|
||||
|
||||
void WaterLevelChunk::removeTileEntity(int x, int y, int z)
|
||||
{
|
||||
}
|
||||
|
||||
void WaterLevelChunk::load()
|
||||
{
|
||||
}
|
||||
|
||||
void WaterLevelChunk::unload(bool unloadTileEntities) // 4J - added parameter
|
||||
{
|
||||
}
|
||||
|
||||
void WaterLevelChunk::markUnsaved()
|
||||
{
|
||||
}
|
||||
|
||||
void WaterLevelChunk::getEntities(std::shared_ptr<Entity> except, AABB bb, std::vector<std::shared_ptr<Entity> > &es)
|
||||
{
|
||||
}
|
||||
|
||||
void WaterLevelChunk::getEntitiesOfClass(const std::type_info& ec, AABB bb, std::vector<std::shared_ptr<Entity> > &es)
|
||||
{
|
||||
}
|
||||
|
||||
int WaterLevelChunk::countEntities()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool WaterLevelChunk::shouldSave(bool force)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void WaterLevelChunk::setBlocks(byteArray newBlocks, int sub)
|
||||
{
|
||||
}
|
||||
|
||||
int WaterLevelChunk::setBlocksAndData(byteArray data, int x0, int y0, int z0, int x1, int y1, int z1, int p, bool includeLighting/* = true*/)
|
||||
{
|
||||
int WaterLevelChunk::setBlocksAndData(byteArray data, int x0, int y0, int z0,
|
||||
int x1, int y1, int z1, int p,
|
||||
bool includeLighting /* = true*/) {
|
||||
int xs = x1 - x0;
|
||||
int ys = y1 - y0;
|
||||
int zs = z1 - z0;
|
||||
|
||||
int s = xs * ys * zs;
|
||||
|
||||
if( includeLighting )
|
||||
{
|
||||
return s + s / 2 * 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
return s + s / 2;
|
||||
}
|
||||
if (includeLighting) {
|
||||
return s + s / 2 * 3;
|
||||
} else {
|
||||
return s + s / 2;
|
||||
}
|
||||
}
|
||||
|
||||
bool WaterLevelChunk::testSetBlocksAndData(byteArray data, int x0, int y0, int z0, int x1, int y1, int z1, int p)
|
||||
{
|
||||
return false;
|
||||
bool WaterLevelChunk::testSetBlocksAndData(byteArray data, int x0, int y0,
|
||||
int z0, int x1, int y1, int z1,
|
||||
int p) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Random *WaterLevelChunk::getRandom(__int64 l)
|
||||
{
|
||||
return new Random((level->getSeed() + x * x * 4987142 + x * 5947611 + z * z * 4392871l + z * 389711) ^ l);
|
||||
Random* WaterLevelChunk::getRandom(__int64 l) {
|
||||
return new Random((level->getSeed() + x * x * 4987142 + x * 5947611 +
|
||||
z * z * 4392871l + z * 389711) ^
|
||||
l);
|
||||
}
|
||||
|
||||
void WaterLevelChunk::setLevelChunkBrightness(LightLayer::variety layer, int x, int y, int z, int brightness)
|
||||
{
|
||||
LevelChunk::setBrightness(layer, x, y, z, brightness);
|
||||
void WaterLevelChunk::setLevelChunkBrightness(LightLayer::variety layer, int x,
|
||||
int y, int z, int brightness) {
|
||||
LevelChunk::setBrightness(layer, x, y, z, brightness);
|
||||
}
|
||||
|
||||
Biome *WaterLevelChunk::getBiome(int x, int z, BiomeSource *biomeSource)
|
||||
{
|
||||
return NULL;
|
||||
Biome* WaterLevelChunk::getBiome(int x, int z, BiomeSource* biomeSource) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user