Fix for slabs.
This commit is contained in:
parent
155780276d
commit
009df6aa0e
1 changed files with 13 additions and 8 deletions
|
@ -93,9 +93,9 @@ public class BlockBOPSlab extends BlockSlab
|
||||||
public IIcon getIcon(int side, int meta)
|
public IIcon getIcon(int side, int meta)
|
||||||
{
|
{
|
||||||
if (category == SlabCategory.STONE)
|
if (category == SlabCategory.STONE)
|
||||||
return textures[getTypeFromMeta(meta)];
|
return textures[getRockType(meta)];
|
||||||
else
|
else
|
||||||
return textures[(getTypeFromMeta(meta) + category.ordinal() * 8)];
|
return textures[getWoodType(meta)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -123,7 +123,7 @@ public class BlockBOPSlab extends BlockSlab
|
||||||
public String func_150002_b(int meta)
|
public String func_150002_b(int meta)
|
||||||
{
|
{
|
||||||
if (category == SlabCategory.STONE)
|
if (category == SlabCategory.STONE)
|
||||||
return (new StringBuilder()).append(rockTypes[getTypeFromMeta(meta)]).append("Slab").toString();
|
return (new StringBuilder()).append(rockTypes[getRockType(meta)]).append("Slab").toString();
|
||||||
else
|
else
|
||||||
return (new StringBuilder()).append(woodTypes[getWoodType(meta)]).append("Slab").toString();
|
return (new StringBuilder()).append(woodTypes[getWoodType(meta)]).append("Slab").toString();
|
||||||
}
|
}
|
||||||
|
@ -243,12 +243,17 @@ public class BlockBOPSlab extends BlockSlab
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getRockType(int meta)
|
||||||
|
{
|
||||||
|
meta = getTypeFromMeta(meta);
|
||||||
|
if (meta < rockTypes.length)
|
||||||
|
return meta;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
private static int getTypeFromMeta(int meta)
|
private static int getTypeFromMeta(int meta)
|
||||||
{
|
{
|
||||||
meta = meta & 7;
|
return meta & 7;
|
||||||
if (meta < rockTypes.length)
|
|
||||||
meta = 0;
|
|
||||||
|
|
||||||
return meta;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue