aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/CarrotTile.cpp
blob: 8841e199b690e329a594d1cd61f08c9976ae28e3 (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
#include "stdafx.h"
#include "net.minecraft.world.h"
#include "net.minecraft.world.item.h"
#include "CarrotTile.h"

CarrotTile::CarrotTile(int id) : CropTile(id)
{
}

Icon *CarrotTile::getTexture(int face, int data)
{
	if (data < 7)
	{
		if (data == 6)
		{
			data = 5;
		}
		return icons[data >> 1];
	}
	else
	{
		return icons[3];
	}
}

int CarrotTile::getBaseSeedId()
{
	return Item::carrots_Id;
}

int CarrotTile::getBasePlantId()
{
	return Item::carrots_Id;
}

void CarrotTile::registerIcons(IconRegister *iconRegister)
{
	for (int i = 0; i < 4; i++)
	{
		icons[i] = iconRegister->registerIcon(getIconName() + L"_stage_" + std::to_wstring(i));
	}
}