package ljfa.glassshards.util;

/** Represents a certain type of glass for the purpose of shards */
public class GlassType {
    /** Represents if a block is a glass block or pane */
    public static enum GlassShape {
        block(1.0f), pane(0.375f);
        
        public final float multiplier;
        
        private GlassShape(float mult) { multiplier = mult; }
    }
    
    public final GlassShape shape;
    public final boolean isStained;
    public final int color;
    
    public GlassType(GlassShape shape, boolean stained, int color) {
        this.shape = shape;
        this.isStained = stained;
        this.color = color;
    }
    
    public GlassType(GlassShape shape) {
        this(shape, false, -1);
    }
}

@@ -25,16 +25,323 @@
 .util;%0A%0A
+import ljfa.glassshards.util.GlassHelper.GlassShape;%0Aimport net.minecraft.block.Block;%0Aimport net.minecraft.block.BlockGlass;%0Aimport net.minecraft.block.BlockPane;%0Aimport net.minecraft.block.BlockStainedGlass;%0Aimport net.minecraft.block.BlockStainedGlassPane;%0Aimport net.minecraft.block.material.Material;%0A%0A
 /** Repr
@@ -1037,10 +1037,719 @@
 ;%0A    %7D%0A
+    %0A    /** Checks if the block is some kind of glass%0A     * @return A GlassShape representing the type, or null if it is not glass%0A     */%0A    public static GlassType getType(Block block, int meta) %7B%0A        if(block instanceof BlockGlass)%0A            return new GlassType(GlassShape.block);%0A        else if(block instanceof BlockStainedGlass)%0A            return new GlassType(GlassShape.block, true, meta);%0A        else if(block instanceof BlockPane && block.getMaterial() == Material.glass)%0A            return new GlassType(GlassShape.pane);%0A        else if(block instanceof BlockStainedGlassPane)%0A            return new GlassType(GlassShape.pane, true, meta);%0A        else%0A            return null;%0A    %7D%0A
 %7D%0A

add to GlassType