-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDecoBlockLadderWood.java
53 lines (43 loc) · 1.73 KB
/
DecoBlockLadderWood.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
46
47
48
49
50
51
52
53
package net.minecraft.src;
import java.util.Random;
public class DecoBlockLadderWood extends FCBlockLadder
{
private String m_Tag;
public DecoBlockLadderWood(int id, String tag)
{
super(id);
this.setUnlocalizedName("decoBlockLadder." + tag);
this.setHardness(0.4F);
this.setStepSound(Block.soundLadderFootstep);
ItemAxe.SetAllAxesToBeEffectiveVsBlock(this);
this.m_Tag = tag;
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int var1, Random var2, int var3)
{
if (this.m_Tag == "spruce") return DecoModuleTweaks.decoSubModuleExtendedWoodBlocks.decoBlockLadders[0].blockID;
if (this.m_Tag == "birch") return DecoModuleTweaks.decoSubModuleExtendedWoodBlocks.decoBlockLadders[1].blockID;
if (this.m_Tag == "jungle") return DecoModuleTweaks.decoSubModuleExtendedWoodBlocks.decoBlockLadders[2].blockID;
if (this.m_Tag == "bloodwood") return DecoModuleTweaks.decoSubModuleExtendedWoodBlocks.decoBlockLadders[3].blockID;
if (this.m_Tag == "ebonwood") return DecoModuleTweaks.decoSubModuleExtendedWoodBlocks.decoBlockLadders[4].blockID;
if (this.m_Tag == "ironwood") return DecoModuleTweaks.decoSubModuleExtendedWoodBlocks.decoBlockLadders[5].blockID;
return FCBetterThanWolves.fcBlockLadder.blockID;
}
/**
* When this method is called, your block should register all the icons it needs with the given IconRegister. This
* is the only chance you get to register icons.
*/
public void registerIcons(IconRegister register)
{
this.blockIcon = register.registerIcon("decoBlockLadder_" + this.m_Tag);
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public Icon getIcon(int side, int metadata)
{
return this.blockIcon;
}
}