summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2020-11-13 22:50:46 +0100
committerGitHub <noreply@github.com>2020-11-13 22:50:46 +0100
commit283b9d706c8a1fffb7d85147ddc46d4d8651ba20 (patch)
tree18e59fcbb2f61ad5037cc39a49234f1ac9a54bea
parentchanging cComposite Chat to newer c++ standart (#5028) (diff)
downloadcuberite-283b9d706c8a1fffb7d85147ddc46d4d8651ba20.tar
cuberite-283b9d706c8a1fffb7d85147ddc46d4d8651ba20.tar.gz
cuberite-283b9d706c8a1fffb7d85147ddc46d4d8651ba20.tar.bz2
cuberite-283b9d706c8a1fffb7d85147ddc46d4d8651ba20.tar.lz
cuberite-283b9d706c8a1fffb7d85147ddc46d4d8651ba20.tar.xz
cuberite-283b9d706c8a1fffb7d85147ddc46d4d8651ba20.tar.zst
cuberite-283b9d706c8a1fffb7d85147ddc46d4d8651ba20.zip
-rw-r--r--src/World.cpp2
-rw-r--r--src/World.h11
2 files changed, 5 insertions, 8 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 561adc4d0..bd1a52a7d 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -486,7 +486,7 @@ void cWorld::CastThunderbolt(Vector3i a_Block)
-int cWorld::GetDefaultWeatherInterval(eWeather a_Weather)
+int cWorld::GetDefaultWeatherInterval(eWeather a_Weather) const
{
auto & Random = GetRandomProvider();
switch (a_Weather)
diff --git a/src/World.h b/src/World.h
index e1d2a1abf..58d814d06 100644
--- a/src/World.h
+++ b/src/World.h
@@ -140,7 +140,7 @@ public:
/** Returns the default weather interval for the specific weather type.
Returns -1 for any unknown weather. */
- int GetDefaultWeatherInterval(eWeather a_Weather);
+ int GetDefaultWeatherInterval(eWeather a_Weather) const;
/** Returns the current game mode. Partly OBSOLETE, you should use IsGameModeXXX() functions wherever applicable */
eGameMode GetGameMode(void) const { return m_GameMode; }
@@ -666,6 +666,8 @@ public:
/** Retrieves block types of the specified blocks. If a chunk is not loaded, doesn't modify the block. Returns true if all blocks were read. */
bool GetBlocks(sSetBlockVector & a_Blocks, bool a_ContinueOnFailure);
+ using cWorldInterface::SendBlockTo;
+
// tolua_begin
/** Replaces the specified block with air, and calls the OnBroken block handler.
@@ -697,14 +699,9 @@ public:
Returns an empty cItems object if the chunk is not present. */
cItems PickupsFromBlock(Vector3i a_BlockPos, const cEntity * a_Digger = nullptr, const cItem * a_Tool = nullptr);
- virtual void SendBlockTo(int a_X, int a_Y, int a_Z, cPlayer & a_Player) override;
-
/** Sends the block at the specified coords to the player.
Used mainly when plugins disable block-placing or block-breaking, to restore the previous block. */
- void SendBlockTo(const Vector3i a_BlockPos, cPlayer & a_Player)
- {
- SendBlockTo(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, a_Player);
- }
+ virtual void SendBlockTo(int a_X, int a_Y, int a_Z, cPlayer & a_Player) override;
/** Set default spawn at the given coordinates.
Returns false if the new spawn couldn't be stored in the INI file. */