Created
May 20, 2015 16:09
-
-
Save anonymous/0be610abd1d4de1f1258 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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