You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
944 B
Java
37 lines
944 B
Java
package net.minecraft.item;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.util.IIcon;
|
|
|
|
public class ItemBlockWithMetadata extends ItemBlock
|
|
{
|
|
private Block field_150950_b;
|
|
private static final String __OBFID = "CL_00001769";
|
|
|
|
public ItemBlockWithMetadata(Block p_i45326_1_, Block p_i45326_2_)
|
|
{
|
|
super(p_i45326_1_);
|
|
this.field_150950_b = p_i45326_2_;
|
|
this.setMaxDamage(0);
|
|
this.setHasSubtypes(true);
|
|
}
|
|
|
|
/**
|
|
* Gets an icon index based on an item's damage value
|
|
*/
|
|
@SideOnly(Side.CLIENT)
|
|
public IIcon getIconFromDamage(int p_77617_1_)
|
|
{
|
|
return this.field_150950_b.getIcon(2, p_77617_1_);
|
|
}
|
|
|
|
/**
|
|
* Returns the metadata of the block which this Item (ItemBlock) can place
|
|
*/
|
|
public int getMetadata(int p_77647_1_)
|
|
{
|
|
return p_77647_1_;
|
|
}
|
|
} |