2012-08-29 22:02:30 +02:00
|
|
|
package ee3.common.block;
|
|
|
|
|
2012-09-17 05:04:14 +02:00
|
|
|
import ee3.common.EquivalentExchange3;
|
|
|
|
import ee3.common.lib.GuiIds;
|
2012-08-29 22:02:30 +02:00
|
|
|
import ee3.common.lib.RenderIds;
|
2012-11-06 21:49:43 +01:00
|
|
|
import ee3.common.lib.Strings;
|
2012-08-29 22:02:30 +02:00
|
|
|
import ee3.common.tile.TileCalcinator;
|
2012-12-13 16:01:41 +01:00
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraft.world.World;
|
2012-08-29 22:02:30 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* BlockCalcinator
|
|
|
|
*
|
|
|
|
* Block class for the Calcinator
|
|
|
|
*
|
|
|
|
* @author pahimar
|
|
|
|
* @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class BlockCalcinator extends BlockEE {
|
|
|
|
|
|
|
|
public BlockCalcinator(int id) {
|
|
|
|
super(id, Material.rock);
|
2012-11-06 21:49:43 +01:00
|
|
|
this.setBlockName(Strings.CALCINATOR_NAME);
|
|
|
|
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
|
|
|
this.setHardness(5F);
|
2012-08-29 22:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TileEntity createNewTileEntity(World var1) {
|
|
|
|
return new TileCalcinator();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean renderAsNormalBlock() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isOpaqueCube() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getRenderType() {
|
|
|
|
return RenderIds.calcinatorRenderId;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getBlockTextureFromSide(int par1) {
|
|
|
|
return 1;
|
|
|
|
}
|
2012-09-17 05:04:14 +02:00
|
|
|
|
|
|
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
|
|
|
|
2012-09-28 22:05:29 +02:00
|
|
|
if (!world.isRemote) {
|
2012-09-17 05:04:14 +02:00
|
|
|
TileCalcinator tileCalcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z);
|
|
|
|
|
|
|
|
if (tileCalcinator != null) {
|
|
|
|
player.openGui(EquivalentExchange3.instance, GuiIds.CALCINATOR, world, x, y, z);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
2012-08-29 22:02:30 +02:00
|
|
|
|
|
|
|
}
|