From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.World/Bush.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Minecraft.World/Bush.h (limited to 'Minecraft.World/Bush.h') 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(); +}; -- cgit v1.2.3