the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 164 lines 3.3 kB view raw
1#include "stdafx.h" 2#include "Arrays.h" 3#include "net.minecraft.world.level.h" 4#include "net.minecraft.world.phys.h" 5#include "WaterLevelChunk.h" 6#include "net.minecraft.world.level.biome.h" 7 8WaterLevelChunk::WaterLevelChunk(Level *level, byteArray blocks, int x, int z): LevelChunk(level,blocks,x,z) 9{ 10 dontSave = true; 11 // 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 12 terrainPopulated = LevelChunk::sTerrainPopulatedAllNeighbours | LevelChunk::sTerrainPostPostProcessed; 13} 14 15bool WaterLevelChunk::isAt(int x, int z) 16{ 17 return x == this->x && z == this->z; 18} 19 20void WaterLevelChunk::recalcBlockLights() 21{ 22} 23 24void WaterLevelChunk::recalcHeightmapOnly() 25{ 26} 27 28void WaterLevelChunk::recalcHeightmap() 29{ 30} 31 32void WaterLevelChunk::lightLava() 33{ 34} 35 36bool WaterLevelChunk::setTileAndData(int x, int y, int z, int _tile, int _data) 37{ 38 return true; 39} 40 41bool WaterLevelChunk::setTile(int x, int y, int z, int _tile) 42{ 43 return true; 44} 45 46bool WaterLevelChunk::setData(int x, int y, int z, int val, int mask, bool *maskedBitsChanged) 47{ 48 *maskedBitsChanged = true; 49 return true; 50} 51 52void WaterLevelChunk::setBrightness(LightLayer::variety layer, int x, int y, int z, int brightness) 53{ 54} 55 56void WaterLevelChunk::addEntity(shared_ptr<Entity> e) 57{ 58} 59 60void WaterLevelChunk::removeEntity(shared_ptr<Entity> e) 61{ 62} 63 64void WaterLevelChunk::removeEntity(shared_ptr<Entity> e, int yc) 65{ 66} 67 68void WaterLevelChunk::skyBrightnessChanged() 69{ 70} 71 72shared_ptr<TileEntity> WaterLevelChunk::getTileEntity(int x, int y, int z) 73{ 74 return shared_ptr<TileEntity>(); 75} 76 77void WaterLevelChunk::addTileEntity(shared_ptr<TileEntity> te) 78{ 79} 80 81void WaterLevelChunk::setTileEntity(int x, int y, int z, shared_ptr<TileEntity> tileEntity) 82{ 83} 84 85void WaterLevelChunk::removeTileEntity(int x, int y, int z) 86{ 87} 88 89void WaterLevelChunk::load() 90{ 91} 92 93void WaterLevelChunk::unload(bool unloadTileEntities) // 4J - added parameter 94{ 95} 96 97bool WaterLevelChunk::containsPlayer() 98{ 99 return false; 100} 101 102void WaterLevelChunk::markUnsaved() 103{ 104} 105 106void WaterLevelChunk::getEntities(shared_ptr<Entity> except, AABB bb, vector<shared_ptr<Entity> > &es) 107{ 108} 109 110void WaterLevelChunk::getEntitiesOfClass(const type_info& ec, AABB bb, vector<shared_ptr<Entity> > &es) 111{ 112} 113 114int WaterLevelChunk::countEntities() 115{ 116 return 0; 117} 118 119bool WaterLevelChunk::shouldSave(bool force) 120{ 121 return false; 122} 123 124void WaterLevelChunk::setBlocks(byteArray newBlocks, int sub) 125{ 126} 127 128int WaterLevelChunk::setBlocksAndData(byteArray data, int x0, int y0, int z0, int x1, int y1, int z1, int p, bool includeLighting/* = true*/) 129{ 130 int xs = x1 - x0; 131 int ys = y1 - y0; 132 int zs = z1 - z0; 133 134 int s = xs * ys * zs; 135 136 if( includeLighting ) 137 { 138 return s + s / 2 * 3; 139 } 140 else 141 { 142 return s + s / 2; 143 } 144} 145 146bool WaterLevelChunk::testSetBlocksAndData(byteArray data, int x0, int y0, int z0, int x1, int y1, int z1, int p) 147{ 148 return false; 149} 150 151Random *WaterLevelChunk::getRandom(__int64 l) 152{ 153 return new Random((level->getSeed() + x * x * 4987142 + x * 5947611 + z * z * 4392871l + z * 389711) ^ l); 154} 155 156void WaterLevelChunk::setLevelChunkBrightness(LightLayer::variety layer, int x, int y, int z, int brightness) 157{ 158 LevelChunk::setBrightness(layer, x, y, z, brightness); 159} 160 161Biome *WaterLevelChunk::getBiome(int x, int z, BiomeSource *biomeSource) 162{ 163 return NULL; 164}