-
-
Save alesharik/fd5dbddccd9585df49dc 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 TheBasement.Blocks; | |
import TheBasement.tile.TileEntityLampBlock; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.BlockContainer; | |
import net.minecraft.block.material.Material; | |
import net.minecraft.creativetab.CreativeTabs; | |
import net.minecraft.tileentity.TileEntity; | |
import net.minecraft.world.World; | |
import net.minecraftforge.common.util.ForgeDirection; | |
public class LampBlock extends BlockContainer implements cofh.lib.util.position.IRotateableTile { | |
protected LampBlock(String UnlocalizedName, Material p_i45394_1_) { | |
super(p_i45394_1_); | |
this.setBlockName(UnlocalizedName); | |
this.setHardness(2); | |
this.setResistance(1); | |
this.setCreativeTab(CreativeTabs.tabRedstone); | |
this.setHarvestLevel("picaxe", 1); | |
this.isBlockContainer = true; | |
}; | |
@Override | |
public TileEntity createNewTileEntity(World worldIn, int meta) { | |
return new TileEntityLampBlock(); | |
} | |
@Override | |
public boolean canRotate(){ | |
return true; | |
} | |
@Override | |
public boolean canRotate(ForgeDirection axis) { | |
// TODO Auto-generated method stub | |
return false; | |
} | |
@Override | |
public void rotate(ForgeDirection axis) { | |
// TODO Auto-generated method stub | |
} | |
@Override | |
public void rotateDirectlyTo(int facing) { | |
// TODO Auto-generated method stub | |
} | |
@Override | |
public ForgeDirection getDirectionFacing() { | |
// TODO Auto-generated method stub | |
return null; | |
}; | |
public void onBlockPreDestroy(World world, int x, int y, int z, int meta) | |
{ | |
super.onBlockPreDestroy(world,x,y,z,meta); | |
TileEntityLampBlock tileEntity = (TileEntityLampBlock)world.getTileEntity(x,y,z); | |
if(tileEntity != null) | |
tileEntity.onDestroyed(); | |
} | |
//TileEntity tileentity = world.getTileEntity(x, y, z); | |
//return tileentity == null ? false : tileentity.receiveClientEvent(eventID, eventParam); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment