Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BlockEleventhTardis extends BlockContainer
- {
- public BlockEleventhTardis(int i, Material m)
- {
- super(i, m);
- setHardness(3.5F);
- setStepSound(Block.soundStoneFootstep);
- setCreativeTab(DoctorWhoAdventure.tabDoctorWho);
- setResistance(1000.0F);
- setResistance(1000.0F);
- setHardness(1.5F);
- setLightOpacity(0);
- setLightValue(0.0f);
- setTickRandomly(false);
- setUnlocalizedName("dwadventure:EleventhTardis");
- // Harvest level for this block. par2 can be pickaxe, axe, or shovel, or
- // a different toolclass. par3 is the minimum level of item required to
- // break it:
- // 0=bare hands, 1=wood, 2=stone, 3=iron, 4=diamond
- //ItemSonicScrewdriver.setBlockHarvestLevel(this, "sonic", 0);
- }
- @SideOnly(Side.CLIENT)
- public void registerIcons(IconRegister par1IconRegister)
- {
- blockIcon = par1IconRegister.registerIcon("dwadventures:EleventhTARDIS");
- }
- /**
- * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
- * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
- */
- @Override
- public boolean isOpaqueCube()
- {
- return false;
- }
- /**
- * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
- */
- public boolean renderAsNormalBlock()
- {
- return false;
- }
- /**
- * Returns Returns true if the given side of this block type should be
- * rendered (if it's solid or not), if the adjacent block is at the given
- * coordinates. Args: blockAccess, x, y, z, side
- */
- @Override
- public boolean isBlockSolid(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
- return true;
- }
- /**
- * This method is called on a block after all other blocks gets already
- * created. You can use it to reference and configure something on the block
- * that needs the others ones.
- */
- @Override
- protected void initializeBlock() {
- }
- /**
- * Called throughout the code as a replacement for block instanceof
- * BlockContainer Moving this to the Block base class allows for mods that
- * wish
- * to extend vinella blocks, and also want to have a tile entity on that
- * block, may.
- *
- * Return true from this function to specify this block has a tile entity.
- *
- * @param metadata
- * Metadata of the current block
- * @return True if block has a tile entity, false otherwise
- */
- @Override
- public boolean hasTileEntity(int metadata) {
- return true;
- }
- /**
- * Called throughout the code as a replacement for
- * BlockContainer.getBlockEntity Return the same thing you would from that
- * function. This will
- * fall back to BlockContainer.getBlockEntity if this block is a
- * BlockContainer.
- *
- * @param metadata
- * The Metadata of the current block
- * @return A instance of a class extending TileEntity
- */
- @Override
- public TileEntity createTileEntity(World world, int metadata) {
- return new TileEntityTardis();
- }
- @Override
- public TileEntity createNewTileEntity(World world) {
- // TODO Auto-generated method stub
- return new TileEntityTardis();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement