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

Collects and stores the chunk data via the cChunkDataCallback interface. More...

Inheritance diagram for SerializerCollector:
Inheritance graph
[legend]
Collaboration diagram for SerializerCollector:
Collaboration graph
[legend]

Public Member Functions

void AddBannerEntity (cBannerEntity *a_Entity)
 
void AddBasicEntity (cEntity *a_Entity, const std::string_view a_ClassName)
 
void AddBasicTileEntity (cBlockEntity *a_Entity, const char *a_EntityTypeID)
 
void AddBeaconEntity (cBeaconEntity *a_Entity)
 
void AddBedEntity (cBedEntity *a_Entity)
 
void AddBoatEntity (cBoat *a_Boat)
 
void AddBrewingstandEntity (cBrewingstandEntity *a_Brewingstand)
 
void AddChestEntity (cChestEntity *a_Entity, BLOCKTYPE a_ChestType)
 
void AddCommandBlockEntity (cCommandBlockEntity *a_CmdBlock)
 
void AddDispenserEntity (cDispenserEntity *a_Entity)
 
void AddDropperEntity (cDropperEntity *a_Entity)
 
void AddEnchantingTableEntity (cEnchantingTableEntity *a_Entity)
 
void AddEnderchestEntity (cEnderChestEntity *a_Entity)
 
void AddEnderCrystalEntity (cEnderCrystal *a_EnderCrystal)
 
void AddEndPortalEntity (cEndPortalEntity *a_Entity)
 
void AddExpOrbEntity (cExpOrb *a_ExpOrb)
 
void AddFallingBlockEntity (cFallingBlock *a_FallingBlock)
 
void AddFlowerPotEntity (cFlowerPotEntity *a_FlowerPot)
 
void AddFurnaceEntity (cFurnaceEntity *a_Furnace)
 
void AddHangingEntity (cHangingEntity *a_Hanging)
 
void AddHopperEntity (cHopperEntity *a_Entity)
 
void AddItem (const cItem &a_Item, int a_Slot, const AString &a_CompoundName=AString())
 Writes an item into the writer. More...
 
void AddItemFrameEntity (cItemFrame *a_ItemFrame)
 
void AddItemGrid (const cItemGrid &a_Grid, int a_BeginSlotNum=0)
 Writes an item grid into the writer. More...
 
void AddJukeboxEntity (cJukeboxEntity *a_Jukebox)
 
void AddLeashKnotEntity (cLeashKnot *a_LeashKnot)
 
void AddMinecartChestContents (cMinecartWithChest *a_Minecart)
 
void AddMinecartEntity (cMinecart *a_Minecart)
 
void AddMobHeadEntity (cMobHeadEntity *a_MobHead)
 
void AddMobSpawnerEntity (cMobSpawnerEntity *a_MobSpawner)
 
void AddMonsterEntity (cMonster *a_Monster)
 
void AddNoteEntity (cNoteEntity *a_Note)
 
void AddPaintingEntity (cPainting *a_Painting)
 
void AddPickupEntity (cPickup *a_Pickup)
 
void AddProjectileEntity (cProjectileEntity *a_Projectile)
 
void AddSignEntity (cSignEntity *a_Sign)
 
void AddTNTEntity (cTNTEntity *a_TNT)
 
virtual void BiomeMap (const cChunkDef::BiomeMap &a_BiomeMap) override
 
virtual void BlockEntity (cBlockEntity *a_Entity) override
 
virtual void Entity (cEntity *a_Entity) override
 
void Finish (void)
 
virtual void HeightMap (const cChunkDef::HeightMap &a_HeightMap) override
 
virtual void LightIsValid (bool a_IsLightValid) override
 
 SerializerCollector (cFastNBTWriter &aWriter)
 

Public Attributes

UInt8 Biomes [cChunkDef::Width *cChunkDef::Width]
 
int Heights [cChunkDef::Width *cChunkDef::Width]
 
bool mHasHadBlockEntity
 True if any BlockEntity has already been received and processed. More...
 
bool mHasHadEntity
 True if any Entity has already been received and processed. More...
 
bool mIsLightValid
 True if the chunk lighting is valid. More...
 
bool mIsTagOpen
 True if a tag has been opened in the callbacks and not yet closed. More...
 
cFastNBTWritermWriter
 The NBT writer used to store the data. More...
 
- Public Attributes inherited from cChunkDataCopyCollector
ChunkBlockData m_BlockData
 
ChunkLightData m_LightData
 

Detailed Description

Collects and stores the chunk data via the cChunkDataCallback interface.

Definition at line 57 of file NBTChunkSerializer.cpp.

Constructor & Destructor Documentation

◆ SerializerCollector()

SerializerCollector::SerializerCollector ( cFastNBTWriter aWriter)
inline

Definition at line 85 of file NBTChunkSerializer.cpp.

Member Function Documentation

◆ AddBannerEntity()

void SerializerCollector::AddBannerEntity ( cBannerEntity a_Entity)
inline

Definition at line 374 of file NBTChunkSerializer.cpp.

◆ AddBasicEntity()

