mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-18 16:02:55 +00:00
25 lines
733 B
C++
25 lines
733 B
C++
#include "../../Platform/stdafx.h"
|
|
#include "../../Headers/net.minecraft.world.level.tile.h"
|
|
#include "TreeTileItem.h"
|
|
|
|
TreeTileItem::TreeTileItem(int id, Tile* parentTile) : TileItem(id) {
|
|
this->parentTile = parentTile;
|
|
|
|
setMaxDamage(0);
|
|
setStackedByData(true);
|
|
}
|
|
|
|
Icon* TreeTileItem::getIcon(int itemAuxValue) {
|
|
return parentTile->getTexture(2, itemAuxValue);
|
|
}
|
|
|
|
int TreeTileItem::getLevelDataForAuxValue(int auxValue) { return auxValue; }
|
|
|
|
unsigned int TreeTileItem::getDescriptionId(
|
|
std::shared_ptr<ItemInstance> instance) {
|
|
int auxValue = instance->getAuxValue();
|
|
if (auxValue < 0 || auxValue >= TreeTile::TREE_NAMES_LENGTH) {
|
|
auxValue = 0;
|
|
}
|
|
return TreeTile::TREE_NAMES[auxValue];
|
|
} |