aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/WebTile.cpp
blob: 43609e56ff061e3854b8547e27e5f90bc8030d87 (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
43
44
45
46
47
48
49
50
51
52
53
#include "stdafx.h"
#include "net.minecraft.world.entity.h"
#include "net.minecraft.world.item.h"
#include "WebTile.h"

WebTile::WebTile(int id) : Tile(id, Material::web)
{
}


void WebTile::entityInside(Level *level, int x, int y, int z, shared_ptr<Entity> entity)
{
	entity->makeStuckInWeb();
}


bool WebTile::isSolidRender(bool isServerLevel)
{
	return false;
}


AABB *WebTile::getAABB(Level *level, int x, int y, int z)
{
	return nullptr;
}


int WebTile::getRenderShape()
{
	return Tile::SHAPE_CROSS_TEXTURE;
}

bool WebTile::blocksLight()
{
	return false;
}

bool WebTile::isCubeShaped()
{
	return false;
}

int WebTile::getResource(int data, Random *random, int playerBonusLevel)
{
    // @TODO: Explosives currently also give string back. Fix?
    return Item::string->id;
}

bool WebTile::isSilkTouchable()
{
	return true;
}