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

SmoothStoneBrickTileItem::SmoothStoneBrickTileItem(int id, Tile *parentTile) : TileItem(id)
{
	this->parentTile = parentTile;

	setMaxDamage(0);
	setStackedByData(true);
}

Icon *SmoothStoneBrickTileItem::getIcon(int itemAuxValue)
{
	return parentTile->getTexture(2, itemAuxValue);
}

int SmoothStoneBrickTileItem::getLevelDataForAuxValue(int auxValue)
{
	return auxValue;
}

unsigned int SmoothStoneBrickTileItem::getDescriptionId(shared_ptr<ItemInstance> instance)
{
	int auxValue = instance->getAuxValue();
	if (auxValue < 0 || auxValue >= SmoothStoneBrickTile::SMOOTH_STONE_BRICK_NAMES_LENGTH)
	{
		auxValue = 0;
	}
	return SmoothStoneBrickTile::SMOOTH_STONE_BRICK_NAMES[auxValue];
}