package org.cyclops.cyclopscore.helper;

import com.google.common.base.Charsets;
import com.google.common.collect.Lists;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.block.model.ModelBlock;
import net.minecraft.client.resources.IResource;
import net.minecraft.util.ResourceLocation;

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Collections;
import java.util.List;

/**
 * Helpers for models.
 * @author rubensworks
 */
public final class ModelHelpers {

    // An empty list^2 for quads.
    public static final List<List<BakedQuad>> EMPTY_FACE_QUADS;
    static {
        EMPTY_FACE_QUADS = Lists.newArrayList();
        for(int i = 0; i < 6; i++) {
            EMPTY_FACE_QUADS.add(Collections.<BakedQuad>emptyList());
        }
    }

    /**
     * Read the given model location to a {@link net.minecraft.client.renderer.block.model.ModelBlock}.
     * @param modelLocation A model location (without .json suffix)
     * @return The corresponding model.
     * @throws IOException If the model file was invalid.
     */
    public static ModelBlock loadModelBlock(ResourceLocation modelLocation) throws IOException {
        IResource resource = Minecraft.getMinecraft().getResourceManager().getResource(
                new ResourceLocation(modelLocation.getResourceDomain(), modelLocation.getResourcePath() + ".json"));
        Reader reader = new InputStreamReader(resource.getInputStream(), Charsets.UTF_8);
        return ModelBlock.deserialize(reader);
    }
}

@@ -107,20 +107,19 @@
 collect.
-List
+Map
 s;%0Aimpor
@@ -322,16 +322,54 @@
 source;%0A
+import net.minecraft.util.EnumFacing;%0A
 import n
@@ -542,16 +542,38 @@
 il.List;
+%0Aimport java.util.Map;
 %0A%0A/**%0A *
@@ -713,21 +713,32 @@
 c final 
-List%3C
+Map%3CEnumFacing, 
 List%3CBak
@@ -808,26 +808,23 @@
 S = 
-List
+Map
 s.new
-ArrayList
+HashMap
 ();%0A
@@ -838,30 +838,47 @@
  for
-(int i = 0; i %3C 6; i++
+ (EnumFacing facing : EnumFacing.VALUES
 ) %7B%0A
@@ -910,12 +910,20 @@
 ADS.
-add(
+put(facing, 
 Coll

Use new EMPTY_FACE_QUADS format