mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-18 10:42:54 +00:00
27 lines
836 B
C++
27 lines
836 B
C++
#include "../../Platform/stdafx.h"
|
|
#include "../../Headers/net.minecraft.world.item.h"
|
|
#include "../../Headers/net.minecraft.world.level.tile.h"
|
|
#include "StoneMonsterTileItem.h"
|
|
|
|
StoneMonsterTileItem::StoneMonsterTileItem(int id) : TileItem(id) {
|
|
setMaxDamage(0);
|
|
setStackedByData(true);
|
|
}
|
|
|
|
int StoneMonsterTileItem::getLevelDataForAuxValue(int auxValue) {
|
|
return auxValue;
|
|
}
|
|
|
|
Icon* StoneMonsterTileItem::getIcon(int itemAuxValue) {
|
|
return Tile::monsterStoneEgg->getTexture(0, itemAuxValue);
|
|
}
|
|
|
|
unsigned int StoneMonsterTileItem::getDescriptionId(
|
|
std::shared_ptr<ItemInstance> instance) {
|
|
int auxValue = instance->getAuxValue();
|
|
if (auxValue < 0 ||
|
|
auxValue >= StoneMonsterTile::STONE_MONSTER_NAMES_LENGTH) {
|
|
auxValue = 0;
|
|
}
|
|
return StoneMonsterTile::STONE_MONSTER_NAMES[auxValue];
|
|
} |