void SerializerCollector::AddBasicEntity ( cEntity a_Entity,
const std::string_view  a_ClassName 
)
inline

Definition at line 655 of file NBTChunkSerializer.cpp.

◆ AddBasicTileEntity()

void SerializerCollector::AddBasicTileEntity ( cBlockEntity a_Entity,
const char *  a_EntityTypeID 
)
inline

Definition at line 362 of file NBTChunkSerializer.cpp.

◆ AddBeaconEntity()

void SerializerCollector::AddBeaconEntity ( cBeaconEntity a_Entity)
inline

Definition at line 390 of file NBTChunkSerializer.cpp.

◆ AddBedEntity()

void SerializerCollector::AddBedEntity ( cBedEntity a_Entity)
inline

Definition at line 407 of file NBTChunkSerializer.cpp.

◆ AddBoatEntity()

void SerializerCollector::AddBoatEntity ( cBoat a_Boat)
inline

Definition at line 679 of file NBTChunkSerializer.cpp.

◆ AddBrewingstandEntity()

void SerializerCollector::AddBrewingstandEntity ( cBrewingstandEntity a_Brewingstand)
inline

Definition at line 419 of file NBTChunkSerializer.cpp.

◆ AddChestEntity()

void SerializerCollector::AddChestEntity ( cChestEntity a_Entity,
BLOCKTYPE  a_ChestType 
)
inline

Definition at line 435 of file NBTChunkSerializer.cpp.

◆ AddCommandBlockEntity()

void SerializerCollector::AddCommandBlockEntity ( cCommandBlockEntity a_CmdBlock)
inline

Definition at line 585 of file NBTChunkSerializer.cpp.

◆ AddDispenserEntity()

void SerializerCollector::AddDispenserEntity ( cDispenserEntity a_Entity)
inline

Definition at line 449 of file NBTChunkSerializer.cpp.

◆ AddDropperEntity()

void SerializerCollector::AddDropperEntity ( cDropperEntity a_Entity)
inline

Definition at line 463 of file NBTChunkSerializer.cpp.

◆ AddEnchantingTableEntity()

void SerializerCollector::AddEnchantingTableEntity ( cEnchantingTableEntity a_Entity)
inline

Definition at line 477 of file NBTChunkSerializer.cpp.

◆ AddEnderchestEntity()

void SerializerCollector::AddEnderchestEntity ( cEnderChestEntity a_Entity)
inline

Definition at line 491 of file NBTChunkSerializer.cpp.

◆ AddEnderCrystalEntity()

void SerializerCollector::AddEnderCrystalEntity ( cEnderCrystal a_EnderCrystal)
inline

Definition at line 691 of file NBTChunkSerializer.cpp.

◆ AddEndPortalEntity()

void SerializerCollector::AddEndPortalEntity ( cEndPortalEntity a_Entity)
inline

Definition at line 501 of file NBTChunkSerializer.cpp.

◆ AddExpOrbEntity()

void SerializerCollector::AddExpOrbEntity ( cExpOrb a_ExpOrb)
inline

Definition at line 1116 of file NBTChunkSerializer.cpp.

◆ AddFallingBlockEntity()

void SerializerCollector::AddFallingBlockEntity ( cFallingBlock a_FallingBlock)
inline

Definition at line 712 of file NBTChunkSerializer.cpp.

◆ AddFlowerPotEntity()

void SerializerCollector::AddFlowerPotEntity ( cFlowerPotEntity a_FlowerPot)
inline

Definition at line 642 of file NBTChunkSerializer.cpp.

◆ AddFurnaceEntity()

void SerializerCollector::AddFurnaceEntity ( cFurnaceEntity a_Furnace)
inline

Definition at line 512 of file NBTChunkSerializer.cpp.

◆ AddHangingEntity()

void SerializerCollector::AddHangingEntity ( cHangingEntity a_Hanging)
inline

Definition at line 1092 of file NBTChunkSerializer.cpp.

◆ AddHopperEntity()

void SerializerCollector::AddHopperEntity ( cHopperEntity a_Entity)
inline

Definition at line 528 of file NBTChunkSerializer.cpp.

◆ AddItem()

void SerializerCollector::AddItem ( const cItem a_Item,
int  a_Slot,
const AString a_CompoundName = AString() 
)
inline

Writes an item into the writer.

If aSlot >= 0, adds the Slot tag. The compound is named as requested (empty name by default).

Definition at line 274 of file NBTChunkSerializer.cpp.

◆ AddItemFrameEntity()

void SerializerCollector::AddItemFrameEntity ( cItemFrame a_ItemFrame)
inline

Definition at line 1129 of file NBTChunkSerializer.cpp.

◆ AddItemGrid()

void SerializerCollector::AddItemGrid ( const cItemGrid a_Grid,
int  a_BeginSlotNum = 0 
)
inline

Writes an item grid into the writer.

Begins the stored slot numbers with a_BeginSlotNum. Note that it doesn't begin nor end the list tag, so that multiple grids may be concatenated together using this function.

Definition at line 344 of file NBTChunkSerializer.cpp.

◆ AddJukeboxEntity()

void SerializerCollector::AddJukeboxEntity ( cJukeboxEntity a_Jukebox)
inline

Definition at line 542 of file NBTChunkSerializer.cpp.

◆ AddLeashKnotEntity()

void SerializerCollector::AddLeashKnotEntity ( cLeashKnot a_LeashKnot)
inline

Definition at line 1144 of file NBTChunkSerializer.cpp.

◆ AddMinecartChestContents()

void SerializerCollector::AddMinecartChestContents ( cMinecartWithChest a_Minecart)
inline

Definition at line 1169 of file NBTChunkSerializer.cpp.

◆ AddMinecartEntity()

void SerializerCollector::AddMinecartEntity ( cMinecart a_Minecart)
inline

Definition at line 728 of file NBTChunkSerializer.cpp.

◆ AddMobHeadEntity()

void SerializerCollector::AddMobHeadEntity ( cMobHeadEntity a_MobHead)
inline

Definition at line 615 of file NBTChunkSerializer.cpp.

◆ AddMobSpawnerEntity()

void SerializerCollector::AddMobSpawnerEntity ( cMobSpawnerEntity a_MobSpawner)
inline

Definition at line 554 of file NBTChunkSerializer.cpp.

◆ AddMonsterEntity()

void SerializerCollector::AddMonsterEntity ( cMonster a_Monster)
inline

Definition at line 772 of file NBTChunkSerializer.cpp.

◆ AddNoteEntity()

void SerializerCollector::AddNoteEntity ( cNoteEntity a_Note)
inline

Definition at line 573 of file NBTChunkSerializer.cpp.

◆ AddPaintingEntity()

void SerializerCollector::AddPaintingEntity ( cPainting a_Painting)
inline

Definition at line 1156 of file NBTChunkSerializer.cpp.

◆ AddPickupEntity()

void SerializerCollector::AddPickupEntity ( cPickup a_Pickup)
inline

Definition at line 1020 of file NBTChunkSerializer.cpp.

◆ AddProjectileEntity()

void SerializerCollector::AddProjectileEntity ( cProjectileEntity a_Projectile)
inline

Definition at line 1033 of file NBTChunkSerializer.cpp.

◆ AddSignEntity()

void SerializerCollector::AddSignEntity ( cSignEntity a_Sign)
inline

Definition at line 600 of file NBTChunkSerializer.cpp.

◆ AddTNTEntity()

void SerializerCollector::AddTNTEntity ( cTNTEntity a_TNT)
inline

Definition at line 1104 of file NBTChunkSerializer.cpp.

◆ BiomeMap()

virtual void SerializerCollector::BiomeMap ( const cChunkDef::BiomeMap &  a_BiomeMap)
inlineoverridevirtual

Definition at line 122 of file NBTChunkSerializer.cpp.

◆ BlockEntity()

virtual void SerializerCollector::BlockEntity ( cBlockEntity a_Entity)
inlineoverridevirtual

Definition at line 190 of file NBTChunkSerializer.cpp.

◆ Entity()

virtual void SerializerCollector::Entity ( cEntity a_Entity)
inlineoverridevirtual

Definition at line 144 of file NBTChunkSerializer.cpp.

◆ Finish()

void SerializerCollector::Finish ( void  )
inline

Definition at line 247 of file NBTChunkSerializer.cpp.

◆ HeightMap()

virtual void SerializerCollector::HeightMap ( const cChunkDef::HeightMap &  a_HeightMap)
inlineoverridevirtual

Definition at line 107 of file NBTChunkSerializer.cpp.

◆ LightIsValid()

virtual void SerializerCollector::LightIsValid ( bool  a_IsLightValid)
inlineoverridevirtual

Definition at line 98 of file NBTChunkSerializer.cpp.

Member Data Documentation

◆ Biomes

UInt8 SerializerCollector::Biomes[cChunkDef::Width *cChunkDef::Width]

Definition at line 63 of file NBTChunkSerializer.cpp.

◆ Heights

int SerializerCollector::Heights[cChunkDef::Width *cChunkDef::Width]

Definition at line 64 of file NBTChunkSerializer.cpp.

◆ mHasHadBlockEntity

bool SerializerCollector::mHasHadBlockEntity

True if any BlockEntity has already been received and processed.

Definition at line 73 of file NBTChunkSerializer.cpp.

◆ mHasHadEntity

bool SerializerCollector::mHasHadEntity

True if any Entity has already been received and processed.

Definition at line 70 of file NBTChunkSerializer.cpp.

◆ mIsLightValid

bool SerializerCollector::mIsLightValid

True if the chunk lighting is valid.

Definition at line 76 of file NBTChunkSerializer.cpp.

◆ mIsTagOpen

bool SerializerCollector::mIsTagOpen

True if a tag has been opened in the callbacks and not yet closed.

Definition at line 67 of file NBTChunkSerializer.cpp.

◆ mWriter

cFastNBTWriter& SerializerCollector::mWriter

The NBT writer used to store the data.

Definition at line 79 of file NBTChunkSerializer.cpp.


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