public Resource func_110536_a(ResourceLocation p_110536_1_) throws IOException { ResourcePack var2 = null; ResourceLocation var3 = func_110537_b(p_110536_1_); for(int var4 = this.field_110540_a.size() - 1; var4 >= 0; --var4) { ResourcePack var5 = (ResourcePack)this.field_110540_a.get(var4); if(var2 == null && var5.func_110589_b(var3)) { var2 = var5; } if(var5.func_110589_b(p_110536_1_)) { InputStream var6 = null; if(var2 != null) { var6 = var2.func_110590_a(var3); } return new SimpleResource(p_110536_1_, var5.func_110590_a(p_110536_1_), var6, this.field_110539_b); } } throw new FileNotFoundException(p_110536_1_.toString()); }
public List func_135056_b(ResourceLocation p_135056_1_) throws IOException { ArrayList var2 = Lists.newArrayList(); ResourceLocation var3 = func_110537_b(p_135056_1_); Iterator var4 = this.field_110540_a.iterator(); while(var4.hasNext()) { ResourcePack var5 = (ResourcePack)var4.next(); if(var5.func_110589_b(p_135056_1_)) { InputStream var6 = var5.func_110589_b(var3)?var5.func_110590_a(var3):null; var2.add(new SimpleResource(p_135056_1_, var5.func_110590_a(p_135056_1_), var6, this.field_110539_b)); } } if(var2.isEmpty()) { throw new FileNotFoundException(p_135056_1_.toString()); } else { return var2; } }
private IResource load(ResourceLocation var1) { for(VirtualResource virtual : virtuals) { if(virtual.getResourceLocation().getResourceDomain().equals(var1.getResourceDomain()) && virtual.getResourceLocation().getResourcePath().equals(var1.getResourcePath())) { System.out.println("fetched virtual " + var1.getResourceDomain() + ":" + var1.getResourcePath()); return virtual.copy(); } } for(String domain : domains) { InputStream in = getInputStream(domain, var1); if(in == null) { try { IResource res = parent.getResource(var1); if(res != null) return res; } catch(IOException e) { ; // File doesn't exist } continue; } return new SimpleResource(domain, var1, in, null, new IMetadataSerializer()); } return null; }
@Override protected IResource getResource(ResourceLocation location) throws IOException { DefaultResourcePack pack = Minecraft.getMinecraft().mcDefaultResourcePack; return new SimpleResource(pack.getPackName(), location, pack.getInputStream(location), null, null); }