aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Bush.h
blob: 464fba88aa5ff4c34b83a9c94515f62b988eb523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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();
};