Package vazkii.botania.common.block

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

/**
* 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 @ [Aug 29, 2014, 9:51:58 PM (GMT)]
*/
package vazkii.botania.common.block;

import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import vazkii.botania.api.lexicon.ILexiconable;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.common.block.tile.mana.TileRFGenerator;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibBlockNames;
import cpw.mods.fml.common.Optional;

public class BlockRFGenerator extends BlockModContainer implements ILexiconable {

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

  @Override
  @Optional.Method(modid = "CoFHAPI")
  public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ) {
    TileEntity tile = world.getTileEntity(x, y, z);
    if(tile != null && tile instanceof TileRFGenerator)
      ((TileRFGenerator) tile).onNeighborTileChange(tileX, tileY, tileZ);
  }

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

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

}
TOP

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

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.