Package net.minecraft.src

Examples of net.minecraft.src.ResourceLocation


        if (token.contains("/")) {
          if (!token.endsWith(".png")) {
            token = token + ".png";
          }

          ResourceLocation resource = TexturePackAPI.parseResourceLocation(this.propertiesFile, token);

          if (resource != null) {
            list.add(resource.toString());
          }
        } else {
          list.add(token);
        }
      }
View Full Code Here


    if (CTMUtils.access$600() || CTMUtils.access$700()) {
      Iterator i$ = TexturePackAPI.listResources("mcpatcher/ctm", ".properties", true, false, true).iterator();

      while (i$.hasNext()) {
        ResourceLocation resource = (ResourceLocation)i$.next();
        CTMUtils.access$800(TileOverride.create(resource, CTMUtils.access$300()));
      }
    }
  }
View Full Code Here

  public static boolean getProperties(ResourceLocation resource, Properties properties) {
    return resource != null && instance.getPropertiesImpl(resource, properties);
  }

  public static ResourceLocation transformResourceLocation(ResourceLocation resource, String oldExt, String newExt) {
    return new ResourceLocation(resource.getResourceDomain(), resource.getResourcePath().replaceFirst(Pattern.quote(oldExt) + "$", newExt));
  }
View Full Code Here

        path = path.substring(17);
        absolute = true;
      }

      int colon = path.indexOf(58);
      return colon >= 0 ? new ResourceLocation(path.substring(0, colon), path.substring(colon + 1)) : (path.startsWith("~/") ? new ResourceLocation(baseResource.getResourceDomain(), "mcpatcher/" + path.substring(2)) : (path.startsWith("./") ? new ResourceLocation(baseResource.getResourceDomain(), baseResource.getResourcePath().replaceFirst("[^/]+$", "") + path.substring(2)) : (!absolute && !path.contains("/") ? new ResourceLocation(baseResource.getResourceDomain(), baseResource.getResourcePath().replaceFirst("[^/]+$", "") + path) : new ResourceLocation(baseResource.getResourceDomain(), path))));
    } else {
      return null;
    }
  }
View Full Code Here

      return null;
    }
  }

  public static ResourceLocation newMCPatcherResourceLocation(String path) {
    return new ResourceLocation("mcpatcher/" + path);
  }
View Full Code Here

        String name = entry.getName().replaceFirst("^/", "");

        if (name.startsWith(base) && name.endsWith(suffix)) {
          if (directory.equals("")) {
            if (recursive || !name.contains("/")) {
              resources.add(new ResourceLocation(namespace, name));
            }
          } else {
            String subpath = name.substring(base.length());

            if ((subpath.equals("") || subpath.startsWith("/")) && (recursive || subpath.equals("") || !subpath.substring(1).contains("/"))) {
              resources.add(new ResourceLocation(namespace, name.substring(root.length() + 1)));
            }
          }
        }
      }
    }
View Full Code Here

        File entry = new File(subdirectory, s);
        String resourceName = pathComponent + s;

        if (entry.isDirectory()) {
          if (directories && s.endsWith(suffix)) {
            resources.add(new ResourceLocation(namespace, resourceName));
          }

          if (recursive) {
            findResources(base, namespace, pathComponent + s, suffix, recursive, directories, resources);
          }
        } else if (s.endsWith(suffix) && !directories) {
          resources.add(new ResourceLocation(namespace, resourceName));
        }
      }
    }
  }
View Full Code Here

  }

  public static void addAccessory(String player, Accessory n, String url) {
    TextureManager tm= Minecraft.getMinecraft().getTextureManager();
    Object texture = new ThreadDownloadImageData(url, (ResourceLocation)null, new HDImageBufferDownload());   
    tm.loadTexture(new ResourceLocation("accessories/" + n.getType().toString()), (TextureObject)texture);
   
    Set<Pair<Accessory, String>> acs = sacs.get(player);
    if (acs == null) {
      acs = new HashSet<Pair<Accessory, String>>();
    }
View Full Code Here

    Set<Pair<Accessory, String>> acs = sacs.get(player.username);
    if (acs == null) {
      return;
    }
    for (Pair<Accessory, String> a : acs) {
      RenderManager.instance.renderEngine.bindTexture(new ResourceLocation("accessories/" + a.getLeft().getType().toString()));
      a.getLeft().render(player, f, par2);
    }
  }
View Full Code Here

    return false;
  }

  private boolean registerOneIcon(TextureMap textureMap, String mapName, Map<String, TextureAtlasSprite> map) {
    ResourceLocation resource = (ResourceLocation)this.tilesToRegister.iterator().next();
    String name = resource.toString();

    if (this.registerDefaultIcon(name)) {
      this.tilesToRegister.remove(resource);
      return true;
    } else {
View Full Code Here

TOP

Related Classes of net.minecraft.src.ResourceLocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.