2014-05-18 05:19:23 +02:00
|
|
|
package appeng.block.crafting;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import net.minecraft.creativetab.CreativeTabs;
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.util.IIcon;
|
2014-05-26 03:58:44 +02:00
|
|
|
import appeng.client.texture.ExtraBlockTextures;
|
2014-05-18 05:19:23 +02:00
|
|
|
import appeng.tile.crafting.TileCraftingStorageTile;
|
|
|
|
|
|
|
|
public class BlockCraftingStorage extends BlockCraftingUnit
|
|
|
|
{
|
|
|
|
|
|
|
|
public BlockCraftingStorage() {
|
|
|
|
super( BlockCraftingStorage.class );
|
|
|
|
setTileEntiy( TileCraftingStorageTile.class );
|
|
|
|
}
|
|
|
|
|
2014-05-23 04:39:21 +02:00
|
|
|
@Override
|
|
|
|
public String getUnlocalizedName(ItemStack is)
|
|
|
|
{
|
|
|
|
if ( is.getItemDamage() == 1 )
|
|
|
|
return "tile.appliedenergistics2.BlockCraftingStorage4k";
|
|
|
|
|
|
|
|
if ( is.getItemDamage() == 2 )
|
|
|
|
return "tile.appliedenergistics2.BlockCraftingStorage16k";
|
|
|
|
|
|
|
|
if ( is.getItemDamage() == 3 )
|
|
|
|
return "tile.appliedenergistics2.BlockCraftingStorage64k";
|
|
|
|
|
|
|
|
return getItemUnlocalizedName( is );
|
|
|
|
}
|
|
|
|
|
2014-05-18 05:19:23 +02:00
|
|
|
@Override
|
|
|
|
public IIcon getIcon(int direction, int metadata)
|
|
|
|
{
|
|
|
|
switch (metadata & (~4))
|
|
|
|
{
|
|
|
|
default:
|
|
|
|
|
|
|
|
case 0:
|
|
|
|
return super.getIcon( 0, 0 );
|
|
|
|
case 1:
|
2014-05-26 03:58:44 +02:00
|
|
|
return ExtraBlockTextures.BlockCraftingStorage4k.getIcon();
|
2014-05-18 05:19:23 +02:00
|
|
|
case 2:
|
2014-05-26 03:58:44 +02:00
|
|
|
return ExtraBlockTextures.BlockCraftingStorage16k.getIcon();
|
2014-05-18 05:19:23 +02:00
|
|
|
case 3:
|
2014-05-26 03:58:44 +02:00
|
|
|
return ExtraBlockTextures.BlockCraftingStorage64k.getIcon();
|
2014-05-18 05:19:23 +02:00
|
|
|
|
|
|
|
case 0 | FLAG_FORMED:
|
2014-05-26 03:58:44 +02:00
|
|
|
return ExtraBlockTextures.BlockCraftingStorage1kFit.getIcon();
|
2014-05-18 05:19:23 +02:00
|
|
|
case 1 | FLAG_FORMED:
|
2014-05-26 03:58:44 +02:00
|
|
|
return ExtraBlockTextures.BlockCraftingStorage4kFit.getIcon();
|
2014-05-18 05:19:23 +02:00
|
|
|
case 2 | FLAG_FORMED:
|
2014-05-26 03:58:44 +02:00
|
|
|
return ExtraBlockTextures.BlockCraftingStorage16kFit.getIcon();
|
2014-05-18 05:19:23 +02:00
|
|
|
case 3 | FLAG_FORMED:
|
2014-05-26 03:58:44 +02:00
|
|
|
return ExtraBlockTextures.BlockCraftingStorage64kFit.getIcon();
|
2014-05-18 05:19:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void getSubBlocks(Item i, CreativeTabs c, List l)
|
|
|
|
{
|
|
|
|
l.add( new ItemStack( this, 1, 0 ) );
|
|
|
|
l.add( new ItemStack( this, 1, 1 ) );
|
|
|
|
l.add( new ItemStack( this, 1, 2 ) );
|
|
|
|
l.add( new ItemStack( this, 1, 3 ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|