forked from mirrors/kolyah35-minecraft-pe-0.6.1
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
45
src/world/level/tile/ClothTile.h
Executable file
45
src/world/level/tile/ClothTile.h
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
#ifndef NET_MINECRAFT_WORLD_LEVEL_TILE__ClothTile_H__
|
||||
#define NET_MINECRAFT_WORLD_LEVEL_TILE__ClothTile_H__
|
||||
|
||||
//package net.minecraft.world.level.tile;
|
||||
|
||||
#include "../material/Material.h"
|
||||
|
||||
class ClothTile: public Tile
|
||||
{
|
||||
typedef Tile super;
|
||||
static const int COLOR_TEX_POS = 7 * 16 + 1;
|
||||
public:
|
||||
ClothTile(int id)
|
||||
: super(id, 4 * 16, Material::cloth)
|
||||
{
|
||||
}
|
||||
ClothTile(int id, int data)
|
||||
: super(id, 4 * 16, Material::cloth)
|
||||
{
|
||||
}
|
||||
|
||||
int getTexture(int face, int data) {
|
||||
if (data == 0) {
|
||||
// un-colored cloth
|
||||
return tex;
|
||||
}
|
||||
|
||||
// invert bits (so 1111 becomes black)
|
||||
data = ~(data & 0xf);
|
||||
return COLOR_TEX_POS + ((data & 8) >> 3) + ((data & 7) * 16);
|
||||
}
|
||||
|
||||
static int getTileDataForItemAuxValue(int auxValue) {
|
||||
return (~auxValue & 0xf);
|
||||
}
|
||||
protected:
|
||||
int getSpawnResourcesAuxValue(int data) {
|
||||
return data;
|
||||
}
|
||||
static int getItemAuxValueForTileData(int data) {
|
||||
return (~data & 0xf);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /*NET_MINECRAFT_WORLD_LEVEL_TILE__ClothTile_H__*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue