Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * all block mods should inherit this mod...this will contain all code that is
- * the same for each block
- */
- package mod_Tutorial.commom;
- import net.minecraft.src.Block;
- import net.minecraft.src.CreativeTabs;
- import net.minecraft.src.Material;
- import net.minecraft.src.World;
- public class GenericBlock extends Block {
- public GenericBlock(int id,int texture, Material material)
- {
- super(id, texture, material);
- //all items should be on the custom tab
- setCreativeTab(mod_Tutorial.customTab);
- }
- //this checks to see if the sun is up
- public static boolean isSolar(World world, int x, int y, int z, int blockID)
- {
- if(world.getBrightness(x, y + 1, z, 0) > .99)
- return true;
- else
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement