summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Core/weather.lua14
-rw-r--r--source/Blocks/BlockFlower.h2
-rw-r--r--source/Blocks/BlockTorch.h20
-rw-r--r--source/Generating/ComposableGenerator.cpp2
-rw-r--r--source/World.cpp7
5 files changed, 27 insertions, 18 deletions
diff --git a/MCServer/Plugins/Core/weather.lua b/MCServer/Plugins/Core/weather.lua
index 220c2a5cb..4d33a7a11 100644
--- a/MCServer/Plugins/Core/weather.lua
+++ b/MCServer/Plugins/Core/weather.lua
@@ -15,7 +15,19 @@ function HandleWeatherCommand(Split, Player)
Player:GetWorld():SetWeather(2)
SendMessageSuccess( Player, "Thundery showers activate!")
end
-
+
return true
end
+
+function HandleDownfallCommand( Split, Player )
+ World = Player:GetWorld()
+ if World:GetWeather() == 0 then
+ World:SetWeather(1)
+ else
+ World:SetWeather(0)
+ end
+
+ SendMessageSuccess( Player, "Downfall Toggled")
+
+end
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..99c1a7b75 100644
--- a/source/Blocks/BlockTorch.h
+++ b/source/Blocks/BlockTorch.h
@@ -109,21 +109,11 @@ 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_WORKBENCH:
- {
- return (a_Direction == 0x1); // allow only direction "standing on floor"
- }
-
- default:
- {
- return g_BlockIsSolid[a_BlockType];
- }
+ if ( g_BlockIsSolid[a_BlockType] ) {
+ return (a_Direction == 0x1); // allow only direction "standing on floor"
+ }
+ else {
+ 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);
}
diff --git a/source/World.cpp b/source/World.cpp
index 9212202e9..341682a2a 100644
--- a/source/World.cpp
+++ b/source/World.cpp
@@ -744,6 +744,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)