Code cleanup

This commit is contained in:
LemADEC 2015-09-11 01:28:57 +02:00
parent 3c121e3e3c
commit 8b7868e021
3 changed files with 16 additions and 15 deletions

View file

@ -9,24 +9,25 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemBlockDecorative extends ItemBlock {
public ItemBlockDecorative(Block bl) {
super(bl);
public ItemBlockDecorative(Block block) {
super(block);
setHasSubtypes(true);
setUnlocalizedName("warpdrive.passive.decorative");
}
@Override
public int getMetadata(int damage) {
return damage;
}
@Override
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
for (int i = 0; i < BlockDecorative.decorativeTypes.values().length; i++)
for (int i = 0; i < BlockDecorative.decorativeTypes.values().length; i++) {
par3List.add(new ItemStack(par1, 1, i));
}
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
if (itemstack == null)

View file

@ -20,8 +20,8 @@ public class ItemAirCanisterFull extends Item implements IAirCanister {
}
@Override
public void registerIcons(IIconRegister ir) {
icon = ir.registerIcon("warpdrive:componentAirCanisterFull");
public void registerIcons(IIconRegister iconRegister) {
icon = iconRegister.registerIcon("warpdrive:componentAirCanisterFull");
}
@Override

View file

@ -111,13 +111,13 @@ public class ItemComponent extends Item implements IAirCanister {
// WarpDrive.logger.info(data);
return data.equals(unlocalised);
}
@Override
public void registerIcons(IIconRegister par1IconRegister) {
for(int i = 0; i < potentialUnlocalized.length; i++) {
potentialIcons[i] = par1IconRegister.registerIcon("warpdrive:component" + potentialUnlocalized[i]);
}
}
}
@Override
public String getUnlocalizedName(ItemStack itemSt) {
@ -126,7 +126,7 @@ public class ItemComponent extends Item implements IAirCanister {
return "item.warpdrive.crafting." + potentialUnlocalized[damage];
}
return getUnlocalizedName();
}
}
@Override
public IIcon getIconFromDamage(int damage) {
@ -137,13 +137,13 @@ public class ItemComponent extends Item implements IAirCanister {
}
@Override
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
for(int i = 0; i < potentialUnlocalized.length; i++) {
par3List.add(new ItemStack(par1, 1, i));
}
}
}
//For empty air cans
// For empty air cans
@Override
public ItemStack fullDrop(ItemStack is) {
if (doesMatch(is, "AirCanisterEmpty")) {