Advertisement
Mujun_Kross

GenericBlock.java

Nov 25th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. /*
  2.  * all block mods should inherit this mod...this will contain all code that is
  3.  * the same for each block
  4.  */
  5. package mod_Tutorial.commom;
  6.  
  7. import net.minecraft.src.Block;
  8. import net.minecraft.src.CreativeTabs;
  9. import net.minecraft.src.Material;
  10. import net.minecraft.src.World;
  11.  
  12. public class GenericBlock extends Block {
  13.    
  14.     public GenericBlock(int id,int texture, Material material)
  15.     {
  16.         super(id, texture, material);
  17.  
  18.         //all items should be on the custom tab
  19.         setCreativeTab(mod_Tutorial.customTab);
  20.     }
  21.  
  22.     //this checks to see if the sun is up
  23.     public static boolean isSolar(World world, int x, int y, int z, int blockID)
  24.     {
  25.         if(world.getBrightness(x, y + 1, z, 0) > .99)
  26.             return true;
  27.         else
  28.             return false;
  29.     }
  30.    
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement