Advertisement
Guest User

BlockLeavesBase.java

a guest
Jun 8th, 2013
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.31 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. public class BlockLeavesBase extends Block
  4. {
  5.     /**
  6.      * Used to determine how to display leaves based on the graphics level. May also be used in rendering for
  7.      * transparency, not sure.
  8.      */
  9.     protected boolean graphicsLevel;
  10.     private boolean hi;
  11.  
  12.     protected BlockLeavesBase(int par1, Material par2Material, boolean par3)
  13.     {
  14.         super(par1, par2Material);
  15.         this.graphicsLevel = par3;
  16.         this.hi = false;
  17.     }
  18.  
  19.     /**
  20.      * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two
  21.      * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
  22.      */
  23.     public boolean isOpaqueCube()
  24.     {
  25.         return false;
  26.     }
  27.  
  28.     /**
  29.      * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
  30.      * coordinates.  Args: blockAccess, x, y, z, side
  31.      */
  32.     public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
  33.     {
  34.         int var6 = par1IBlockAccess.getBlockId(par2, par3, par4);
  35.         return !this.graphicsLevel && var6 == this.blockID ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement