summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-05-27 19:30:27 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-05-27 19:30:27 +0200
commit7c72bbb706076077b2068aad49f76e34b59a5a76 (patch)
tree8b321d251b780b8891435e5bcd16ec7ee3c43e7d /source
parentVoronoi has a minimum cell size of 4 blocks now, to avoid some extreme corner-cases (diff)
downloadcuberite-7c72bbb706076077b2068aad49f76e34b59a5a76.tar
cuberite-7c72bbb706076077b2068aad49f76e34b59a5a76.tar.gz
cuberite-7c72bbb706076077b2068aad49f76e34b59a5a76.tar.bz2
cuberite-7c72bbb706076077b2068aad49f76e34b59a5a76.tar.lz
cuberite-7c72bbb706076077b2068aad49f76e34b59a5a76.tar.xz
cuberite-7c72bbb706076077b2068aad49f76e34b59a5a76.tar.zst
cuberite-7c72bbb706076077b2068aad49f76e34b59a5a76.zip
Diffstat (limited to 'source')
-rw-r--r--source/BlockID.cpp130
-rw-r--r--source/BlockID.h2
-rw-r--r--source/ChunkDef.h6
3 files changed, 85 insertions, 53 deletions
diff --git a/source/BlockID.cpp b/source/BlockID.cpp
index 32f9bb96e..d21c4d509 100644
--- a/source/BlockID.cpp
+++ b/source/BlockID.cpp
@@ -16,6 +16,7 @@ NIBBLETYPE g_BlockSpreadLightFalloff[256];
bool g_BlockTransparent[256];
bool g_BlockOneHitDig[256];
bool g_BlockPistonBreakable[256];
+bool g_BlockIsSnowable[256];
@@ -93,6 +94,7 @@ EMCSBiome StringToBiome(const AString & a_BiomeString)
{biFrozenOcean, "FrozenOcean"},
{biFrozenRiver, "FrozenRiver"},
{biIcePlains, "IcePlains"},
+ {biIcePlains, "Tundra"},
{biIceMountains, "IceMountains"},
{biMushroomIsland, "MushroomIsland"},
{biMushroomShore, "MushroomShore"},
@@ -130,6 +132,7 @@ public:
memset( g_BlockTransparent, 0x00, sizeof( g_BlockTransparent ) );
memset( g_BlockOneHitDig, 0x00, sizeof( g_BlockOneHitDig ) );
memset( g_BlockPistonBreakable, 0x00, sizeof( g_BlockPistonBreakable ) );
+ memset( g_BlockIsSnowable, 0xff, sizeof( g_BlockIsSnowable)); // Set all blocks' snowable to true
// Emissive blocks
g_BlockLightValue[E_BLOCK_FIRE] = 15;
@@ -151,92 +154,119 @@ public:
// Spread blocks
g_BlockSpreadLightFalloff[E_BLOCK_AIR] = 1;
- g_BlockSpreadLightFalloff[E_BLOCK_TORCH] = 1;
g_BlockSpreadLightFalloff[E_BLOCK_FIRE] = 1;
- g_BlockSpreadLightFalloff[E_BLOCK_LAVA] = 1;
- g_BlockSpreadLightFalloff[E_BLOCK_STATIONARY_LAVA] = 1;
- g_BlockSpreadLightFalloff[E_BLOCK_WATER] = 4; // Light in water dissapears faster
- g_BlockSpreadLightFalloff[E_BLOCK_STATIONARY_WATER] = 4;
- g_BlockSpreadLightFalloff[E_BLOCK_LEAVES] = 1;
g_BlockSpreadLightFalloff[E_BLOCK_GLASS] = 1;
g_BlockSpreadLightFalloff[E_BLOCK_GLOWSTONE] = 1;
+ g_BlockSpreadLightFalloff[E_BLOCK_LEAVES] = 1;
g_BlockSpreadLightFalloff[E_BLOCK_SIGN_POST] = 1;
+ g_BlockSpreadLightFalloff[E_BLOCK_TORCH] = 1;
g_BlockSpreadLightFalloff[E_BLOCK_WALLSIGN] = 1;
+ // Light in water and lava dissapears faster:
+ g_BlockSpreadLightFalloff[E_BLOCK_LAVA] = 2;
+ g_BlockSpreadLightFalloff[E_BLOCK_STATIONARY_LAVA] = 2;
+ g_BlockSpreadLightFalloff[E_BLOCK_STATIONARY_WATER] = 2;
+ g_BlockSpreadLightFalloff[E_BLOCK_WATER] = 2;
// Transparent blocks
g_BlockTransparent[E_BLOCK_AIR] = true;
- g_BlockTransparent[E_BLOCK_GLASS] = true;
+ g_BlockTransparent[E_BLOCK_BROWN_MUSHROOM] = true;
g_BlockTransparent[E_BLOCK_FIRE] = true;
+ g_BlockTransparent[E_BLOCK_GLASS] = true;
g_BlockTransparent[E_BLOCK_ICE] = true;
- g_BlockTransparent[E_BLOCK_TORCH] = true;
+ g_BlockTransparent[E_BLOCK_RED_MUSHROOM] = true;
+ g_BlockTransparent[E_BLOCK_RED_ROSE] = true;
g_BlockTransparent[E_BLOCK_SIGN_POST] = true;
- g_BlockTransparent[E_BLOCK_WALLSIGN] = true;
+ g_BlockTransparent[E_BLOCK_SNOW] = true;
g_BlockTransparent[E_BLOCK_TALL_GRASS] = true;
+ g_BlockTransparent[E_BLOCK_TORCH] = true;
+ g_BlockTransparent[E_BLOCK_WALLSIGN] = true;
g_BlockTransparent[E_BLOCK_YELLOW_FLOWER] = true;
- g_BlockTransparent[E_BLOCK_RED_ROSE] = true;
- g_BlockTransparent[E_BLOCK_RED_MUSHROOM] = true;
- g_BlockTransparent[E_BLOCK_BROWN_MUSHROOM] = true;
- g_BlockTransparent[E_BLOCK_SNOW] = true;
// TODO: Any other transparent blocks?
// One hit break blocks
- g_BlockOneHitDig[E_BLOCK_SAPLING] = true;
- g_BlockOneHitDig[E_BLOCK_YELLOW_FLOWER] = true;
- g_BlockOneHitDig[E_BLOCK_RED_ROSE] = true;
g_BlockOneHitDig[E_BLOCK_BROWN_MUSHROOM] = true;
- g_BlockOneHitDig[E_BLOCK_RED_MUSHROOM] = true;
- g_BlockOneHitDig[E_BLOCK_TNT] = true;
- g_BlockOneHitDig[E_BLOCK_TORCH] = true;
- g_BlockOneHitDig[E_BLOCK_REDSTONE_WIRE] = true;
g_BlockOneHitDig[E_BLOCK_CROPS] = true;
+ g_BlockOneHitDig[E_BLOCK_FIRE] = true;
+ g_BlockOneHitDig[E_BLOCK_LOCKED_CHEST] = true;
+ g_BlockOneHitDig[E_BLOCK_REDSTONE_REPEATER_OFF] = true;
+ g_BlockOneHitDig[E_BLOCK_REDSTONE_REPEATER_ON] = true;
g_BlockOneHitDig[E_BLOCK_REDSTONE_TORCH_OFF] = true;
g_BlockOneHitDig[E_BLOCK_REDSTONE_TORCH_ON] = true;
- g_BlockOneHitDig[E_BLOCK_REEDS] = true;
g_BlockOneHitDig[E_BLOCK_REDSTONE_WIRE] = true;
- g_BlockOneHitDig[E_BLOCK_REDSTONE_REPEATER_OFF] = true;
- g_BlockOneHitDig[E_BLOCK_REDSTONE_REPEATER_ON] = true;
- g_BlockOneHitDig[E_BLOCK_LOCKED_CHEST] = true;
- g_BlockOneHitDig [E_BLOCK_FIRE] = true;
+ g_BlockOneHitDig[E_BLOCK_REDSTONE_WIRE] = true;
+ g_BlockOneHitDig[E_BLOCK_RED_MUSHROOM] = true;
+ g_BlockOneHitDig[E_BLOCK_RED_ROSE] = true;
+ g_BlockOneHitDig[E_BLOCK_REEDS] = true;
+ g_BlockOneHitDig[E_BLOCK_SAPLING] = true;
+ g_BlockOneHitDig[E_BLOCK_TNT] = true;
+ g_BlockOneHitDig[E_BLOCK_TORCH] = true;
+ g_BlockOneHitDig[E_BLOCK_YELLOW_FLOWER] = true;
// Blocks that breaks when pushed by piston
g_BlockPistonBreakable[E_BLOCK_AIR] = true;
- g_BlockPistonBreakable[E_BLOCK_STATIONARY_WATER] = false; //This gave pistons the ability to drop water :D
- g_BlockPistonBreakable[E_BLOCK_WATER] = false;
- g_BlockPistonBreakable[E_BLOCK_STATIONARY_LAVA] = false;
- g_BlockPistonBreakable[E_BLOCK_LAVA] = false;
g_BlockPistonBreakable[E_BLOCK_BED] = true;
- g_BlockPistonBreakable[E_BLOCK_COBWEB] = true;
- g_BlockPistonBreakable[E_BLOCK_TALL_GRASS] = true;
- g_BlockPistonBreakable[E_BLOCK_YELLOW_FLOWER] = true;
g_BlockPistonBreakable[E_BLOCK_BROWN_MUSHROOM] = true;
- g_BlockPistonBreakable[E_BLOCK_RED_ROSE] = true;
- g_BlockPistonBreakable[E_BLOCK_RED_MUSHROOM] = true;
+ g_BlockPistonBreakable[E_BLOCK_COBWEB] = true;
+ g_BlockPistonBreakable[E_BLOCK_CROPS] = true;
g_BlockPistonBreakable[E_BLOCK_DEAD_BUSH] = true;
- g_BlockPistonBreakable[E_BLOCK_TORCH] = true;
g_BlockPistonBreakable[E_BLOCK_FIRE] = true;
- g_BlockPistonBreakable[E_BLOCK_REDSTONE_WIRE] = true;
- g_BlockPistonBreakable[E_BLOCK_CROPS] = true;
- g_BlockPistonBreakable[E_BLOCK_LADDER] = true;
- g_BlockPistonBreakable[E_BLOCK_WOODEN_DOOR] = true;
g_BlockPistonBreakable[E_BLOCK_IRON_DOOR] = true;
+ g_BlockPistonBreakable[E_BLOCK_JACK_O_LANTERN] = true;
+ g_BlockPistonBreakable[E_BLOCK_LADDER] = true;
+ g_BlockPistonBreakable[E_BLOCK_LAVA] = false;
g_BlockPistonBreakable[E_BLOCK_LEVER] = true;
- g_BlockPistonBreakable[E_BLOCK_STONE_BUTTON] = true;
- g_BlockPistonBreakable[E_BLOCK_REDSTONE_TORCH_ON] = true;
- g_BlockPistonBreakable[E_BLOCK_REDSTONE_TORCH_OFF] = true;
- g_BlockPistonBreakable[E_BLOCK_SNOW] = true;
- g_BlockPistonBreakable[E_BLOCK_REEDS] = true;
- g_BlockPistonBreakable[E_BLOCK_PUMPKIN_STEM] = true;
- g_BlockPistonBreakable[E_BLOCK_MELON_STEM] = true;
g_BlockPistonBreakable[E_BLOCK_MELON] = true;
+ g_BlockPistonBreakable[E_BLOCK_MELON_STEM] = true;
g_BlockPistonBreakable[E_BLOCK_PUMPKIN] = true;
- g_BlockPistonBreakable[E_BLOCK_JACK_O_LANTERN] = true;
- g_BlockPistonBreakable[E_BLOCK_VINES] = true;
+ g_BlockPistonBreakable[E_BLOCK_PUMPKIN_STEM] = true;
+ g_BlockPistonBreakable[E_BLOCK_REDSTONE_TORCH_OFF] = true;
+ g_BlockPistonBreakable[E_BLOCK_REDSTONE_TORCH_ON] = true;
+ g_BlockPistonBreakable[E_BLOCK_REDSTONE_WIRE] = true;
+ g_BlockPistonBreakable[E_BLOCK_RED_MUSHROOM] = true;
+ g_BlockPistonBreakable[E_BLOCK_RED_ROSE] = true;
+ g_BlockPistonBreakable[E_BLOCK_REEDS] = true;
+ g_BlockPistonBreakable[E_BLOCK_SNOW] = true;
+ g_BlockPistonBreakable[E_BLOCK_STATIONARY_LAVA] = false;
+ g_BlockPistonBreakable[E_BLOCK_STATIONARY_WATER] = false; //This gave pistons the ability to drop water :D
+ g_BlockPistonBreakable[E_BLOCK_STONE_BUTTON] = true;
g_BlockPistonBreakable[E_BLOCK_STONE_PRESSURE_PLATE] = true;
+ g_BlockPistonBreakable[E_BLOCK_TALL_GRASS] = true;
+ g_BlockPistonBreakable[E_BLOCK_TORCH] = true;
+ g_BlockPistonBreakable[E_BLOCK_VINES] = true;
+ g_BlockPistonBreakable[E_BLOCK_WATER] = false;
+ g_BlockPistonBreakable[E_BLOCK_WOODEN_DOOR] = true;
g_BlockPistonBreakable[E_BLOCK_WOODEN_PRESSURE_PLATE] = true;
- }
-} BlockPropertiesInitializer;
+ g_BlockPistonBreakable[E_BLOCK_YELLOW_FLOWER] = true;
+ // Blocks that can be snowed over:
+ g_BlockIsSnowable[E_BLOCK_BROWN_MUSHROOM] = false;
+ g_BlockIsSnowable[E_BLOCK_CHEST] = false;
+ g_BlockIsSnowable[E_BLOCK_CROPS] = false;
+ g_BlockIsSnowable[E_BLOCK_FIRE] = false;
+ g_BlockIsSnowable[E_BLOCK_FIRE] = false;
+ g_BlockIsSnowable[E_BLOCK_GLASS] = false;
+ g_BlockIsSnowable[E_BLOCK_ICE] = false;
+ g_BlockIsSnowable[E_BLOCK_LOCKED_CHEST] = false;
+ g_BlockIsSnowable[E_BLOCK_REDSTONE_REPEATER_OFF] = false;
+ g_BlockIsSnowable[E_BLOCK_REDSTONE_REPEATER_ON] = false;
+ g_BlockIsSnowable[E_BLOCK_REDSTONE_TORCH_OFF] = false;
+ g_BlockIsSnowable[E_BLOCK_REDSTONE_TORCH_ON] = false;
+ g_BlockIsSnowable[E_BLOCK_REDSTONE_WIRE] = false;
+ g_BlockIsSnowable[E_BLOCK_RED_MUSHROOM] = false;
+ g_BlockIsSnowable[E_BLOCK_RED_ROSE] = false;
+ g_BlockIsSnowable[E_BLOCK_REEDS] = false;
+ g_BlockIsSnowable[E_BLOCK_SAPLING] = false;
+ g_BlockIsSnowable[E_BLOCK_SIGN_POST] = false;
+ g_BlockIsSnowable[E_BLOCK_SNOW] = 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_YELLOW_FLOWER] = false;
+ }
+} BlockPropertiesInitializer;
+
diff --git a/source/BlockID.h b/source/BlockID.h
index f257282eb..2cb66776b 100644
--- a/source/BlockID.h
+++ b/source/BlockID.h
@@ -458,6 +458,8 @@ extern NIBBLETYPE g_BlockSpreadLightFalloff[256];
extern bool g_BlockTransparent[256];
extern bool g_BlockOneHitDig[256];
extern bool g_BlockPistonBreakable[256];
+extern bool g_BlockIsSnowable[256];
+
diff --git a/source/ChunkDef.h b/source/ChunkDef.h
index 039fcd6b0..e10d4e892 100644
--- a/source/ChunkDef.h
+++ b/source/ChunkDef.h
@@ -57,8 +57,6 @@ typedef unsigned char HEIGHTTYPE;
/** Biome IDs
The first batch corresponds to the clientside biomes, used by MineCraft.
BiomeIDs over 255 are used by MCServer internally and are translated to MC biomes before sending them to client
-When adding or deleting, you might want to edit the cBioGenCheckerBoard in BioGen.cpp to
-include / exclude that biome in that generator.
*/
enum EMCSBiome
{
@@ -70,11 +68,13 @@ enum EMCSBiome
biTaiga = 5,
biSwampland = 6,
biRiver = 7,
- biHell = 8, // Nether?
+ biHell = 8, // same as Nether
+ biNether = 8,
biSky = 9,
biFrozenOcean = 10,
biFrozenRiver = 11,
biIcePlains = 12,
+ biTundra = 12, // same as Ice Plains
biIceMountains = 13,
biMushroomIsland = 14,
biMushroomShore = 15,