mirror of
https://github.com/DrPerkyLegit/LCEServerTest.git
synced 2026-06-02 08:54:33 +00:00
removed git history
This commit is contained in:
30
Minecraft.World/StoneMonsterTileItem.cpp
Normal file
30
Minecraft.World/StoneMonsterTileItem.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "stdafx.h"
|
||||
#include "net.minecraft.world.item.h"
|
||||
#include "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(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];
|
||||
}
|
||||
Reference in New Issue
Block a user