Merge branch 'master' of https://github.com/mc-server/MCServer into fixesnfeatures

Conflicts:
	src/Bindings/Bindings.cpp
	src/Bindings/Bindings.h
	src/Blocks/BlockHandler.cpp
master
Tiger Wang 2013-12-08 14:02:45 +00:00
commit 1d554677b4
48 changed files with 1376 additions and 1279 deletions

3
MCServer/.gitignore vendored
View File

@ -17,6 +17,9 @@ schematics
*.pdb
memdump*
*.grab
Galleries.cfg
Galleries.example.cfg
Galleries.sqlite
ProtectionAreas.sqlite
helgrind.log
valgrind.log

View File

@ -2077,6 +2077,7 @@ end
{ Params = "{{cItems|Pickups}}, X, Y, Z, SpeedX, SpeedY, SpeedZ", Return = "", Notes = "Spawns the specified pickups at the position specified. All the pickups fly away from the spawn position using the specified speed." },
},
SpawnMob = { Params = "X, Y, Z, {{cMonster|MonsterType}}", Return = "EntityID", Notes = "Spawns the specified type of mob at the specified coords. Returns the EntityID of the creates entity, or -1 on failure. " },
SpawnFallingBlock = { Params = "X, Y, Z, BlockType, BlockMeta", Return = "EntityID", Notes = "Spawns an {{cFallingBlock|Falling Block}} entity at the specified coords with the given block type/meta" },
SpawnExperienceOrb = { Params = "X, Y, Z, Reward", Return = "EntityID", Notes = "Spawns an {{cExpOrb|experience orb}} at the specified coords, with the given reward" },
SpawnPrimedTNT = { Params = "X, Y, Z, FuseTimeSecs, InitialVelocityCoeff", Return = "", Notes = "Spawns a {{cTNTEntity|primed TNT entity}} at the specified coords, with the given fuse time. The entity gets a random speed multiplied by the InitialVelocityCoeff, 1 being the default value." },
TryGetHeight = { Params = "BlockX, BlockZ", Return = "IsValid, Height", Notes = "Returns true and height of the highest non-air block if the chunk is loaded, or false otherwise." },

@ -1 +1 @@
Subproject commit de53a607f30c583e08c06b6e5eb936cd278ab8cd
Subproject commit ede668bc7c310af49ad7354c00d3f11adbae792a

@ -1 +1 @@
Subproject commit 52e1de4332a026e58fda843aae98c1f51e57199e
Subproject commit 6527b80a77b3b7f5fac0ef214c1b59ad83e39b20

View File

@ -1851,7 +1851,7 @@
Name="Bindings"
>
<File
RelativePath="..\src\AllToLua.pkg"
RelativePath="..\src\Bindings\AllToLua.pkg"
>
<FileConfiguration
Name="Debug|Win32"
@ -1910,11 +1910,7 @@
</FileConfiguration>
</File>
<File
RelativePath="..\MCServer\API.txt"
>
</File>
<File
RelativePath="..\src\Bindings.cpp"
RelativePath="..\src\Bindings\Bindings.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@ -1958,75 +1954,75 @@
</FileConfiguration>
</File>
<File
RelativePath="..\src\Bindings.h"
RelativePath="..\src\Bindings\Bindings.h"
>
</File>
<File
RelativePath="..\src\LuaFunctions.h"
RelativePath="..\src\Bindings\LuaFunctions.h"
>
</File>
<File
RelativePath="..\src\LuaState.cpp"
RelativePath="..\src\Bindings\LuaState.cpp"
>
</File>
<File
RelativePath="..\src\LuaState.h"
RelativePath="..\src\Bindings\LuaState.h"
>
</File>
<File
RelativePath="..\src\LuaWindow.cpp"
RelativePath="..\src\Bindings\LuaWindow.cpp"
>
</File>
<File
RelativePath="..\src\LuaWindow.h"
RelativePath="..\src\Bindings\LuaWindow.h"
>
</File>
<File
RelativePath="..\src\ManualBindings.cpp"
RelativePath="..\src\Bindings\ManualBindings.cpp"
>
</File>
<File
RelativePath="..\src\ManualBindings.h"
RelativePath="..\src\Bindings\ManualBindings.h"
>
</File>
<File
RelativePath="..\src\Plugin.cpp"
RelativePath="..\src\Bindings\Plugin.cpp"
>
</File>
<File
RelativePath="..\src\Plugin.h"
RelativePath="..\src\Bindings\Plugin.h"
>
</File>
<File
RelativePath="..\src\PluginLua.cpp"
RelativePath="..\src\Bindings\PluginLua.cpp"
>
</File>
<File
RelativePath="..\src\PluginLua.h"
RelativePath="..\src\Bindings\PluginLua.h"
>
</File>
<File
RelativePath="..\src\PluginManager.cpp"
RelativePath="..\src\Bindings\PluginManager.cpp"
>
</File>
<File
RelativePath="..\src\PluginManager.h"
RelativePath="..\src\Bindings\PluginManager.h"
>
</File>
<File
RelativePath="..\src\tolua++.h"
RelativePath="..\src\Bindings\tolua++.h"
>
</File>
<File
RelativePath="..\src\tolua_base.h"
RelativePath="..\src\Bindings\tolua_base.h"
>
</File>
<File
RelativePath="..\src\WebPlugin.cpp"
RelativePath="..\src\Bindings\WebPlugin.cpp"
>
</File>
<File
RelativePath="..\src\WebPlugin.h"
RelativePath="..\src\Bindings\WebPlugin.h"
>
</File>
</Filter>

View File

@ -1,81 +0,0 @@
$#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
$#include "tolua_base.h"
// Typedefs from Globals.h, so that we don't have to include that file:
typedef long long Int64;
typedef int Int32;
typedef short Int16;
typedef unsigned long long UInt64;
typedef unsigned int UInt32;
typedef unsigned short UInt16;
$cfile "ChunkDef.h"
$cfile "../lib/inifile/iniFile.h"
$cfile "OSSupport/File.h"
$cfile "BlockID.h"
$cfile "StringUtils.h"
$cfile "Defines.h"
$cfile "LuaFunctions.h"
$cfile "ChatColor.h"
$cfile "ClientHandle.h"
$cfile "Entities/Entity.h"
$cfile "Entities/Pawn.h"
$cfile "Entities/Player.h"
$cfile "Entities/Pickup.h"
$cfile "Entities/ProjectileEntity.h"
$cfile "PluginManager.h"
$cfile "Plugin.h"
$cfile "PluginLua.h"
$cfile "Server.h"
$cfile "World.h"
$cfile "Inventory.h"
$cfile "Enchantments.h"
$cfile "Item.h"
$cfile "ItemGrid.h"
$cfile "BlockEntities/BlockEntity.h"
$cfile "BlockEntities/BlockEntityWithItems.h"
$cfile "BlockEntities/ChestEntity.h"
$cfile "BlockEntities/DropSpenserEntity.h"
$cfile "BlockEntities/DispenserEntity.h"
$cfile "BlockEntities/DropperEntity.h"
$cfile "BlockEntities/FurnaceEntity.h"
$cfile "BlockEntities/HopperEntity.h"
$cfile "BlockEntities/JukeboxEntity.h"
$cfile "BlockEntities/NoteEntity.h"
$cfile "BlockEntities/SignEntity.h"
$cfile "WebAdmin.h"
$cfile "WebPlugin.h"
$cfile "Root.h"
$cfile "Vector3f.h"
$cfile "Vector3d.h"
$cfile "Vector3i.h"
$cfile "Matrix4f.h"
$cfile "Cuboid.h"
$cfile "BoundingBox.h"
$cfile "Tracer.h"
$cfile "Group.h"
$cfile "BlockArea.h"
$cfile "Generating/ChunkDesc.h"
$cfile "CraftingRecipes.h"
$cfile "UI/Window.h"
$cfile "LuaWindow.h"
$cfile "Mobs/Monster.h"
// Need to declare this class so that the usertype is properly registered in Bindings.cpp -
// it seems impossible to register a usertype in ManualBindings.cpp
class cLineBlockTracer;

82
src/Bindings/AllToLua.pkg Normal file
View File

@ -0,0 +1,82 @@
$#include "../Globals.h"
$#include "tolua_base.h"
// Typedefs from Globals.h, so that we don't have to process that file:
typedef long long Int64;
typedef int Int32;
typedef short Int16;
typedef unsigned long long UInt64;
typedef unsigned int UInt32;
typedef unsigned short UInt16;
$cfile "../ChunkDef.h"
$cfile "../../lib/inifile/iniFile.h"
$cfile "../OSSupport/File.h"
$cfile "LuaFunctions.h"
$cfile "PluginManager.h"
$cfile "Plugin.h"
$cfile "PluginLua.h"
$cfile "WebPlugin.h"
$cfile "LuaWindow.h"
$cfile "../BlockID.h"
$cfile "../StringUtils.h"
$cfile "../Defines.h"
$cfile "../ChatColor.h"
$cfile "../ClientHandle.h"
$cfile "../Entities/Entity.h"
$cfile "../Entities/Pawn.h"
$cfile "../Entities/Player.h"
$cfile "../Entities/Pickup.h"
$cfile "../Entities/ProjectileEntity.h"
$cfile "../Server.h"
$cfile "../World.h"
$cfile "../Inventory.h"
$cfile "../Enchantments.h"
$cfile "../Item.h"
$cfile "../ItemGrid.h"
$cfile "../BlockEntities/BlockEntity.h"
$cfile "../BlockEntities/BlockEntityWithItems.h"
$cfile "../BlockEntities/ChestEntity.h"
$cfile "../BlockEntities/DropSpenserEntity.h"
$cfile "../BlockEntities/DispenserEntity.h"
$cfile "../BlockEntities/DropperEntity.h"
$cfile "../BlockEntities/FurnaceEntity.h"
$cfile "../BlockEntities/HopperEntity.h"
$cfile "../BlockEntities/JukeboxEntity.h"
$cfile "../BlockEntities/NoteEntity.h"
$cfile "../BlockEntities/SignEntity.h"
$cfile "../WebAdmin.h"
$cfile "../Root.h"
$cfile "../Vector3f.h"
$cfile "../Vector3d.h"
$cfile "../Vector3i.h"
$cfile "../Matrix4f.h"
$cfile "../Cuboid.h"
$cfile "../BoundingBox.h"
$cfile "../Tracer.h"
$cfile "../Group.h"
$cfile "../BlockArea.h"
$cfile "../Generating/ChunkDesc.h"
$cfile "../CraftingRecipes.h"
$cfile "../UI/Window.h"
$cfile "../Mobs/Monster.h"
// Need to declare this class so that the usertype is properly registered in Bindings.cpp -
// it seems impossible to register a usertype in ManualBindings.cpp
class cLineBlockTracer;

0
src/AllToLua.sh → src/Bindings/AllToLua.sh Executable file → Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
** Generated automatically by tolua++-1.0.92 on 12/06/13 23:06:38.
** Generated automatically by tolua++-1.0.92 on 12/08/13 12:56:06.
*/
/* Exported function */

View File

@ -1,6 +1,6 @@
#pragma once
#include "MCLogger.h"
#include "../MCLogger.h"
#include <time.h>
// tolua_begin

View File

@ -5,9 +5,9 @@
#include "Globals.h"
#include "LuaWindow.h"
#include "UI/SlotArea.h"
#include "../UI/SlotArea.h"
#include "PluginLua.h"
#include "Entities/Player.h"
#include "../Entities/Player.h"
#include "lua/src/lauxlib.h" // Needed for LUA_REFNIL

View File

@ -9,8 +9,8 @@
#pragma once
#include "UI/Window.h"
#include "ItemGrid.h"
#include "../UI/Window.h"
#include "../ItemGrid.h"

View File

@ -4,22 +4,22 @@
#include "ManualBindings.h"
#include "tolua++.h"
#include "Root.h"
#include "World.h"
#include "Plugin.h"
#include "PluginLua.h"
#include "PluginManager.h"
#include "Entities/Player.h"
#include "WebAdmin.h"
#include "ClientHandle.h"
#include "BlockEntities/ChestEntity.h"
#include "BlockEntities/DispenserEntity.h"
#include "BlockEntities/DropperEntity.h"
#include "BlockEntities/FurnaceEntity.h"
#include "BlockEntities/HopperEntity.h"
#include "md5/md5.h"
#include "LuaWindow.h"
#include "LineBlockTracer.h"
#include "../Root.h"
#include "../World.h"
#include "../Entities/Player.h"
#include "../WebAdmin.h"
#include "../ClientHandle.h"
#include "../BlockEntities/ChestEntity.h"
#include "../BlockEntities/DispenserEntity.h"
#include "../BlockEntities/DropperEntity.h"
#include "../BlockEntities/FurnaceEntity.h"
#include "../BlockEntities/HopperEntity.h"
#include "md5/md5.h"
#include "../LineBlockTracer.h"

View File

@ -1,7 +1,6 @@
#pragma once
#include "Item.h"
#include "PluginManager.h"

View File

@ -7,7 +7,7 @@
#define LUA_USE_POSIX
#include "PluginLua.h"
#include "CommandOutput.h"
#include "../CommandOutput.h"
extern "C"
{

View File

@ -4,15 +4,15 @@
#include "PluginManager.h"
#include "Plugin.h"
#include "PluginLua.h"
#include "WebAdmin.h"
#include "Item.h"
#include "Root.h"
#include "Server.h"
#include "CommandOutput.h"
#include "../WebAdmin.h"
#include "../Item.h"
#include "../Root.h"
#include "../Server.h"
#include "../CommandOutput.h"
#include "inifile/iniFile.h"
#include "tolua++.h"
#include "Entities/Player.h"
#include "../Entities/Player.h"

View File

@ -1,7 +1,7 @@
#pragma once
#include "Item.h"
#include "../Item.h"

View File

@ -2,9 +2,9 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "WebPlugin.h"
#include "WebAdmin.h"
#include "Server.h"
#include "Root.h"
#include "../WebAdmin.h"
#include "../Server.h"
#include "../Root.h"

View File

@ -7,7 +7,7 @@
#include "HopperEntity.h"
#include "../Chunk.h"
#include "../Entities/Player.h"
#include "../PluginManager.h"
#include "../Bindings/PluginManager.h"
#include "ChestEntity.h"
#include "DropSpenserEntity.h"
#include "FurnaceEntity.h"

View File

@ -4,7 +4,7 @@
#include "../Item.h"
#include "../World.h"
#include "../Root.h"
#include "../PluginManager.h"
#include "../Bindings/PluginManager.h"
#include "BlockBed.h"
#include "BlockBrewingStand.h"
#include "BlockButton.h"
@ -48,7 +48,6 @@
#include "BlockPumpkin.h"
#include "BlockRail.h"
#include "BlockRedstone.h"
#include "BlockRedstoneLamp.h"
#include "BlockRedstoneRepeater.h"
#include "BlockRedstoneTorch.h"
#include "BlockSand.h"
@ -151,7 +150,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType)
case E_BLOCK_LADDER: return new cBlockLadderHandler (a_BlockType);
case E_BLOCK_LEVER: return new cBlockLeverHandler (a_BlockType);
case E_BLOCK_LAPIS_ORE: return new cBlockOreHandler (a_BlockType);
case E_BLOCK_LAVA: return new cBlockFluidHandler (a_BlockType);
case E_BLOCK_LAVA: return new cBlockLavaHandler (a_BlockType);
case E_BLOCK_LEAVES: return new cBlockLeavesHandler (a_BlockType);
case E_BLOCK_LIT_FURNACE: return new cBlockFurnaceHandler (a_BlockType);
case E_BLOCK_LOG: return new cBlockWoodHandler (a_BlockType);
@ -172,7 +171,6 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType)
case E_BLOCK_RAIL: return new cBlockRailHandler (a_BlockType);
case E_BLOCK_REDSTONE_ORE: return new cBlockOreHandler (a_BlockType);
case E_BLOCK_REDSTONE_ORE_GLOWING: return new cBlockOreHandler (a_BlockType);
case E_BLOCK_REDSTONE_LAMP_ON: return new cBlockRedstoneLampHandler (a_BlockType);
case E_BLOCK_REDSTONE_REPEATER_OFF: return new cBlockRedstoneRepeaterHandler(a_BlockType);
case E_BLOCK_REDSTONE_REPEATER_ON: return new cBlockRedstoneRepeaterHandler(a_BlockType);
case E_BLOCK_REDSTONE_TORCH_OFF: return new cBlockRedstoneTorchHandler (a_BlockType);
@ -187,6 +185,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType)
case E_BLOCK_SNOW: return new cBlockSnowHandler (a_BlockType);
case E_BLOCK_SPRUCE_WOOD_STAIRS: return new cBlockStairsHandler (a_BlockType);
case E_BLOCK_STATIONARY_LAVA: return new cBlockLavaHandler (a_BlockType);
case E_BLOCK_STATIONARY_WATER: return new cBlockFluidHandler (a_BlockType);
case E_BLOCK_STICKY_PISTON: return new cBlockPistonHandler (a_BlockType);
case E_BLOCK_STONE: return new cBlockStoneHandler (a_BlockType);
case E_BLOCK_STONE_BRICK_STAIRS: return new cBlockStairsHandler (a_BlockType);

View File

@ -27,7 +27,7 @@
#include "MersenneTwister.h"
#include "Entities/Player.h"
#include "BlockArea.h"
#include "PluginManager.h"
#include "Bindings/PluginManager.h"
#include "Blocks/BlockHandler.h"
#include "Simulator/FluidSimulator.h"
#include "MobCensus.h"

View File

@ -10,7 +10,7 @@
#include "Chunk.h"
#include "Generating/Trees.h" // used in cChunkMap::ReplaceTreeBlocks() for tree block discrimination
#include "BlockArea.h"
#include "PluginManager.h"
#include "Bindings/PluginManager.h"
#include "Entities/TNTEntity.h"
#include "Blocks/BlockHandler.h"
#include "MobCensus.h"

View File

@ -4,7 +4,7 @@
#include "Server.h"
#include "World.h"
#include "Entities/Pickup.h"
#include "PluginManager.h"
#include "Bindings/PluginManager.h"
#include "Entities/Player.h"
#include "Inventory.h"
#include "BlockEntities/ChestEntity.h"

View File

@ -6,7 +6,7 @@
#include "Globals.h"
#include "CraftingRecipes.h"
#include "Root.h"
#include "PluginManager.h"
#include "Bindings/PluginManager.h"

View File

@ -416,6 +416,22 @@ inline float GetSpecialSignf( float a_Val )
// tolua_begin
/// Normalizes an angle in degrees to the [-180, +180) range:
inline double NormalizeAngleDegrees(const double a_Degrees)
{
double Norm = fmod(a_Degrees + 180, 360);
if (Norm < 0)
{
Norm += 360;
}
return Norm - 180;
}
namespace ItemCategory
{
inline bool IsPickaxe(short a_ItemID)

View File

@ -10,7 +10,7 @@
#include "../ClientHandle.h"
#include "../Chunk.h"
#include "../Simulator/FluidSimulator.h"
#include "../PluginManager.h"
#include "../Bindings/PluginManager.h"
#include "../Tracer.h"
#include "Minecart.h"
@ -158,8 +158,7 @@ bool cEntity::Initialize(cWorld * a_World)
void cEntity::WrapHeadYaw(void)
{
while (m_HeadYaw > 180.f) m_HeadYaw -= 360.f; // Wrap it
while (m_HeadYaw < -180.f) m_HeadYaw += 360.f;
m_HeadYaw = NormalizeAngleDegrees(m_HeadYaw);
}
@ -168,10 +167,8 @@ void cEntity::WrapHeadYaw(void)
void cEntity::WrapRotation(void)
{
while (m_Rot.x > 180.f) m_Rot.x -= 360.f; // Wrap it
while (m_Rot.x < -180.f) m_Rot.x += 360.f;
while (m_Rot.y > 180.f) m_Rot.y -= 360.f;
while (m_Rot.y < -180.f) m_Rot.y += 360.f;
m_Rot.x = NormalizeAngleDegrees(m_Rot.x);
m_Rot.y = NormalizeAngleDegrees(m_Rot.z);
}

View File

@ -12,7 +12,7 @@
#include "../Simulator/FluidSimulator.h"
#include "../Server.h"
#include "Player.h"
#include "../PluginManager.h"
#include "../Bindings/PluginManager.h"
#include "../Item.h"
#include "../Root.h"
#include "../Chunk.h"

View File

@ -8,7 +8,7 @@
#include "../UI/WindowOwner.h"
#include "../World.h"
#include "Pickup.h"
#include "../PluginManager.h"
#include "../Bindings/PluginManager.h"
#include "../BlockEntities/BlockEntity.h"
#include "../GroupManager.h"
#include "../Group.h"

View File

@ -5,7 +5,7 @@
#include "../World.h"
#include "inifile/iniFile.h"
#include "../Root.h"
#include "../PluginManager.h"
#include "../Bindings/PluginManager.h"
#include "ChunkDesc.h"
#include "ComposableGenerator.h"
#include "Noise3DGenerator.h"

View File

@ -8,7 +8,7 @@
#include "FurnaceRecipe.h"
#include "GroupManager.h"
#include "CraftingRecipes.h"
#include "PluginManager.h"
#include "Bindings/PluginManager.h"
#include "MonsterConfig.h"
#include "Entities/Player.h"
#include "Blocks/BlockHandler.h"

View File

@ -10,7 +10,7 @@
#include "Root.h"
#include "World.h"
#include "ChunkDef.h"
#include "PluginManager.h"
#include "Bindings/PluginManager.h"
#include "GroupManager.h"
#include "ChatColor.h"
#include "Entities/Player.h"

View File

@ -2,10 +2,10 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "WebAdmin.h"
#include "WebPlugin.h"
#include "Bindings/WebPlugin.h"
#include "PluginManager.h"
#include "Plugin.h"
#include "Bindings/PluginManager.h"
#include "Bindings/Plugin.h"
#include "World.h"
#include "Entities/Player.h"

View File

@ -6,7 +6,7 @@
#pragma once
#include "OSSupport/Socket.h"
#include "LuaState.h"
#include "Bindings/LuaState.h"
#include "inifile/iniFile.h"
#include "HTTPServer/HTTPServer.h"
#include "HTTPServer/HTTPFormParser.h"

View File

@ -14,6 +14,7 @@
// Entities (except mobs):
#include "Entities/ExpOrb.h"
#include "Entities/FallingBlock.h"
#include "Entities/Pickup.h"
#include "Entities/Player.h"
#include "Entities/TNTEntity.h"
@ -35,12 +36,11 @@
#include "MersenneTwister.h"
#include "Generating/Trees.h"
#include "PluginManager.h"
#include "Bindings/PluginManager.h"
#include "Blocks/BlockHandler.h"
#include "Vector3d.h"
#include "Tracer.h"
#include "tolua++.h"
// DEBUG: Test out the cLineBlockTracer class by tracing a few lines:
#include "LineBlockTracer.h"
@ -1634,6 +1634,17 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double
int cWorld::SpawnFallingBlock(int a_X, int a_Y, int a_Z, BLOCKTYPE BlockType, NIBBLETYPE BlockMeta)
{
cFallingBlock * FallingBlock = new cFallingBlock(Vector3i(a_X, a_Y, a_Z), BlockType, BlockMeta);
FallingBlock->Initialize(this);
return FallingBlock->GetUniqueID();
}
int cWorld::SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward)
{
cExpOrb * ExpOrb = new cExpOrb(a_X, a_Y, a_Z, a_Reward);

View File

@ -355,6 +355,9 @@ public:
/// Spawns item pickups for each item in the list. May compress pickups if too many entities. All pickups get the speed specified:
void SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double a_BlockY, double a_BlockZ, double a_SpeedX, double a_SpeedY, double a_SpeedZ, bool IsPlayerCreated = false);
/// Spawns an falling block entity at the given position. It returns the UniqueID of the spawned falling block.
int SpawnFallingBlock(int a_X, int a_Y, int a_Z, BLOCKTYPE BlockType, NIBBLETYPE BlockMeta);
/// Spawns an experience orb at the given location with the given reward. It returns the UniqueID of the spawned experience orb.
int SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward);