summaryrefslogtreecommitdiffstats
path: root/src/World.h
diff options
context:
space:
mode:
authorchangyong guo <guo1487@163.com>2018-08-02 16:59:10 +0200
committerpeterbell10 <peterbell10@live.co.uk>2018-08-02 16:59:10 +0200
commit57690b81a24a29d70cb6f4196a6e0f521a3cb61b (patch)
treeac40e460dd92c9fe8a9554b0815684b67ecf2e11 /src/World.h
parentOcelots no longer multiply exponentially (#4272) (diff)
downloadcuberite-57690b81a24a29d70cb6f4196a6e0f521a3cb61b.tar
cuberite-57690b81a24a29d70cb6f4196a6e0f521a3cb61b.tar.gz
cuberite-57690b81a24a29d70cb6f4196a6e0f521a3cb61b.tar.bz2
cuberite-57690b81a24a29d70cb6f4196a6e0f521a3cb61b.tar.lz
cuberite-57690b81a24a29d70cb6f4196a6e0f521a3cb61b.tar.xz
cuberite-57690b81a24a29d70cb6f4196a6e0f521a3cb61b.tar.zst
cuberite-57690b81a24a29d70cb6f4196a6e0f521a3cb61b.zip
Diffstat (limited to '')
-rw-r--r--src/World.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/World.h b/src/World.h
index 1deae2b74..faccb01f0 100644
--- a/src/World.h
+++ b/src/World.h
@@ -279,8 +279,8 @@ public:
/** Finds a player from a partial or complete player name and calls the callback - case-insensitive */
bool FindAndDoWithPlayer(const AString & a_PlayerNameHint, cPlayerListCallback a_Callback); // >> EXPORTED IN MANUALBINDINGS <<
- // TODO: This interface is dangerous - rewrite to DoWithClosestPlayer(pos, sight, action)
- cPlayer * FindClosestPlayer(Vector3d a_Pos, float a_SightLimit, bool a_CheckLineOfSight = true);
+ /** Calls the callback for nearest player for given position, Returns false if player not found, otherwise returns the same value as the callback */
+ bool DoWithNearestPlayer(Vector3d a_Pos, double a_RangeLimit, cPlayerListCallback a_Callback, bool a_CheckLineOfSight = true, bool a_IgnoreSpectator = true);
/** Finds the player over his uuid and calls the callback */
bool DoWithPlayerByUUID(const cUUID & a_PlayerUUID, cPlayerListCallback a_Callback); // >> EXPORTED IN MANUALBINDINGS <<
@@ -465,6 +465,14 @@ public:
Returns the UniqueID of the spawned experience orb, or cEntity::INVALID_ID on failure. */
virtual UInt32 SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward) override;
+ // tolua_end
+
+ /** Spawns experience orbs of the specified total value at the given location. The orbs' values are split according to regular Minecraft rules.
+ Returns an vector of UniqueID of all the orbs. */
+ virtual std::vector<UInt32> SpawnSplitExperienceOrbs(double a_X, double a_Y, double a_Z, int a_Reward) override; // Exported in ManualBindings_World.cpp
+
+ // tolua_begin
+
// DEPRECATED, use the vector-parametered version instead.
UInt32 SpawnPrimedTNT(double a_X, double a_Y, double a_Z, int a_FuseTimeInSec = 80, double a_InitialVelocityCoeff = 1)
{