From d07ef85ee310486c07ce9905ef66c1cb31549617 Mon Sep 17 00:00:00 2001 From: Howaner Date: Fri, 12 Sep 2014 16:41:23 +0200 Subject: Spawn exp if you break a mob spawner. --- src/Blocks/WorldInterface.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Blocks/WorldInterface.h') diff --git a/src/Blocks/WorldInterface.h b/src/Blocks/WorldInterface.h index b43d011d8..889ef1d87 100644 --- a/src/Blocks/WorldInterface.h +++ b/src/Blocks/WorldInterface.h @@ -35,6 +35,9 @@ public: /** Spawns a mob of the specified type. Returns the mob's EntityID if recognized and spawned, <0 otherwise */ virtual int SpawnMob(double a_PosX, double a_PosY, double a_PosZ, cMonster::eType a_MonsterType) = 0; + /** Spawns an experience orb at the given location with the given reward. It returns the UniqueID of the spawned experience orb. */ + virtual int SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward) = 0; + /** Calls the callback for the block entity at the specified coords; returns false if there's no block entity at those coords, true if found */ virtual bool DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBlockEntityCallback & a_Callback) = 0; -- cgit v1.2.3 From 6e7c0e33b5dd6d86d66ac2eb1a07a33652a708fd Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 17 Sep 2014 18:40:10 +0100 Subject: Added first test to show the object can be created --- src/Blocks/WorldInterface.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Blocks/WorldInterface.h') diff --git a/src/Blocks/WorldInterface.h b/src/Blocks/WorldInterface.h index b43d011d8..27e06fff3 100644 --- a/src/Blocks/WorldInterface.h +++ b/src/Blocks/WorldInterface.h @@ -2,14 +2,15 @@ #pragma once #include "BroadcastInterface.h" -#include "../Mobs/Monster.h" +#include "../Mobs/MonsterTypes.h" class cItems; typedef cItemCallback cBlockEntityCallback; - +class cMonster; +class cPlayer; class cWorldInterface @@ -33,7 +34,7 @@ public: virtual 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) = 0; /** Spawns a mob of the specified type. Returns the mob's EntityID if recognized and spawned, <0 otherwise */ - virtual int SpawnMob(double a_PosX, double a_PosY, double a_PosZ, cMonster::eType a_MonsterType) = 0; + virtual int SpawnMob(double a_PosX, double a_PosY, double a_PosZ, eMonsterType a_MonsterType) = 0; /** Calls the callback for the block entity at the specified coords; returns false if there's no block entity at those coords, true if found */ virtual bool DoWithBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ, cBlockEntityCallback & a_Callback) = 0; -- cgit v1.2.3