Guest User

Untitled

a guest
Jun 15th, 2015
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.11 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.         TETechnoReplenisher replenisher = (TETechnoReplenisher) world.getTileEntity(x, y, z);
  33.         if (world.isRemote) {
  34.             replenisher.printInfo();
  35.         }
  36.         return false;
  37.     }
  38.  
  39.     @Override
  40.     public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
  41.         // this.replenisher = new TETechnoReplenisher();
  42.         // return replenisher;
  43.         return new TETechnoReplenisher();
  44.     }
  45.    
  46.     /*
  47.     @Override
  48.     public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int meta) {
  49.         this.replenisher = null;
  50.     }
  51.    
  52.     /*
  53.    
  54.     @Override
  55.     public void registerBlockIcons(IIconRegister reg) {
  56.         this.icons[0] = reg.registerIcon(this.textureName + "_" + "top");
  57.         for (int i = 1; i < 5; i++) {
  58.             this.icons[i] = reg.registerIcon(this.textureName + "_" + "side");
  59.         }
  60.         this.icons[5] = reg.registerIcon(this.textureName + "_" + "bottom");
  61.     }
  62.    
  63.     */
  64.    
  65.     @Override
  66.     public IIcon getIcon(int side, int meta) {
  67.         if (meta == 0) {
  68.             return this.blockIcon;
  69.         } else if (meta == 1) {
  70.             return this.blockIcon;
  71.         }
  72.         return this.blockIcon;
  73.     }
  74.  
  75. }
Advertisement
Add Comment
Please, Sign In to add comment