Merge branch 'tambry-16stack' into 6.0.x
This commit is contained in:
commit
ae1776e449
2 changed files with 9 additions and 5 deletions
|
@ -18,7 +18,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import buildcraft.core.utils.NBTUtils;
|
||||
|
||||
public class ItemBlueprintStandard extends ItemBlueprint {
|
||||
|
||||
private IIcon cleanBlueprint;
|
||||
private IIcon usedBlueprint;
|
||||
|
||||
|
@ -29,9 +28,11 @@ public class ItemBlueprintStandard extends ItemBlueprint {
|
|||
@Override
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
if (!NBTUtils.getItemData(stack).hasKey("name")) {
|
||||
return cleanBlueprint;
|
||||
itemIcon = cleanBlueprint;
|
||||
return itemIcon;
|
||||
} else {
|
||||
return usedBlueprint;
|
||||
itemIcon = usedBlueprint;
|
||||
return itemIcon;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import buildcraft.core.utils.NBTUtils;
|
||||
|
||||
public class ItemBlueprintTemplate extends ItemBlueprint {
|
||||
private IIcon cleanTemplate;
|
||||
private IIcon usedTemplate;
|
||||
|
||||
public ItemBlueprintTemplate() {
|
||||
|
@ -27,16 +28,18 @@ public class ItemBlueprintTemplate extends ItemBlueprint {
|
|||
@Override
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
if (!NBTUtils.getItemData(stack).hasKey("name")) {
|
||||
itemIcon = cleanTemplate;
|
||||
return itemIcon;
|
||||
} else {
|
||||
return usedTemplate;
|
||||
itemIcon = usedTemplate;
|
||||
return itemIcon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = par1IconRegister.registerIcon("buildcraft:template_clean");
|
||||
cleanTemplate = par1IconRegister.registerIcon("buildcraft:template_clean");
|
||||
usedTemplate = par1IconRegister.registerIcon("buildcraft:template_used");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue