Guest User

Untitled

a guest
Jun 15th, 2015
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.89 KB | None | 0 0
  1. package com.wwy.mod.blocks.techno;
  2.  
  3. import com.wwy.mod.alpha.Main;
  4. import com.wwy.mod.te.techno.TETechnoReplenisher;
  5.  
  6. import net.minecraft.block.ITileEntityProvider;
  7. import net.minecraft.client.renderer.texture.IIconRegister;
  8. import net.minecraft.creativetab.CreativeTabs;
  9. import net.minecraft.entity.player.EntityPlayer;
  10. import net.minecraft.tileentity.TileEntity;
  11. import net.minecraft.util.IIcon;
  12. import net.minecraft.world.World;
  13.  
  14. public class BlockTechnoReplenisher extends BlockTechnoMachine implements ITileEntityProvider {
  15.  
  16.     TETechnoReplenisher replenisher;
  17.     IIcon[] icons = new IIcon[6];
  18.     IIcon inactive;
  19.     IIcon active;
  20.    
  21.     public BlockTechnoReplenisher() {
  22.         this.setBlockName("blockTechnoReplenisher");
  23.         this.setBlockTextureName(Main.MODID + ":" + "blockTechnoReplenisher");
  24.         this.setCreativeTab(CreativeTabs.tabMisc);
  25.     }
  26.    
  27.     @Override
  28.     public boolean onBlockActivated(World world, int x, int y, int z,
  29.             EntityPlayer player, int p_149727_6_, float p_149727_7_,
  30.             float p_149727_8_, float p_149727_9_) {
  31.         // TODO Auto-generated method stub
  32.         if (world.isRemote) {
  33.             replenisher.printInfo();
  34.         }
  35.         return false;
  36.     }
  37.  
  38.     @Override
  39.     public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
  40.         // TODO Auto-generated method stub
  41.         this.replenisher = new TETechnoReplenisher(this);
  42.         return replenisher;
  43.     }
  44.    
  45.     /*
  46.    
  47.     @Override
  48.     public void registerBlockIcons(IIconRegister reg) {
  49.         this.icons[0] = reg.registerIcon(this.textureName + "_" + "top");
  50.         for (int i = 1; i < 5; i++) {
  51.             this.icons[i] = reg.registerIcon(this.textureName + "_" + "side");
  52.         }
  53.         this.icons[5] = reg.registerIcon(this.textureName + "_" + "bottom");
  54.     }
  55.    
  56.     */
  57.    
  58.     @Override
  59.     public IIcon getIcon(int side, int meta) {
  60.         if (meta == 0) {
  61.             return this.blockIcon;
  62.         } else if (meta == 1) {
  63.             return this.blockIcon;
  64.         }
  65.         return this.blockIcon;
  66.     }
  67.  
  68. }
Advertisement
Add Comment
Please, Sign In to add comment