More fluid stuff
This commit is contained in:
parent
1ae5a20517
commit
55656c13a5
6 changed files with 41 additions and 14 deletions
|
@ -1,23 +1,38 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.lib.ModInfo;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBucket;
|
||||
|
||||
public class ItemFluidbucket extends ItemBucket{
|
||||
|
||||
private String iconName;
|
||||
|
||||
public ItemFluidbucket(Block block)
|
||||
{
|
||||
super(block);
|
||||
setContainerItem(Items.bucket);
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setUnlocalizedName("techreborn.fluidbucket");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
public Item setUnlocalizedName(String par1Str)
|
||||
{
|
||||
itemIcon = iconRegister.registerIcon(ModInfo.MOD_ID.toLowerCase() + ":"
|
||||
+ getUnlocalizedName());
|
||||
iconName = par1Str;
|
||||
return super.setUnlocalizedName(par1Str);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon("techreborn:" + iconName);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue