9 #include "../EffectID.h"
10 #include "json/value.h"
11 #include "../Entities/Player.h"
17 Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
@ SFX_RANDOM_PLAY_MUSIC_DISC
Vector3< double > Vector3d
Vector3i m_Pos
Position in absolute block coordinates.
virtual void CopyFrom(const cBlockEntity &a_Src)
Copies all properties of a_Src into this entity, except for its m_World and location.
bool PlayRecord(int a_Record)
Plays the specified Record.
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
bool IsPlayingRecord(void) const
Is in the Jukebox a Record?
virtual cItems ConvertToPickups() const override
Returns the contents of this block entity that it would drop if broken.
bool EjectRecord(void)
Ejects the currently held record as a pickup.
cJukeboxEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
virtual void Destroy(void) override
Called when this block entity's associated block is destroyed.
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
static bool IsRecordItem(int a_Item)
void SetRecord(int a_Record)
StatisticsManager & GetStatistics()
Return the associated statistic and achievement manager.
const cItem & GetEquippedItem(void) const
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
cInventory & GetInventory(void)
bool RemoveOneEquippedItem(void)
Removes one item out of the currently equipped item stack, returns true if successful,...
This class bridges a vector of cItem for safe access via Lua.
std::unordered_map< CustomStatistic, StatValue > Custom
virtual void BroadcastSoundParticleEffect(const EffectID a_EffectID, Vector3i a_SrcPos, int a_Data, const cClientHandle *a_Exclude=nullptr) override
void SpawnItemPickups(const cItems &a_Pickups, Vector3i a_BlockPos, double a_FlyAwaySpeed=1.0, bool a_IsPlayerCreated=false)
Spawns item pickups for each item in the list.
void SetBlockMeta(Vector3i a_BlockPos, NIBBLETYPE a_MetaData)
Sets the meta for the specified block, while keeping the blocktype.