Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.stolenchristmas.mods.blocks;
- import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
- import net.minecraft.block.BlockContainer;
- import net.minecraft.block.material.Material;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.world.World;
- import net.stolenchristmas.mods.stolenchristmas;
- import net.stolenchristmas.mods.tileentity.TileEntityXmasTable;
- public class XmasTable extends BlockContainer{
- public XmasTable(Material material) {
- super(material);
- this.setHardness(2.0F);
- this.setResistance(10.0F);
- this.setCreativeTab(stolenchristmas.xmasTab);
- }
- public int getRenderType(){
- return -1;
- }
- public boolean isOpaqueCube(){
- return false;
- }
- public boolean renderAsNormalBlock(){
- return false;
- }
- @Override
- public TileEntity createNewTileEntity(World var1, int var2) {
- return new TileEntityXmasTable();
- }
- @Override
- public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
- if (!player.isSneaking()) {
- player.openGui(stolenchristmas.instance, stolenchristmas.guiIDWorkSurface, world, x, y, z);
- return true;
- }else{
- return false;
- }
- }}
Advertisement
Add Comment
Please, Sign In to add comment