diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-05-27 19:41:34 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-05-27 19:41:34 +0200 |
commit | 825ce1e5e0b11c04904915921374e62aa4f657c0 (patch) | |
tree | fef0e184cc535e3705b7643f42c1641dd5d48e87 /source | |
parent | Added a snow finisher generator (diff) | |
download | cuberite-825ce1e5e0b11c04904915921374e62aa4f657c0.tar cuberite-825ce1e5e0b11c04904915921374e62aa4f657c0.tar.gz cuberite-825ce1e5e0b11c04904915921374e62aa4f657c0.tar.bz2 cuberite-825ce1e5e0b11c04904915921374e62aa4f657c0.tar.lz cuberite-825ce1e5e0b11c04904915921374e62aa4f657c0.tar.xz cuberite-825ce1e5e0b11c04904915921374e62aa4f657c0.tar.zst cuberite-825ce1e5e0b11c04904915921374e62aa4f657c0.zip |
Diffstat (limited to '')
-rw-r--r-- | source/BlockID.cpp | 4 | ||||
-rw-r--r-- | source/FinishGen.cpp | 30 |
2 files changed, 33 insertions, 1 deletions
diff --git a/source/BlockID.cpp b/source/BlockID.cpp index d21c4d509..6d98d0d89 100644 --- a/source/BlockID.cpp +++ b/source/BlockID.cpp @@ -247,6 +247,7 @@ public: g_BlockIsSnowable[E_BLOCK_FIRE] = false;
g_BlockIsSnowable[E_BLOCK_GLASS] = false;
g_BlockIsSnowable[E_BLOCK_ICE] = false;
+ g_BlockIsSnowable[E_BLOCK_LAVA] = false;
g_BlockIsSnowable[E_BLOCK_LOCKED_CHEST] = false;
g_BlockIsSnowable[E_BLOCK_REDSTONE_REPEATER_OFF] = false;
g_BlockIsSnowable[E_BLOCK_REDSTONE_REPEATER_ON] = false;
@@ -259,10 +260,13 @@ public: g_BlockIsSnowable[E_BLOCK_SAPLING] = false;
g_BlockIsSnowable[E_BLOCK_SIGN_POST] = false;
g_BlockIsSnowable[E_BLOCK_SNOW] = false;
+ g_BlockIsSnowable[E_BLOCK_STATIONARY_LAVA] = false;
+ g_BlockIsSnowable[E_BLOCK_STATIONARY_WATER] = false;
g_BlockIsSnowable[E_BLOCK_TALL_GRASS] = false;
g_BlockIsSnowable[E_BLOCK_TNT] = false;
g_BlockIsSnowable[E_BLOCK_TORCH] = false;
g_BlockIsSnowable[E_BLOCK_WALLSIGN] = false;
+ g_BlockIsSnowable[E_BLOCK_WATER] = false;
g_BlockIsSnowable[E_BLOCK_YELLOW_FLOWER] = false;
}
} BlockPropertiesInitializer;
diff --git a/source/FinishGen.cpp b/source/FinishGen.cpp index 8f6f747b2..f4eb5ab10 100644 --- a/source/FinishGen.cpp +++ b/source/FinishGen.cpp @@ -170,7 +170,35 @@ void cFinishGenIce::GenFinish( cBlockEntityList & a_BlockEntities // Block entities may be added or deleted
)
{
- // TODO: Turn surface water into ice in icy biomes
+ // Turn surface water into ice in icy biomes
+ for (int z = 0; z < cChunkDef::Width; z++)
+ {
+ for (int x = 0; x < cChunkDef::Width; x++)
+ {
+ switch (cChunkDef::GetBiome(a_BiomeMap, x, z))
+ {
+ case biIcePlains:
+ case biIceMountains:
+ case biTaiga:
+ case biTaigaHills:
+ case biFrozenRiver:
+ case biFrozenOcean:
+ {
+ int Height = cChunkDef::GetHeight(a_HeightMap, x, z);
+ switch (cChunkDef::GetBlock(a_BlockTypes, x, Height, z))
+ {
+ case E_BLOCK_WATER:
+ case E_BLOCK_STATIONARY_WATER:
+ {
+ cChunkDef::SetBlock(a_BlockTypes, x, Height, z, E_BLOCK_ICE);
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+ } // for z
}
|