-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDecoBlockStair.java
45 lines (36 loc) · 1.25 KB
/
DecoBlockStair.java
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package net.minecraft.src;
public class DecoBlockStair extends FCBlockStairs
{
private Block m_ParentBlock;
private int m_Metadata;
public DecoBlockStair(int id, Block parentBlock, String subType)
{
this(id, parentBlock, subType, 0);
}
public DecoBlockStair(int id, Block parentBlock, int metadata)
{
this(id, parentBlock, "", metadata);
}
public DecoBlockStair(int id, Block parentBlock, String subType, int metadata)
{
super(id, parentBlock, metadata);
if (subType.isEmpty())
this.setUnlocalizedName(parentBlock.getUnlocalizedName2() + ".stairs");
else
this.setUnlocalizedName(parentBlock.getUnlocalizedName2() + ".stairs." + subType);
this.setHardness(parentBlock.blockHardness);
this.setResistance(parentBlock.blockResistance / 3.0F);
this.setStepSound(parentBlock.stepSound);
this.setCreativeTab(CreativeTabs.tabBlock);
Block.useNeighborBrightness[id] = true;
this.m_ParentBlock = parentBlock;
this.m_Metadata = metadata;
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public Icon getIcon(int side, int metadata)
{
return this.m_ParentBlock.getIcon(side, this.m_Metadata);
}
}