Package thaumic.tinkerer.common.block.mobilizer

Source Code of thaumic.tinkerer.common.block.mobilizer.BlockMobilizerRelay

package thaumic.tinkerer.common.block.mobilizer;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
import thaumic.tinkerer.client.core.helper.IconHelper;
import thaumic.tinkerer.common.block.BlockMod;
import thaumic.tinkerer.common.block.tile.TileEntityRelay;
import thaumic.tinkerer.common.lib.LibBlockNames;
import thaumic.tinkerer.common.lib.LibResearch;
import thaumic.tinkerer.common.registry.ThaumicTinkererArcaneRecipe;
import thaumic.tinkerer.common.registry.ThaumicTinkererRecipe;
import thaumic.tinkerer.common.research.IRegisterableResearch;

public class BlockMobilizerRelay extends BlockMod {

  public BlockMobilizerRelay() {
    super(Material.iron);
  }

  @Override
  public boolean hasTileEntity(int metadata) {
    return true;
  }

  @Override
  public TileEntity createTileEntity(World world, int metadata) {
    return new TileEntityRelay();
  }

  @SideOnly(Side.CLIENT)
  private IIcon iconTop;
  @SideOnly(Side.CLIENT)
  private IIcon iconBottom;
  @SideOnly(Side.CLIENT)
  private IIcon iconSide;

  @Override
  @SideOnly(Side.CLIENT)
  public void registerBlockIcons(IIconRegister iconRegister) {
    iconBottom = IconHelper.forBlock(iconRegister, this, 0);
    iconTop = IconHelper.forBlock(iconRegister, this, 1);
    iconSide = IconHelper.forBlock(iconRegister, this, 2);
  }

  @Override
  @SideOnly(Side.CLIENT)
  public IIcon getIcon(int par1, int meta) {
    return par1 == ForgeDirection.UP.ordinal() ? iconTop : par1 == ForgeDirection.DOWN.ordinal() ? iconBottom : iconSide;
  }

  @Override
  public String getBlockName() {
    return LibBlockNames.MOBILIZER_RELAY;
  }

  @Override
  public Class<? extends ItemBlock> getItemBlock() {
    return null;
  }

  @Override
  public Class<? extends TileEntity> getTileEntity() {
    return TileEntityRelay.class;
  }

  @Override
  public IRegisterableResearch getResearchItem() {
    return null;
  }

  @Override
  public ThaumicTinkererRecipe getRecipeItem() {
    return new ThaumicTinkererArcaneRecipe(LibResearch.KEY_RELAY, LibResearch.KEY_MOBILIZER, new ItemStack(this), new AspectList().add(Aspect.AIR, 20).add(Aspect.ORDER, 5).add(Aspect.EARTH, 15),
        "WFW", "SIs", "WFW",
        'I', new ItemStack(Items.iron_ingot),
        's', new ItemStack(ConfigItems.itemShard, 1, 3),
        'S', new ItemStack(ConfigItems.itemShard),
        'W', new ItemStack(ConfigBlocks.blockMagicalLog),
        'F', new ItemStack(Blocks.glass));
  }
}
TOP

Related Classes of thaumic.tinkerer.common.block.mobilizer.BlockMobilizerRelay

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.