MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / netStore

Method netStore

source/game/StarPlantDrop.cpp:117–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117ByteArray PlantDrop::netStore(NetCompatibilityRules) {
118 DataStreamBuffer ds;
119 ds << m_time;
120 ds << m_master;
121 ds << m_description;
122 ds << m_boundingBox;
123 ds << m_collisionRect;
124 ds << m_rotationRate;
125 ds.writeContainer(m_pieces,
126 [](DataStream& ds, PlantDropPiece const& piece) {
127 ds.write(piece.image);
128 ds.write(piece.offset[0]);
129 ds.write(piece.offset[1]);
130 ds.write(piece.flip);
131 ds.write(piece.kind);
132 });
133 ds << m_stemConfig;
134 ds << m_foliageConfig;
135 ds << m_saplingConfig;
136
137 return ds.data();
138}
139
140EntityType PlantDrop::entityType() const {
141 return EntityType::PlantDrop;

Callers

nothing calls this directly

Calls 3

writeContainerMethod · 0.80
writeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected