Package vazkii.botania.common.block

Source Code of vazkii.botania.common.block.BlockDistributor

/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* File Created @ [Mar 3, 2014, 1:44:29 AM (GMT)]
*/
package vazkii.botania.common.block;

import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import vazkii.botania.api.lexicon.ILexiconable;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.common.block.tile.mana.TileDistributor;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibBlockNames;

public class BlockDistributor extends BlockModContainer implements ILexiconable {

  IIcon iconSide, iconTop;

  protected BlockDistributor() {
    super(Material.rock);
    setHardness(2.0F);
    setResistance(10.0F);
    setStepSound(soundTypeStone);
    setBlockName(LibBlockNames.DISTRIBUTOR);
  }

  @Override
  public void registerBlockIcons(IIconRegister par1IconRegister) {
    iconTop = IconHelper.forBlock(par1IconRegister, this, 0);
    iconSide = IconHelper.forBlock(par1IconRegister, this, 1);
  }

  @Override
  public IIcon getIcon(int par1, int par2) {
    return par1 == 0 ? ModBlocks.livingrock.getIcon(0, 0) : par1 == 1 ? iconTop : iconSide;
  }

  @Override
  public TileEntity createNewTileEntity(World world, int meta) {
    return new TileDistributor();
  }

  @Override
  public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
    return LexiconData.distributor;
  }

}
TOP

Related Classes of vazkii.botania.common.block.BlockDistributor

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.