Files
MinecraftConsoles/Minecraft.World/SmoothStoneBrickTile.cpp
daoge b3feddfef3 feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-03-03 03:04:10 +08:00

45 lines
1.3 KiB
C++

#include "stdafx.h"
#include "SmoothStoneBrickTile.h"
#include "net.minecraft.world.h"
const wstring SmoothStoneBrickTile::TEXTURE_NAMES[] = {L"", L"mossy", L"cracked", L"carved"};
const unsigned int SmoothStoneBrickTile::SMOOTH_STONE_BRICK_NAMES[SMOOTH_STONE_BRICK_NAMES_LENGTH] = { IDS_TILE_STONE_BRICK_SMOOTH,
IDS_TILE_STONE_BRICK_SMOOTH_MOSSY,
IDS_TILE_STONE_BRICK_SMOOTH_CRACKED,
IDS_TILE_STONE_BRICK_SMOOTH_CHISELED
};
SmoothStoneBrickTile::SmoothStoneBrickTile(int id) : Tile(id, Material::stone)
{
icons = NULL;
}
Icon *SmoothStoneBrickTile::getTexture(int face, int data)
{
if (data < 0 || data >= SMOOTH_STONE_BRICK_NAMES_LENGTH) data = 0;
return icons[data];
}
int SmoothStoneBrickTile::getSpawnResourcesAuxValue(int data)
{
return data;
}
unsigned int SmoothStoneBrickTile::getDescriptionId(int iData /*= -1*/)
{
if(iData < 0 ) iData = 0;
return SmoothStoneBrickTile::SMOOTH_STONE_BRICK_NAMES[iData];
}
void SmoothStoneBrickTile::registerIcons(IconRegister *iconRegister)
{
icons = new Icon*[SMOOTH_STONE_BRICK_NAMES_LENGTH];
for (int i = 0; i < SMOOTH_STONE_BRICK_NAMES_LENGTH; i++)
{
wstring name = getIconName();
if (!TEXTURE_NAMES[i].empty() ) name += L"_" + TEXTURE_NAMES[i];
icons[i] = iconRegister->registerIcon(name);
}
}