aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/AnvilTile_SPU.h
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.Client/PS3/SPU_Tasks/ChunkUpdate/AnvilTile_SPU.h
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/AnvilTile_SPU.h')
-rw-r--r--Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/AnvilTile_SPU.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/AnvilTile_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/AnvilTile_SPU.h
new file mode 100644
index 00000000..6b3afe69
--- /dev/null
+++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/AnvilTile_SPU.h
@@ -0,0 +1,50 @@
+#pragma once
+
+#include "Tile_SPU.h"
+
+class FallingTile;
+
+class AnvilTile_SPU : public Tile_SPU
+{
+public:
+ static const int PART_BASE = 0;
+ static const int PART_JOINT = 1;
+ static const int PART_COLUMN = 2;
+ static const int PART_TOP = 3;
+
+ static const int ANVIL_NAMES_LENGTH = 3;
+
+
+// public:
+ //int part;
+
+ AnvilTile_SPU(int id) : Tile_SPU(id) {}
+
+public:
+ bool isCubeShaped() { return false; }
+ bool isSolidRender(bool isServerLevel = false) { return false; }
+ Icon_SPU *getTexture(int face, int data)
+ {
+ if (ms_pTileData->anvilPart == PART_TOP && face == Facing::UP)
+ {
+ int damage = (data >> 2) % ANVIL_NAMES_LENGTH;
+ return &ms_pTileData->anvil_icons[damage];
+ }
+ return icon();
+ }
+ int getRenderShape() { return Tile_SPU::SHAPE_ANVIL; }
+ void updateShape(ChunkRebuildData *level, int x, int y, int z)
+ {
+ int dir = level->getData(x, y, z) & 3;
+ if (dir == Direction::EAST || dir == Direction::WEST)
+ {
+ setShape(0, 0, 2 / 16.0f, 1, 1, 1 - 2 / 16.0f);
+ }
+ else
+ {
+ setShape(2 / 16.0f, 0, 0, 1 - 2 / 16.0f, 1, 1);
+ }
+ }
+
+ bool shouldRenderFace(ChunkRebuildData *level, int x, int y, int z, int face) { return true; }
+}; \ No newline at end of file