Cauldrons fill
This commit is contained in:
parent
444cce1269
commit
cea3a8e7e8
@ -58,6 +58,20 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
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())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
NIBBLETYPE Meta = a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ);
|
||||
if (Meta < 3)
|
||||
{
|
||||
a_Chunk.SetMeta(a_RelX, a_RelY, a_RelZ, Meta + 1);
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -37,4 +37,7 @@ public:
|
||||
|
||||
virtual void SetTimeOfDay(Int64 a_TimeOfDay) = 0;
|
||||
|
||||
/** Returns true if the current weather has any precipitation - rain or storm */
|
||||
virtual bool IsWeatherWet(void) const = 0;
|
||||
|
||||
};
|
||||
|
@ -961,7 +961,6 @@ void cChunk::ApplyWeatherToTop()
|
||||
}
|
||||
break;
|
||||
} // case (snowy biomes)
|
||||
// TODO: Rainy biomes should check for farmland and cauldrons
|
||||
default:
|
||||
{
|
||||
break;
|
||||
|
@ -690,8 +690,8 @@ public:
|
||||
bool IsWeatherStorm(void) const { return (m_Weather == wStorm); }
|
||||
|
||||
/** Returns true if the current weather has any precipitation - rain or storm */
|
||||
bool IsWeatherWet (void) const { return (m_Weather != wSunny); }
|
||||
|
||||
virtual bool IsWeatherWet(void) const override { return (m_Weather != wSunny); }
|
||||
|
||||
// tolua_end
|
||||
|
||||
cChunkGenerator & GetGenerator(void) { return m_Generator; }
|
||||
|
Loading…
Reference in New Issue
Block a user