mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-18 20:52:54 +00:00
30 lines
925 B
C++
30 lines
925 B
C++
#include "../../Platform/stdafx.h"
|
|
#include "../../Headers/net.minecraft.world.item.h"
|
|
#include "../../Headers/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(
|
|
std::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];
|
|
} |