PlaceBlockUpdate.h 670 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <Either.h>
  3. #include <Vec3.h>
  4. #include "WorldUpdate.h"
  5. class Block;
  6. class PlaceBlockUpdate : public WorldUpdate
  7. {
  8. private:
  9. Framework::Either<Block*, int> block;
  10. protected:
  11. void write( Framework::StreamWriter* zWriter ) override;
  12. public:
  13. PlaceBlockUpdate( Framework::Either<Block*, int> block, Framework::Vec3<int> location, int dimensionId );
  14. ~PlaceBlockUpdate();
  15. void onUpdate( Dimension* zDimension ) override;
  16. Block* zBlock() const;
  17. };
  18. class PlaceBlockUpdateType : WorldUpdateType
  19. {
  20. REGISTRABLE( PlaceBlockUpdateType )
  21. protected:
  22. PlaceBlockUpdateType();
  23. };
  24. REGISTER( PlaceBlockUpdateType, WorldUpdateType )