Package vazkii.botania.common.block

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

/**
* 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 @ [Nov 8, 2014, 5:25:12 PM (GMT)]
*/
package vazkii.botania.common.block;

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.TileTerraPlate;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibBlockNames;
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;

public class BlockTerraPlate extends BlockModContainer implements ILexiconable {
 
  public static IIcon overlay;
  IIcon[] icons;
 
  protected BlockTerraPlate() {
    super(Material.iron);
    setBlockBounds(0F, 0F, 0F, 1F, 3F / 16F, 1F);
    setHardness(3F);
    setResistance(10F);
    setStepSound(soundTypeMetal);
    setBlockName(LibBlockNames.TERRA_PLATE);
  }
 
  @Override
  public boolean renderAsNormalBlock() {
    return false;
  }
 
  @Override
  public boolean isOpaqueCube() {
    return false;
  }
 
  @Override
  public void registerBlockIcons(IIconRegister par1IconRegister) {
    icons = new IIcon[4];
    for(int i = 0; i < icons.length; i++)
      icons[i] = IconHelper.forBlock(par1IconRegister, this, i);
    overlay = IconHelper.forBlock(par1IconRegister, this, "Overlay");
  }

  @Override
  public IIcon getIcon(int par1, int par2) {
    return icons[Math.min(2, par1)];
  }

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

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

}
TOP

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

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.