Files
GabsPuNs-Project_Zenith_Main/Minecraft.World/CarrotTile.cpp
GabsPuNs bc6c09146a New File System and Cleanup some code Part 3
* Remove stdafx.h and some <unordered_set> includes
* Update Minecraft Server Defines and remove more unused folders/files
* Unbloat stdafx.h from Minecraft.World
2026-05-24 22:21:41 -04:00

41 lines
632 B
C++

#include "net.minecraft.world.h"
#include "net.minecraft.world.item.h"
#include "CarrotTile.h"
CarrotTile::CarrotTile(int id) : CropTile(id)
{
}
Icon *CarrotTile::getTexture(int face, int data)
{
if (data < 7)
{
if (data == 6)
{
data = 5;
}
return icons[data >> 1];
}
else
{
return icons[3];
}
}
int CarrotTile::getBaseSeedId()
{
return Item::carrots_Id;
}
int CarrotTile::getBasePlantId()
{
return Item::carrots_Id;
}
void CarrotTile::registerIcons(IconRegister *iconRegister)
{
for (int i = 0; i < 4; i++)
{
icons[i] = iconRegister->registerIcon(getIconName() + L"_stage_" + std::to_wstring(i));
}
}