Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cFireworkItem Class Reference

#include <FireworksSerializer.h>

Public Member Functions

 cFireworkItem (void)
 
void CopyFrom (const cFireworkItem &a_Item)
 
void EmptyData (void)
 
bool IsEqualTo (const cFireworkItem &a_Item) const
 

Static Public Member Functions

static void ColoursFromString (const AString &a_String, cFireworkItem &a_FireworkItem)
 Parses a string containing encoded firework colours and populates a FireworkItem with it. More...
 
static AString ColoursToString (const cFireworkItem &a_FireworkItem)
 Converts the firework's vector of colours into a string of values separated by a semicolon. More...
 
static void FadeColoursFromString (const AString &a_String, cFireworkItem &a_FireworkItem)
 Parses a string containing encoded firework fade colours and populates a FireworkItem with it. More...
 
static AString FadeColoursToString (const cFireworkItem &a_FireworkItem)
 Converts the firework's vector of fade colours into a string of values separated by a semicolon. More...
 
static int GetVanillaColourCodeFromDye (NIBBLETYPE a_DyeMeta)
 Returns a colour code for fireworks used by the network code. More...
 
static void ParseFromNBT (cFireworkItem &a_FireworkItem, const cParsedNBT &a_NBT, int a_TagIdx, const ENUM_ITEM_ID a_Type)
 Reads NBT data from a NBT object and populates a FireworkItem with it. More...
 
static void WriteToNBTCompound (const cFireworkItem &a_FireworkItem, cFastNBTWriter &a_Writer, const ENUM_ITEM_ID a_Type)
 Writes firework NBT data to a Writer object. More...
 

Public Attributes

std::vector< int > m_Colours
 
std::vector< int > m_FadeColours
 
short m_FlightTimeInTicks
 
bool m_HasFlicker
 
bool m_HasTrail
 
NIBBLETYPE m_Type
 

Detailed Description

Definition at line 20 of file FireworksSerializer.h.

Constructor & Destructor Documentation

cFireworkItem::cFireworkItem ( void  )
inline

Definition at line 23 of file FireworksSerializer.h.

Member Function Documentation

void cFireworkItem::ColoursFromString ( const AString a_String,
cFireworkItem a_FireworkItem 
)
static

Parses a string containing encoded firework colours and populates a FireworkItem with it.

Definition at line 180 of file FireworksSerializer.cpp.

AString cFireworkItem::ColoursToString ( const cFireworkItem a_FireworkItem)
static

Converts the firework's vector of colours into a string of values separated by a semicolon.

Definition at line 164 of file FireworksSerializer.cpp.

void cFireworkItem::CopyFrom ( const cFireworkItem a_Item)
inline

Definition at line 31 of file FireworksSerializer.h.

void cFireworkItem::EmptyData ( void  )
inline

Definition at line 41 of file FireworksSerializer.h.

void cFireworkItem::FadeColoursFromString ( const AString a_String,
cFireworkItem a_FireworkItem 
)
static

Parses a string containing encoded firework fade colours and populates a FireworkItem with it.

Definition at line 215 of file FireworksSerializer.cpp.

AString cFireworkItem::FadeColoursToString ( const cFireworkItem a_FireworkItem)
static

Converts the firework's vector of fade colours into a string of values separated by a semicolon.

Definition at line 199 of file FireworksSerializer.cpp.

int cFireworkItem::GetVanillaColourCodeFromDye ( NIBBLETYPE  a_DyeMeta)
static

Returns a colour code for fireworks used by the network code.

Definition at line 234 of file FireworksSerializer.cpp.

bool cFireworkItem::IsEqualTo ( const cFireworkItem a_Item) const
inline

Definition at line 51 of file FireworksSerializer.h.

void cFireworkItem::ParseFromNBT ( cFireworkItem a_FireworkItem,
const cParsedNBT a_NBT,
int  a_TagIdx,
const ENUM_ITEM_ID  a_Type 
)
static

Reads NBT data from a NBT object and populates a FireworkItem with it.

Definition at line 61 of file FireworksSerializer.cpp.

void cFireworkItem::WriteToNBTCompound ( const cFireworkItem a_FireworkItem,
cFastNBTWriter a_Writer,
const ENUM_ITEM_ID  a_Type 
)
static

Writes firework NBT data to a Writer object.

Definition at line 10 of file FireworksSerializer.cpp.

Member Data Documentation

std::vector<int> cFireworkItem::m_Colours

Definition at line 89 of file FireworksSerializer.h.

std::vector<int> cFireworkItem::m_FadeColours

Definition at line 90 of file FireworksSerializer.h.

short cFireworkItem::m_FlightTimeInTicks

Definition at line 88 of file FireworksSerializer.h.

bool cFireworkItem::m_HasFlicker

Definition at line 85 of file FireworksSerializer.h.

bool cFireworkItem::m_HasTrail

Definition at line 86 of file FireworksSerializer.h.

NIBBLETYPE cFireworkItem::m_Type

Definition at line 87 of file FireworksSerializer.h.


The documentation for this class was generated from the following files: