1
0

Added checks for no downfall biomes

This commit is contained in:
Tiger Wang 2014-06-04 13:22:50 +01:00
parent 86e5273cd1
commit 01f38d8836
3 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ public:
virtual void OnUpdate(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_PluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ) override
{
if (!a_WorldInterface.IsWeatherWet())
if (IsBiomeNoDownfall(a_Chunk.GetBiomeAt(a_RelX, a_RelZ)) || !a_WorldInterface.IsWeatherWet())
{
return;
}

View File

@ -869,7 +869,7 @@ void cEntity::TickBurning(cChunk & a_Chunk)
// Remember the current burning state:
bool HasBeenBurning = (m_TicksLeftBurning > 0);
if (m_World->IsWeatherWet())
if (IsBiomeNoDownfall(a_Chunk.GetBiomeAt(POSX_TOINT - a_Chunk.GetPosX() * cChunkDef::Width, POSZ_TOINT - a_Chunk.GetPosZ() * cChunkDef::Width)) || GetWorld()->IsWeatherWet())
{
if (POSY_TOINT > m_World->GetHeight(POSX_TOINT, POSZ_TOINT))
{

View File

@ -1034,7 +1034,7 @@ void cMonster::HandleDaylightBurning(cChunk & a_Chunk)
(a_Chunk.GetBlock(RelX, RelY, RelZ) != E_BLOCK_SOULSAND) && // Not on soulsand
(GetWorld()->GetTimeOfDay() < (12000 + 1000)) && // It is nighttime
!IsOnFire() && // Not already burning
(GetWorld()->IsWeatherWet()) // Not raining
(IsBiomeNoDownfall(a_Chunk.GetBiomeAt(RelX, RelZ)) || GetWorld()->IsWeatherWet()) // Not raining
)
{
// Burn for 100 ticks, then decide again