diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/Bush.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.World/Bush.h')
| -rw-r--r-- | Minecraft.World/Bush.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Minecraft.World/Bush.h b/Minecraft.World/Bush.h new file mode 100644 index 00000000..464fba88 --- /dev/null +++ b/Minecraft.World/Bush.h @@ -0,0 +1,42 @@ +#pragma once +#include "Tile.h" +#include "Material.h" +#include "Definitions.h" + +class Random; +class Level; + +class Bush : public Tile +{ + friend class Tile; + +private: + void _init(); + +protected: + Bush(int id, Material *material); + Bush(int id); + +public: + virtual void updateDefaultShape(); + virtual bool mayPlace(Level *level, int x, int y, int z); + +protected: + virtual bool mayPlaceOn(int tile); + +public: + virtual void neighborChanged(Level *level, int x, int y, int z, int type); + virtual void tick(Level *level, int x, int y, int z, Random *random); + +protected: + void checkAlive(Level *level, int x, int y, int z); + +public: + virtual bool canSurvive(Level *level, int x, int y, int z); + virtual AABB *getAABB(Level *level, int x, int y, int z); + virtual bool blocksLight(); + + virtual bool isSolidRender(bool isServerLevel = false); + virtual bool isCubeShaped(); + virtual int getRenderShape(); +}; |
