Advertisement
Guest User

BlockFluidBed

a guest
Jul 23rd, 2012
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.54 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.Random;
  5.  
  6. import net.minecraft.src.forge.*;
  7.  
  8. public class BlockFluidBed extends Block implements ITextureProvider{
  9.  
  10.    
  11.    
  12.     protected BlockFluidBed(int id, int imgSlot, Material material) {
  13.         super(id, imgSlot, material);
  14.        
  15.     }
  16.    
  17.     public int getBlockTextureFromSideAndMetadata(int side, int meta){
  18.        
  19.         switch(side){
  20.            
  21.             default:
  22.                 return 81;
  23.             case 0:
  24.                 return 80;
  25.             case 1:
  26.                 return 82;
  27.         }
  28.        
  29.     }
  30.    
  31.     public int getBlockTextureFromSide(int side){
  32.        
  33.         switch(side){
  34.            
  35.             default:
  36.                 return this.blockIndexInTexture+1;
  37.             case 0:
  38.                 return this.blockIndexInTexture;
  39.             case 1:
  40.                 return this.blockIndexInTexture+2;
  41.         }
  42.        
  43.     }
  44.    
  45.     public void setBlockBoundsForItemRender(){
  46.        
  47.         this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.25F, 1.0F);
  48.        
  49.     }
  50.    
  51.     public void getCollidingBoundingBoxes(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, ArrayList par6ArrayList)
  52.     {
  53.         this.setBlockBoundsBasedOnState(par1World, par2, par3, par4);
  54.         super.getCollidingBoundingBoxes(par1World, par2, par3, par4, par5AxisAlignedBB, par6ArrayList);
  55.     }
  56.    
  57.    
  58.    
  59.     public boolean isOpaqueCube(){
  60.        
  61.         return false;
  62.        
  63.     }
  64.    
  65.     public int getRenderType(){
  66.        
  67.         return mod_cutter.fluidBedRenderID;
  68.    
  69.     }
  70.    
  71.  
  72.     @Override
  73.     public String getTextureFile() {
  74.         return "/cutter/Blocks.png";
  75.     }
  76.  
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement