Skip to content

Instantly share code, notes, and snippets.

Created May 20, 2015 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0be610abd1d4de1f1258 to your computer and use it in GitHub Desktop.
Save anonymous/0be610abd1d4de1f1258 to your computer and use it in GitHub Desktop.
package fr.ah26.futura.common;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class XFurnace extends BlockContainer
{
public IIcon xfurnace_front_off, xfurnace_top, xfurnace_side, xfurnace_front_on;
public void registerBlockIcons(IIconRegister iconRegister)
{
this.xfurnace_front_off = iconRegister.registerIcon(Futura.MODID + ":xfurnace_front_off");
this.xfurnace_top = iconRegister.registerIcon(Futura.MODID + ":xfurnace_top");
this.xfurnace_side = iconRegister.registerIcon(Futura.MODID + ":xfurnace_side");
this.xfurnace_front_on = iconRegister.registerIcon(Futura.MODID + ":xfurnace_front_on");
}
protected XFurnace(Material material) {
super(material);
// TODO Auto-generated constructor stub
}
public XFurnace()
{
super(Material.rock);
this.setResistance(8.0F);
this.setHarvestLevel("pickaxe", 0);
}
@Override
public TileEntity createNewTileEntity(World world, int metadata) {
// TODO Auto-generated method stub
return new TileEntityXFurnace();
}
@Override
public boolean hasTileEntity(int metadata)
{
return true;
}
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitx, float hity, float hitz)
{
if (world.isRemote)
{
return true;
}
else
{
player.openGui(Futura.XFurnace, 0, world, x, y, z);
return true;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment