diff --git a/src/main/java/net/minecraft/client/gui/GuiRenderItem.java b/src/main/java/net/minecraft/client/gui/GuiRenderItem.java
index 08ff625c1..8d347dbe2 100644
--- a/src/main/java/net/minecraft/client/gui/GuiRenderItem.java
+++ b/src/main/java/net/minecraft/client/gui/GuiRenderItem.java
@@ -41,13 +41,15 @@ public class GuiRenderItem extends Gui
         if (slot != null)
         {
             discovered = slot.getIsDiscovered(mc.thePlayer);
-            final IconCoordinate iconIndex = TextureRegistry.getTexture(slot.getBackgroundIconId());
-            if (iconIndex != null && itemStack == null)
-            {
-                GL11.glDisable(GL11.GL_LIGHTING);
-                drawTexturedIcon(x, y, 16, 16, iconIndex);
-                GL11.glEnable(GL11.GL_LIGHTING);
-                hasDrawnSlotBackground = true;
+            if (slot.getBackgroundIconId() != null) {
+                final IconCoordinate iconIndex = TextureRegistry.getTexture(slot.getBackgroundIconId());
+                if (itemStack == null)
+                {
+                    GL11.glDisable(GL11.GL_LIGHTING);
+                    drawTexturedIcon(x, y, 16, 16, iconIndex);
+                    GL11.glEnable(GL11.GL_LIGHTING);
+                    hasDrawnSlotBackground = true;
+                }
             }
         }
 
diff --git a/src/main/java/net/minecraft/client/render/block/model/BlockModelFluid.java b/src/main/java/net/minecraft/client/render/block/model/BlockModelFluid.java
index 2f74fbfb6..ff56d4b7c 100644
--- a/src/main/java/net/minecraft/client/render/block/model/BlockModelFluid.java
+++ b/src/main/java/net/minecraft/client/render/block/model/BlockModelFluid.java
@@ -70,7 +70,7 @@ public class BlockModelFluid<T extends Block> extends BlockModelStandard<T> {
             }else {
             	blockBrightness = getBlockBrightness(renderBlocks.blockAccess, x, y, z);
             }
-            if (texture.namespaceId.contains("_flowing")){
+            if (texture.namespaceId.toString().contains("_flowing")){
                 double centerU = texture.getSubIconU(0.5);
                 double centerV = texture.getSubIconV(0.5);
                 float cSin = MathHelper.cos(rotation)/2;
diff --git a/src/main/java/net/minecraft/client/render/stitcher/AtlasStitcher.java b/src/main/java/net/minecraft/client/render/stitcher/AtlasStitcher.java
index eb3137b22..6b6d901a9 100644
--- a/src/main/java/net/minecraft/client/render/stitcher/AtlasStitcher.java
+++ b/src/main/java/net/minecraft/client/render/stitcher/AtlasStitcher.java
@@ -11,6 +11,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import net.minecraft.core.Global;
+import net.minecraft.core.util.collection.NamespaceID;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import net.minecraft.client.GLAllocation;
@@ -20,7 +23,7 @@ import net.minecraft.client.util.helper.Textures;
 public class AtlasStitcher {
     private static final Minecraft mc = Minecraft.getMinecraft(AtlasStitcher.class);
     public static final String rootAssetPath = "/assets";
-    public Map<String, IconCoordinate> textureMap = new HashMap<>();
+    public Map<NamespaceID, IconCoordinate> textureMap = new HashMap<>();
     public Set<IconCoordinate> dontSetSize = new HashSet<>();
     public BufferedImage atlas;
     public final String directoryPath;
@@ -34,22 +37,20 @@ public class AtlasStitcher {
     private final boolean mipmap;
     public AtlasStitcher(String directoryPath, boolean mipmap, @Nullable String defaultTexture){
         this.directoryPath = directoryPath;
-        this.textureId = GLAllocation.generateTexture();
+        this.textureId = Global.isServer ? -1 : GLAllocation.generateTexture();
         this.mipmap = mipmap;
         this.defaultTexture = defaultTexture;
     }
-    protected IconCoordinate getTexture(String key){
-        if (textureMap.containsKey(key)) return textureMap.get(key);
+    protected IconCoordinate getTexture(@NotNull NamespaceID id){
+        if (textureMap.containsKey(id)) return textureMap.get(id);
 
 
-        IconCoordinate iconCoordinate = new IconCoordinate(this, key, getSourceImagePath(key));
-        textureMap.put(key, iconCoordinate);
+        IconCoordinate iconCoordinate = new IconCoordinate(this, id, getSourceImagePath(id));
+        textureMap.put(id, iconCoordinate);
         return iconCoordinate;
     }
-    public String getSourceImagePath(String key){
-        String[] split = key.split(":");
-        if (split.length != 2) throw new IllegalArgumentException("Key '" + key + "' is improperly formatted!");
-        return String.format("%s/%s/%s/%s.png", rootAssetPath, split[0], directoryPath, split[1]);
+    public String getSourceImagePath(@NotNull NamespaceID id){
+        return String.format("%s/%s/%s/%s.png", rootAssetPath, id.namespace, directoryPath, id.value);
     }
     public void generateAtlas(){
         // Load all individual textures and the store the widths
diff --git a/src/main/java/net/minecraft/client/render/stitcher/IconCoordinate.java b/src/main/java/net/minecraft/client/render/stitcher/IconCoordinate.java
index 32bf70e6c..6557c41c8 100644
--- a/src/main/java/net/minecraft/client/render/stitcher/IconCoordinate.java
+++ b/src/main/java/net/minecraft/client/render/stitcher/IconCoordinate.java
@@ -1,5 +1,6 @@
 package net.minecraft.client.render.stitcher;
 
+import net.minecraft.core.util.collection.NamespaceID;
 import org.jetbrains.annotations.NotNull;
 
 import java.awt.*;
@@ -11,10 +12,10 @@ public class IconCoordinate implements Comparable<IconCoordinate> {
     public int width;
     public int height;
     protected final String sourceImage;
-    public final String namespaceId;
+    public final NamespaceID namespaceId;
     public final AtlasStitcher parentAtlas;
     private BufferedImage _imageStorage;
-    public IconCoordinate(AtlasStitcher stitcher, String namespaceId, String sourceImage){
+    public IconCoordinate(AtlasStitcher stitcher, NamespaceID namespaceId, String sourceImage){
         this.parentAtlas = stitcher;
         this.namespaceId = namespaceId;
         this.sourceImage = sourceImage;
diff --git a/src/main/java/net/minecraft/client/render/stitcher/TextureRegistry.java b/src/main/java/net/minecraft/client/render/stitcher/TextureRegistry.java
index 2fe4a0519..f8c99e0a9 100644
--- a/src/main/java/net/minecraft/client/render/stitcher/TextureRegistry.java
+++ b/src/main/java/net/minecraft/client/render/stitcher/TextureRegistry.java
@@ -1,50 +1,64 @@
 package net.minecraft.client.render.stitcher;
 
-import net.minecraft.core.data.DataLoader;
+import net.minecraft.client.render.texturepack.TexturePack;
+import net.minecraft.core.util.collection.NamespaceID;
+import org.jetbrains.annotations.NotNull;
 
-import java.io.IOException;
+import java.io.File;
 import java.net.URI;
-import java.net.URISyntaxException;
 import java.nio.file.FileSystem;
 import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.stream.Stream;
 
 public class TextureRegistry {
     public static HashMap<String, AtlasStitcher> stitcherMap = new HashMap<>();
+    @SuppressWarnings("unused")
     public static AtlasStitcher blockAtlas = register("block", new AtlasStitcher("textures/block", true, "/assets/minecraft/textures/block/texture_missing.png"));
+    @SuppressWarnings("unused")
     public static AtlasStitcher itemAtlas =  register("item", new AtlasStitcher("textures/item", true, "/assets/minecraft/textures/item/texture_missing.png"));
+    @SuppressWarnings("unused")
     public static AtlasStitcher particleAtlas = register("particle", new AtlasStitcher("textures/particle", false, null));
+    @SuppressWarnings("unused")
     public static AtlasStitcher artAtlas = register("art", new AtlasStitcher("textures/art", false, null));
 
-    public static IconCoordinate getTexture(String key){
-        if (key == null) return null;
-
-        String[] split1 = key.split(":");
-        if (split1.length != 2) throw new IllegalArgumentException("Key '" + key + "' is improperly formatted! should follow the scheme 'key:atlas/id'");
-
-        String[] split2 = split1[1].split("/", 2);
+    public static @NotNull IconCoordinate getTexture(@NotNull String key){
+        return getTexture(new NamespaceID(key));
+    }
+    public static @NotNull IconCoordinate getTexture(@NotNull NamespaceID id){
+        String[] split2 = id.value.split("/");
         AtlasStitcher atlas = stitcherMap.get(split2[0]);
         if (atlas == null) throw new IllegalArgumentException("Failed to find atlas '" + split2[0] + "'!");
 
-        return atlas.getTexture(split1[0] + ":" + split2[1]);
-    }
-    public static Boolean hasTexture(String key){
-        if (key == null) return null;
-
-        String[] split1 = key.split(":");
-        if (split1.length != 2) throw new IllegalArgumentException("Key '" + key + "' is improperly formatted! should follow the scheme 'key:atlas/id'");
+        StringBuilder target = new StringBuilder(split2[1]);
+        for (int i = 2; i < split2.length; i++) {
+            target.append("/").append(split2[i]);
+        }
 
-        String[] split2 = split1[1].split("/", 2);
+        return atlas.getTexture(new NamespaceID(id.namespace, target.toString()));
+    }
+    public static boolean hasTexture(@NotNull String key) {
+        return hasTexture(new NamespaceID(key));
+    }
+    public static boolean hasTexture(@NotNull NamespaceID id){
+        String[] split2 = id.value.split("/");
         AtlasStitcher atlas = stitcherMap.get(split2[0]);
         if (atlas == null) throw new IllegalArgumentException("Failed to find atlas '" + split2[0] + "'!");
 
-        return atlas.textureMap.containsKey(split1[0] + ":" + split2[1]);
+        StringBuilder target = new StringBuilder(split2[1]);
+        for (int i = 2; i < split2.length; i++) {
+            target.append("/").append(split2[i]);
+        }
+
+        return atlas.textureMap.containsKey(new NamespaceID(id.namespace, target.toString()));
     }
     public static AtlasStitcher register(String id, AtlasStitcher atlas){
         stitcherMap.put(id, atlas);
@@ -61,30 +75,67 @@ public class TextureRegistry {
             System.out.println("Failed to fully initialize assets, some issue may occur!");
         }
     }
-    public static void initializeAllFiles(String namespace, AtlasStitcher atlas) throws URISyntaxException, IOException, NullPointerException {
-        String path = String.format("%s/%s/%s", AtlasStitcher.rootAssetPath, namespace, atlas.directoryPath);
 
-        URI uri = DataLoader.class.getResource(path).toURI();
-        Path myPath;
-        FileSystem fileSystem = null;
-        if (uri.getScheme().equals("jar")) {
-            fileSystem = FileSystems.newFileSystem(uri, Collections.emptyMap());
-            myPath = fileSystem.getPath(path);
-        } else {
-            myPath = Paths.get(uri);
-        }
-        Stream<Path> walk = Files.walk(myPath, 1);
-        for (Iterator<Path> it = walk.iterator(); it.hasNext();){
-            Path file = it.next();
-            String name = file.getFileName().toString();
+    protected static void initializeAllFiles(String namespace, AtlasStitcher atlas) {
+        String path = String.format("%s/%s/%s/", AtlasStitcher.rootAssetPath, namespace, atlas.directoryPath);
+        String[] files = getFilesAndSubFiles(path);
+        for (String s : files){
+            String name = s.replaceFirst(path, "");
             if (name.endsWith(".png")){
-                atlas.getTexture(namespace + ":" + file.getFileName().toString().replace(".png", ""));
-//                System.out.println(namespace + ":" + file.getFileName().toString().replace(".png", ""));
+                atlas.getTexture(new NamespaceID(namespace, name.replace(".png", "")));
+            }
+        }
+    }
+    public static String[] getFilesAndSubFiles(String directory) {
+        List<String> paths = new ArrayList<>();
+
+        if (!directory.endsWith("/")) directory = directory + "/";
+
+        try
+        {
+            URI uri = TexturePack.class.getResource(directory).toURI();
+            Path myPath;
+            FileSystem fileSystem = null;
+            if (uri.getScheme().equals("jar"))
+            {
+                try
+                {
+                    fileSystem = FileSystems.getFileSystem(uri);
+                }
+                catch (Exception e)
+                {
+                    fileSystem = FileSystems.newFileSystem(uri, Collections.emptyMap());
+                }
+                myPath = fileSystem.getPath(directory);
+            }
+            else
+            {
+                myPath = Paths.get(uri);
+            }
+            try (Stream<Path> walk = Files.walk(myPath, 1))
+            {
+                Iterator<Path> it = walk.iterator();
+                it.next();
+                while(it.hasNext())
+                {
+                    File f = it.next().toFile();
+                    if (f.isDirectory()) {
+                        paths.addAll(Arrays.asList(getFilesAndSubFiles(directory + f.getName())));
+                    } else {
+                        paths.add(directory + f.getName());
+                    }
+                }
+            }
+            if (fileSystem != null)
+            {
+                fileSystem.close();
             }
         }
-        walk.close();
-        if (fileSystem != null){
-            fileSystem.close();
+        catch (Exception e)
+        {
+            e.printStackTrace();
         }
+
+        return paths.toArray(new String[0]);
     }
 }
diff --git a/src/main/java/net/minecraft/core/player/inventory/slot/Slot.java b/src/main/java/net/minecraft/core/player/inventory/slot/Slot.java
index 1f00622a7..d46c04380 100644
--- a/src/main/java/net/minecraft/core/player/inventory/slot/Slot.java
+++ b/src/main/java/net/minecraft/core/player/inventory/slot/Slot.java
@@ -8,6 +8,7 @@ import net.minecraft.core.entity.player.EntityPlayer;
 import net.minecraft.core.item.ItemStack;
 import net.minecraft.core.player.inventory.InventoryPlayer;
 import net.minecraft.core.player.inventory.IInventory;
+import org.jetbrains.annotations.Nullable;
 
 public class Slot
 {
@@ -38,7 +39,7 @@ public class Slot
 		return inventory.decrStackSize(slotIndex, i);
 	}
 
-	public String getBackgroundIconId()
+	public @Nullable String getBackgroundIconId()
 	{
 		return null;
 	}
diff --git a/src/main/java/net/minecraft/core/util/collection/NamespaceID.java b/src/main/java/net/minecraft/core/util/collection/NamespaceID.java
index 95aae1e59..18887264b 100644
--- a/src/main/java/net/minecraft/core/util/collection/NamespaceID.java
+++ b/src/main/java/net/minecraft/core/util/collection/NamespaceID.java
@@ -1,8 +1,10 @@
 package net.minecraft.core.util.collection;
 
+import org.jetbrains.annotations.NotNull;
+
 import java.util.Comparator;
 
-public final class NamespaceID implements Comparator<NamespaceID> {
+public final class NamespaceID implements Comparator<NamespaceID>, Comparable<NamespaceID> {
     public final String namespace;
     public final String value;
     public NamespaceID(String namespace, String value){
@@ -35,4 +37,9 @@ public final class NamespaceID implements Comparator<NamespaceID> {
     public int compare(NamespaceID o1, NamespaceID o2) {
         return o1.toString().compareTo(o2.toString());
     }
+
+    @Override
+    public int compareTo(@NotNull NamespaceID o) {
+        return toString().compareTo(o.toString());
+    }
 }
