package ljfa.glassshards.util;

import net.minecraft.block.Block;
import net.minecraft.block.BlockGlass;
import net.minecraft.block.BlockPane;
import net.minecraft.block.BlockStainedGlass;
import net.minecraft.block.BlockStainedGlassPane;
import net.minecraft.block.material.Material;

public class GlassHelper {
    public static enum GlassType {
        block(1.0f), pane(0.375f);
        
        public final float multiplier;
        
        private GlassType(float mult) { multiplier = mult; }
    }
    
    public static GlassType getType(Block block, int meta) {
        if(block instanceof BlockGlass || block instanceof BlockStainedGlass)
            return GlassType.block;
        else if(block instanceof BlockStainedGlassPane
                || block instanceof BlockPane && block.getMaterial() == Material.glass)
            return GlassType.pane;
        else
            return null;
    }
    
    public static boolean isGlassStained(Block block, int meta) {
        return block instanceof BlockStainedGlass || block instanceof BlockStainedGlassPane;
    }
    
    public static int getGlassColor(Block block, int meta) {
        return meta;
    }
}

@@ -306,16 +306,74 @@
 elper %7B%0A
+    /** Represents if a block is a glass block or pane */%0A
     publ
@@ -399,16 +399,16 @@
 sType %7B%0A
-
         
@@ -555,32 +555,175 @@
 t; %7D%0A    %7D%0A    %0A
+    /** Checks if the block is some kind of glass%0A     * @return A GlassType representing the type, or null if it is not a glass block%0A     */%0A
     public stati
@@ -1100,32 +1100,80 @@
 ull;%0A    %7D%0A    %0A
+    /** Checks if the glass block is stained */%0A
     public stati
@@ -1317,29 +1317,76 @@
 Pane;%0A    %7D%0A
-
     %0A
+    /** Returns the color for stained glass */%0A
     public s

Add some comments