mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-16 16:13:51 +00:00
Initial commit
This commit is contained in:
parent
def8cb4153
commit
b691c43c44
19437 changed files with 4363922 additions and 0 deletions
31
Minecraft.World/SaplingTileItem.cpp
Normal file
31
Minecraft.World/SaplingTileItem.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#include "stdafx.h"
|
||||
#include "TileItem.h"
|
||||
#include "net.minecraft.world.level.tile.h"
|
||||
#include "SaplingTileItem.h"
|
||||
|
||||
SaplingTileItem::SaplingTileItem(int id) : TileItem(id)
|
||||
{
|
||||
setMaxDamage(0);
|
||||
setStackedByData(true);
|
||||
}
|
||||
|
||||
int SaplingTileItem::getLevelDataForAuxValue(int auxValue)
|
||||
{
|
||||
return auxValue;
|
||||
}
|
||||
|
||||
Icon *SaplingTileItem::getIcon(int itemAuxValue)
|
||||
{
|
||||
return Tile::sapling->getTexture(0, itemAuxValue);
|
||||
}
|
||||
|
||||
// 4J brought forward to have unique names for different sapling types
|
||||
unsigned int SaplingTileItem::getDescriptionId(shared_ptr<ItemInstance> instance)
|
||||
{
|
||||
int auxValue = instance->getAuxValue();
|
||||
if (auxValue < 0 || auxValue >= Sapling::SAPLING_NAMES_SIZE)
|
||||
{
|
||||
auxValue = 0;
|
||||
}
|
||||
return Sapling::SAPLING_NAMES[auxValue];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue