Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.DoctorWhoAdventures.superhb.mod.TARDIS;
- import java.util.List;
- import org.lwjgl.opengl.GL11;
- import cpw.mods.fml.client.FMLClientHandler;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- import net.DoctorWhoAdventures.superhb.mod.DoctorWhoAdventure;
- import net.minecraft.block.Block;
- import net.minecraft.block.BlockContainer;
- import net.minecraft.block.ITileEntityProvider;
- import net.minecraft.block.material.Material;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.renderer.texture.IconRegister;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.util.AABBPool;
- import net.minecraft.util.AxisAlignedBB;
- import net.minecraft.util.ResourceLocation;
- import net.minecraft.world.IBlockAccess;
- import net.minecraft.world.World;
- import net.minecraftforge.client.model.AdvancedModelLoader;
- import net.minecraftforge.client.model.IModelCustom;
- import net.minecraftforge.common.MinecraftForge;
- public class BlockEleventhTardis extends Block
- {
- private IModelCustom EleventhTardis;
- 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;
- }
- @Override
- public boolean isCollidable()
- {
- return true;
- }
- /**
- * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
- */
- @Override
- 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;
- }
- //Block Bounds
- public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity)
- {
- this.setBlockBounds(0F, 0F, 0F, 0F, 0F, 0F);
- super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
- this.setBlockBounds(0F, 0F, 0F, 0.625F, 0F, 0F);
- super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
- this.setBlockBounds(0F, 0F, 0F, 2F, 2F, 2F);
- super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
- this.setBlockBounds(0F, 0F, 0F, 1.111F, 1F, 1.111F);
- }
- /**
- * 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;
- }
- @Override
- public TileEntity createTileEntity(World world, int metadata)
- {
- return new TileEntityTardis();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment