summaryrefslogtreecommitdiff
path: root/src/main/java/lance5057/tDefense/blocks/JewelersBench.java
blob: e2246758ca74dae6cd146403f1cf0bf02651998e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package lance5057.tDefense.blocks;

import lance5057.tDefense.tileentities.TileEntity_JewelersBench;
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class JewelersBench extends Block implements ITileEntityProvider
{

	public JewelersBench() {
		super(Material.iron);
	}

	//You don't want the normal render type, or it wont render properly.
	@Override
	public int getRenderType() {
	        return -1;
	}
	
	//It's not an opaque cube, so you need this.
	@Override
	public boolean isOpaqueCube() {
	        return false;
	}
	
	//It's not a normal block, so you need this too.
	public boolean renderAsNormalBlock() {
	        return false;
	}
	
	//This is the icon to use for showing the block in your hand.
    @SideOnly(Side.CLIENT)
    @Override
    public void registerBlockIcons(IIconRegister icon) {
	        this.blockIcon = icon.registerIcon("tinkersdefense:WIP");
	}
	
	@Override
	public TileEntity createNewTileEntity(World w, int md) {
		TileEntity_JewelersBench te = new TileEntity_JewelersBench();
	    return te;
	}

}