aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/WoolCarpetTile_SPU.h
blob: 4d49e8c44b7d2bfa9ac38bdc1fd531786498e95d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include "Tile_SPU.h"

class WoolCarpetTile_SPU : public Tile_SPU
{
public:
	WoolCarpetTile_SPU(int id) : Tile_SPU(id) {}

	Icon_SPU *getTexture(int face, int data) { return TileRef_SPU(cloth_Id)->getTexture(face, data); }
	bool isSolidRender(bool isServerLevel = false) { return false; }
	void updateDefaultShape() { updateShape(0); }
	void updateShape(ChunkRebuildData *level, int x, int y, int z) { updateShape(level->getData(x, y, z)); }

protected:
	void updateShape(int data)
	{
		int height = 0;
		float o = 1 * (1 + height) / 16.0f;
		setShape(0, 0, 0, 1, o, 1);
	}

public:
	bool shouldRenderFace(ChunkRebuildData *level, int x, int y, int z, int face)
	{
		if (face == 1) return true;
		return Tile_SPU::shouldRenderFace(level, x, y, z, face);

	}
};