mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-20 06:53:30 +00:00
Restore cave generation + adjust ore spawn rates
This commit is contained in:
@@ -58,6 +58,8 @@
|
|||||||
#include "player/input/XperiaPlayInput.h"
|
#include "player/input/XperiaPlayInput.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "renderer/Chunk.h"
|
||||||
#include "player/input/MouseTurnInput.h"
|
#include "player/input/MouseTurnInput.h"
|
||||||
#include "../world/entity/MobFactory.h"
|
#include "../world/entity/MobFactory.h"
|
||||||
#include "../world/level/MobSpawner.h"
|
#include "../world/level/MobSpawner.h"
|
||||||
@@ -755,13 +757,6 @@ void Minecraft::tickInput() {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
#if defined(WIN32)
|
|
||||||
if (key == Keyboard::KEY_F) {
|
|
||||||
options.isFlying = !options.isFlying;
|
|
||||||
player->noPhysics = options.isFlying;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (key == Keyboard::KEY_L)
|
if (key == Keyboard::KEY_L)
|
||||||
options.viewDistance = (options.viewDistance + 1) % 4;
|
options.viewDistance = (options.viewDistance + 1) % 4;
|
||||||
|
|||||||
@@ -137,12 +137,6 @@ void Chunk::rebuild()
|
|||||||
Tile* tile = Tile::tiles[tileId];
|
Tile* tile = Tile::tiles[tileId];
|
||||||
int renderLayer = tile->getRenderLayer();
|
int renderLayer = tile->getRenderLayer();
|
||||||
|
|
||||||
// if (renderLayer == l)
|
|
||||||
// rendered |= tileRenderer.tesselateInWorld(tile, x, y, z);
|
|
||||||
// else {
|
|
||||||
// _layerChunks[_layerChunkCount[renderLayer]++] = cindex;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (renderLayer > l) {
|
if (renderLayer > l) {
|
||||||
renderNextLayer = true;
|
renderNextLayer = true;
|
||||||
doRenderLayer[renderLayer] = true;
|
doRenderLayer[renderLayer] = true;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "TileRenderer.h"
|
#include "TileRenderer.h"
|
||||||
|
#include "Chunk.h"
|
||||||
#include "../Minecraft.h"
|
#include "../Minecraft.h"
|
||||||
#include "Tesselator.h"
|
#include "Tesselator.h"
|
||||||
|
|
||||||
@@ -56,6 +57,7 @@ bool TileRenderer::tesselateBlockInWorld( Tile* tt, int x, int y, int z, float r
|
|||||||
float c2 = 0.8f;
|
float c2 = 0.8f;
|
||||||
float c3 = 0.6f;
|
float c3 = 0.6f;
|
||||||
|
|
||||||
|
|
||||||
float r11 = c11 * r;
|
float r11 = c11 * r;
|
||||||
float g11 = c11 * g;
|
float g11 = c11 * g;
|
||||||
float b11 = c11 * b;
|
float b11 = c11 * b;
|
||||||
@@ -128,6 +130,7 @@ bool TileRenderer::tesselateBlockInWorld( Tile* tt, int x, int y, int z, float r
|
|||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TileRenderer::tesselateInWorld( Tile* tile, int x, int y, int z, int fixedTexture )
|
void TileRenderer::tesselateInWorld( Tile* tile, int x, int y, int z, int fixedTexture )
|
||||||
{
|
{
|
||||||
this->fixedTexture = fixedTexture;
|
this->fixedTexture = fixedTexture;
|
||||||
|
|||||||
@@ -287,47 +287,52 @@ void RandomLevelSource::postProcess(ChunkSource* parent, int xt, int zt) {
|
|||||||
feature.place(level, &random, x, y, z);
|
feature.place(level, &random, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 20; i++) {
|
// Coal: common, wide Y range, moderate vein size
|
||||||
|
for (int i = 0; i < 16; i++) {
|
||||||
int x = xo + random.nextInt(16);
|
int x = xo + random.nextInt(16);
|
||||||
int y = random.nextInt(128);
|
int y = random.nextInt(128);
|
||||||
int z = zo + random.nextInt(16);
|
int z = zo + random.nextInt(16);
|
||||||
OreFeature feature(Tile::coalOre->id, 16);
|
OreFeature feature(Tile::coalOre->id, 14);
|
||||||
feature.place(level, &random, x, y, z);
|
feature.place(level, &random, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 20; i++) {
|
// Iron: common, limited to upper underground
|
||||||
|
for (int i = 0; i < 14; i++) {
|
||||||
int x = xo + random.nextInt(16);
|
int x = xo + random.nextInt(16);
|
||||||
int y = random.nextInt(64);
|
int y = random.nextInt(64);
|
||||||
int z = zo + random.nextInt(16);
|
int z = zo + random.nextInt(16);
|
||||||
OreFeature feature(Tile::ironOre->id, 8);
|
OreFeature feature(Tile::ironOre->id, 10);
|
||||||
feature.place(level, &random, x, y, z);
|
feature.place(level, &random, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Gold: rarer and deeper
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
int x = xo + random.nextInt(16);
|
int x = xo + random.nextInt(16);
|
||||||
int y = random.nextInt(32);
|
int y = random.nextInt(32);
|
||||||
int z = zo + random.nextInt(16);
|
int z = zo + random.nextInt(16);
|
||||||
OreFeature feature(Tile::goldOre->id, 8);
|
OreFeature feature(Tile::goldOre->id, 9);
|
||||||
feature.place(level, &random, x, y, z);
|
feature.place(level, &random, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++) {
|
// Redstone: somewhat common at low depths
|
||||||
|
for (int i = 0; i < 6; i++) {
|
||||||
int x = xo + random.nextInt(16);
|
int x = xo + random.nextInt(16);
|
||||||
int y = random.nextInt(16);
|
int y = random.nextInt(16);
|
||||||
int z = zo + random.nextInt(16);
|
int z = zo + random.nextInt(16);
|
||||||
OreFeature feature(Tile::redStoneOre->id, 7);
|
OreFeature feature(Tile::redStoneOre->id, 8);
|
||||||
feature.place(level, &random, x, y, z);
|
feature.place(level, &random, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 1; i++) {
|
// Emerald (diamond-equivalent): still rare but slightly more than vanilla
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
int x = xo + random.nextInt(16);
|
int x = xo + random.nextInt(16);
|
||||||
int y = random.nextInt(16);
|
int y = random.nextInt(16);
|
||||||
int z = zo + random.nextInt(16);
|
int z = zo + random.nextInt(16);
|
||||||
OreFeature feature(Tile::emeraldOre->id, 7);
|
OreFeature feature(Tile::emeraldOre->id, 6);
|
||||||
feature.place(level, &random, x, y, z);
|
feature.place(level, &random, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
// lapis ore
|
// Lapis: rare and not in very high Y
|
||||||
for (int i = 0; i < 1; i++) {
|
for (int i = 0; i < 1; i++) {
|
||||||
int x = xo + random.nextInt(16);
|
int x = xo + random.nextInt(16);
|
||||||
int y = random.nextInt(16) + random.nextInt(16);
|
int y = random.nextInt(16) + random.nextInt(16);
|
||||||
@@ -504,7 +509,8 @@ LevelChunk* RandomLevelSource::getChunk(int xOffs, int zOffs) {
|
|||||||
prepareHeights(xOffs, zOffs, blocks, 0, temperatures);//biomes, temperatures);
|
prepareHeights(xOffs, zOffs, blocks, 0, temperatures);//biomes, temperatures);
|
||||||
buildSurfaces(xOffs, zOffs, blocks, biomes);
|
buildSurfaces(xOffs, zOffs, blocks, biomes);
|
||||||
|
|
||||||
//caveFeature.apply(this, level, xOffs, zOffs, blocks, LevelChunk::ChunkBlockCount);
|
// Carve caves into the chunk
|
||||||
|
caveFeature.apply(this, level, xOffs, zOffs, blocks, LevelChunk::ChunkBlockCount);
|
||||||
levelChunk->recalcHeightmap();
|
levelChunk->recalcHeightmap();
|
||||||
|
|
||||||
return levelChunk;
|
return levelChunk;
|
||||||
|
|||||||
Reference in New Issue
Block a user