From baae26ab223f27bdcbd8d8c3cd9af890c9190e4d Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 11 Aug 2013 11:58:57 +0100 Subject: Further attempt at fixing torch placements Also fixed block on flower placement. #71 --- source/Blocks/BlockFlower.h | 2 +- source/Blocks/BlockTorch.h | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'source') diff --git a/source/Blocks/BlockFlower.h b/source/Blocks/BlockFlower.h index 202609538..952901ba5 100644 --- a/source/Blocks/BlockFlower.h +++ b/source/Blocks/BlockFlower.h @@ -32,7 +32,7 @@ public: virtual bool DoesAllowBlockOnTop(void) override { - return false; + return true; } diff --git a/source/Blocks/BlockTorch.h b/source/Blocks/BlockTorch.h index c94c4c436..816d1b69f 100644 --- a/source/Blocks/BlockTorch.h +++ b/source/Blocks/BlockTorch.h @@ -111,17 +111,17 @@ public: { switch (a_BlockType) { - case E_BLOCK_GLASS: - case E_BLOCK_FENCE: - case E_BLOCK_NETHER_BRICK_FENCE: - case E_BLOCK_PISTON: - case E_BLOCK_WORKBENCH: - { + //case E_BLOCK_GLASS: + //case E_BLOCK_FENCE: + //case E_BLOCK_NETHER_BRICK_FENCE: + //case E_BLOCK_PISTON: + //case E_BLOCK_IRON_BARS + if ( g_BlockIsSolid[a_BlockType] { return (a_Direction == 0x1); // allow only direction "standing on floor" } - - default: - { + else { + //default: + //{ return g_BlockIsSolid[a_BlockType]; } } -- cgit v1.2.3 From e7ecd78312d40ae7a12bd2cd55c42e6bdf6932c3 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 11 Aug 2013 12:08:09 +0100 Subject: Tried adding bracket --- source/Blocks/BlockTorch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/Blocks/BlockTorch.h b/source/Blocks/BlockTorch.h index 816d1b69f..ebff7b641 100644 --- a/source/Blocks/BlockTorch.h +++ b/source/Blocks/BlockTorch.h @@ -116,7 +116,7 @@ public: //case E_BLOCK_NETHER_BRICK_FENCE: //case E_BLOCK_PISTON: //case E_BLOCK_IRON_BARS - if ( g_BlockIsSolid[a_BlockType] { + if ( g_BlockIsSolid[a_BlockType] ) { return (a_Direction == 0x1); // allow only direction "standing on floor" } else { -- cgit v1.2.3 From 93f5a4388c62bfe6e470a30e6598495f130db871 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 11 Aug 2013 15:21:31 +0100 Subject: Removed unneeded case clause --- source/Blocks/BlockTorch.h | 27 ++++++++++++--------------- source/Generating/ComposableGenerator.cpp | 2 +- 2 files changed, 13 insertions(+), 16 deletions(-) (limited to 'source') diff --git a/source/Blocks/BlockTorch.h b/source/Blocks/BlockTorch.h index ebff7b641..f774e15a0 100644 --- a/source/Blocks/BlockTorch.h +++ b/source/Blocks/BlockTorch.h @@ -109,21 +109,18 @@ public: static bool CanBePlacedOn(BLOCKTYPE a_BlockType, char a_Direction) { - switch (a_BlockType) - { - //case E_BLOCK_GLASS: - //case E_BLOCK_FENCE: - //case E_BLOCK_NETHER_BRICK_FENCE: - //case E_BLOCK_PISTON: - //case E_BLOCK_IRON_BARS - if ( g_BlockIsSolid[a_BlockType] ) { - return (a_Direction == 0x1); // allow only direction "standing on floor" - } - else { - //default: - //{ - return g_BlockIsSolid[a_BlockType]; - } + //case E_BLOCK_GLASS: + //case E_BLOCK_FENCE: + //case E_BLOCK_NETHER_BRICK_FENCE: + //case E_BLOCK_PISTON: + //case E_BLOCK_IRON_BARS + if ( g_BlockIsSolid[a_BlockType] ) { + return (a_Direction == 0x1); // allow only direction "standing on floor" + } + else { + //default: + //{ + return g_BlockIsSolid[a_BlockType]; } } diff --git a/source/Generating/ComposableGenerator.cpp b/source/Generating/ComposableGenerator.cpp index fb31ec7b2..8763e2809 100644 --- a/source/Generating/ComposableGenerator.cpp +++ b/source/Generating/ComposableGenerator.cpp @@ -207,7 +207,7 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile) ); CacheSize = 4; } - LOGINFO("Using a cache for biomegen of size %d.", CacheSize); + LOGD("Using a cache for biomegen of size %d.", CacheSize); m_UnderlyingBiomeGen = m_BiomeGen; m_BiomeGen = new cBioGenCache(m_UnderlyingBiomeGen, CacheSize); } -- cgit v1.2.3 From 67351d7d7bb3b70b60b5155e426ff4e0393b8dd8 Mon Sep 17 00:00:00 2001 From: tonibm19 Date: Sun, 11 Aug 2013 21:54:39 +0200 Subject: Now Endermans spawn in The End --- source/World.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source') diff --git a/source/World.cpp b/source/World.cpp index 776bacff8..3955b6136 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -694,6 +694,13 @@ void cWorld::TickSpawnMobs(float a_Dt) case 6: MobType = E_ENTITY_TYPE_ZOMBIE_PIGMAN; break; } } + else if (GetBiomeAt((int)SpawnPos.x, (int)SpawnPos.z) == biSky) + { + switch (nightRand) + { + case 5: MobType = E_ENTITY_TYPE_ENDERMAN; break; + } + } else { switch (nightRand) -- cgit v1.2.3 From b48651a034339645baf60a8f8ec68f3227af0ea0 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 11 Aug 2013 21:08:20 +0100 Subject: Really removed comments this time --- source/Blocks/BlockTorch.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'source') diff --git a/source/Blocks/BlockTorch.h b/source/Blocks/BlockTorch.h index f774e15a0..99c1a7b75 100644 --- a/source/Blocks/BlockTorch.h +++ b/source/Blocks/BlockTorch.h @@ -109,17 +109,10 @@ public: static bool CanBePlacedOn(BLOCKTYPE a_BlockType, char a_Direction) { - //case E_BLOCK_GLASS: - //case E_BLOCK_FENCE: - //case E_BLOCK_NETHER_BRICK_FENCE: - //case E_BLOCK_PISTON: - //case E_BLOCK_IRON_BARS if ( g_BlockIsSolid[a_BlockType] ) { return (a_Direction == 0x1); // allow only direction "standing on floor" } else { - //default: - //{ return g_BlockIsSolid[a_BlockType]; } } -- cgit v1.2.3