chore: format Minecraft.World

This commit is contained in:
Tropical
2026-03-13 17:06:56 -05:00
parent bd6284025d
commit 33d0737d1d
1511 changed files with 108661 additions and 115521 deletions

View File

@@ -4,44 +4,36 @@
#include "LeafTileItem.h"
#include "../../Util/FoliageColor.h"
LeafTileItem::LeafTileItem(int id) : TileItem(id)
{
setMaxDamage(0);
setStackedByData(true);
LeafTileItem::LeafTileItem(int id) : TileItem(id) {
setMaxDamage(0);
setStackedByData(true);
}
int LeafTileItem::getLevelDataForAuxValue(int auxValue)
{
return auxValue | LeafTile::PERSISTENT_LEAF_BIT;
int LeafTileItem::getLevelDataForAuxValue(int auxValue) {
return auxValue | LeafTile::PERSISTENT_LEAF_BIT;
}
Icon *LeafTileItem::getIcon(int itemAuxValue)
{
return Tile::leaves->getTexture(0, itemAuxValue);
Icon* LeafTileItem::getIcon(int itemAuxValue) {
return Tile::leaves->getTexture(0, itemAuxValue);
}
int LeafTileItem::getColor(std::shared_ptr<ItemInstance> item, int spriteLayer)
{
int data = item->getAuxValue();
if ((data & LeafTile::EVERGREEN_LEAF) == LeafTile::EVERGREEN_LEAF)
{
int LeafTileItem::getColor(std::shared_ptr<ItemInstance> item,
int spriteLayer) {
int data = item->getAuxValue();
if ((data & LeafTile::EVERGREEN_LEAF) == LeafTile::EVERGREEN_LEAF) {
return FoliageColor::getEvergreenColor();
}
if ((data & LeafTile::BIRCH_LEAF) == LeafTile::BIRCH_LEAF)
{
if ((data & LeafTile::BIRCH_LEAF) == LeafTile::BIRCH_LEAF) {
return FoliageColor::getBirchColor();
}
return FoliageColor::getDefaultColor();
}
unsigned int LeafTileItem::getDescriptionId(std::shared_ptr<ItemInstance> instance)
{
int auxValue = instance->getAuxValue();
if (auxValue < 0 || auxValue >= LeafTile::LEAF_NAMES_LENGTH)
{
auxValue = 0;
}
return LeafTile::LEAF_NAMES[auxValue];
unsigned int LeafTileItem::getDescriptionId(
std::shared_ptr<ItemInstance> instance) {
int auxValue = instance->getAuxValue();
if (auxValue < 0 || auxValue >= LeafTile::LEAF_NAMES_LENGTH) {
auxValue = 0;
}
return LeafTile::LEAF_NAMES[auxValue];
}