aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/SmoothStoneBrickTile.cpp
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/SmoothStoneBrickTile.cpp
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.World/SmoothStoneBrickTile.cpp')
-rw-r--r--Minecraft.World/SmoothStoneBrickTile.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/Minecraft.World/SmoothStoneBrickTile.cpp b/Minecraft.World/SmoothStoneBrickTile.cpp
new file mode 100644
index 00000000..372901ec
--- /dev/null
+++ b/Minecraft.World/SmoothStoneBrickTile.cpp
@@ -0,0 +1,43 @@
+#include "stdafx.h"
+#include "SmoothStoneBrickTile.h"
+#include "net.minecraft.world.h"
+
+const wstring SmoothStoneBrickTile::TEXTURE_NAMES[] = {L"stonebricksmooth", L"stonebricksmooth_mossy", L"stonebricksmooth_cracked", L"stonebricksmooth_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++)
+ {
+ icons[i] = iconRegister->registerIcon(TEXTURE_NAMES[i]);
+ }
+} \ No newline at end of file