1234567891011121314151617181920212223242526272829 |
- #include "BlockRemovedUpdate.h"
- #include "Dimension.h"
- #include "NoBlock.h"
- BlockRemovedUpdate::BlockRemovedUpdate(Framework::Vec3<int> pos, int dimension)
- : WorldUpdate(BlockRemovedUpdateType::ID, dimension, pos, pos)
- {}
- BlockRemovedUpdate::~BlockRemovedUpdate()
- {}
- void BlockRemovedUpdate::onUpdate(Dimension* zDimension)
- {
- zDimension->placeBlock(getMaxAffectedPoint(), AirBlockBlockType::ID);
- }
- void BlockRemovedUpdate::write(Framework::StreamWriter* zWriter)
- {
- auto pos = getMinAffectedPoint();
- zWriter->schreibe((char*)&pos.x, 4);
- zWriter->schreibe((char*)&pos.y, 4);
- zWriter->schreibe((char*)&pos.z, 4);
- }
- BlockRemovedUpdateType::BlockRemovedUpdateType()
- : WorldUpdateType(ID)
- {}
|