Package net.minecraft.src

Examples of net.minecraft.src.ResourceLocation


    ArrayList done = new ArrayList();
    Iterator i$ = pending.entrySet().iterator();

    while (i$.hasNext()) {
      Entry name = (Entry)i$.next();
      ResourceLocation name1 = (ResourceLocation)name.getKey();
      Properties properties = (Properties)name.getValue();
      ResourceLocation textureName = TexturePackAPI.parseResourceLocation(name1, MCPatcherUtils.getStringProperty(properties, "to", ""));

      if (TexturePackAPI.isTextureLoaded(textureName)) {
        addStrip(name1, properties);
        done.add(name1);
      }
    }

    if (!done.isEmpty()) {
      i$ = done.iterator();

      while (i$.hasNext()) {
        ResourceLocation name2 = (ResourceLocation)i$.next();
        pending.remove(name2);
      }

      Collections.sort(animations);
    }
View Full Code Here


      Collections.sort(animations);
    }
  }

  private static void addStrip(ResourceLocation propertiesName, Properties properties) {
    ResourceLocation dstName = TexturePackAPI.parseResourceLocation(propertiesName, properties.getProperty("to", ""));

    if (dstName == null) {
      logger.error("%s: missing to= property", new Object[0]);
    } else {
      ResourceLocation srcName = TexturePackAPI.parseResourceLocation(propertiesName, properties.getProperty("from", ""));

      if (srcName == null) {
        logger.error("%s: missing from= property", new Object[0]);
      } else {
        BufferedImage srcImage = TexturePackAPI.getImage(srcName);
View Full Code Here

      } else {
        yOffset = 4;
      }
    }
    if (isShowPing()) {
      Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("textures/gui/icons.png"));     
      RenderUtil.drawTexturedModalRectangle(x + width - 2 - 10, y + 2, 0 + xOffset * 10, 176 + yOffset * 8, 10, 8, 0f);
    }
    if (port != DEFAULT_PORT) {
      font.drawStringWithShadow(ip + ":" +port, x+marginleft, y+20, 0xaaaaaa);
    } else {
View Full Code Here

  static void init() {}

  public static ResourceLocation randomTexture(EntityLivingBase entity, ResourceLocation texture) {
    if (texture != null && texture.getResourcePath().endsWith(".png")) {
      String key = texture.toString() + ":" + entity.entityId;
      ResourceLocation newTexture = (ResourceLocation)cache.get(key);

      if (newTexture == null) {
        MobRandomizer$ExtraInfo info = MobRandomizer$ExtraInfo.getInfo(entity);
        MobRuleList list = MobRuleList.get(texture);
        newTexture = list.getSkin(MobRandomizer$ExtraInfo.access$100(info), MobRandomizer$ExtraInfo.access$200(info), MobRandomizer$ExtraInfo.access$300(info), MobRandomizer$ExtraInfo.access$400(info), MobRandomizer$ExtraInfo.access$500(info));
View Full Code Here

  static Method getBiomeIDAt;

  private MobRuleList(ResourceLocation baseSkin) {
    this.baseSkin = baseSkin;
    String newPath = baseSkin.getResourcePath().replaceFirst("^textures/entity/", "mcpatcher/mob/");
    ResourceLocation newSkin = new ResourceLocation(baseSkin.getResourceDomain(), newPath);
    this.allSkins = new ArrayList();
    this.allSkins.add(baseSkin);
    int filename = 2;

    while (true) {
      ResourceLocation altFilename = TexturePackAPI.transformResourceLocation(newSkin, ".png", filename + ".png");

      if (!TexturePackAPI.hasResource(altFilename)) {
        this.skinCount = this.allSkins.size();

        if (this.skinCount <= 1) {
          this.entries = null;
          return;
        } else {
          logger.fine("found %d variations for %s", new Object[] {Integer.valueOf(this.skinCount), baseSkin});
          ResourceLocation var10 = TexturePackAPI.transformResourceLocation(newSkin, ".png", ".properties");
          altFilename = new ResourceLocation(newSkin.getResourceDomain(), var10.getResourcePath().replaceFirst("_(eyes|overlay|tame|angry|collar|fur|invulnerable|shooting)\\.properties$", ".properties"));
          Properties properties = TexturePackAPI.getProperties(var10);

          if (properties == null && !var10.equals(altFilename)) {
            properties = TexturePackAPI.getProperties(altFilename);

            if (properties != null) {
              logger.fine("using %s for %s", new Object[] {altFilename, baseSkin});
            }
View Full Code Here

    }

    if (fontRenderer.hdFont == null) {
      String newFont = fontRenderer.defaultFont.getResourceDomain();
      String name = fontRenderer.defaultFont.getResourcePath().replaceAll(".*/", "");
      fontRenderer.hdFont = new ResourceLocation(newFont, "mcpatcher/font/" + name);
    }

    ResourceLocation newFont1;

    if (enable && TexturePackAPI.hasResource(fontRenderer.hdFont)) {
      logger.fine("using %s instead of %s", new Object[] {fontRenderer.hdFont, fontRenderer.defaultFont});
      fontRenderer.isHD = true;
      newFont1 = fontRenderer.hdFont;
View Full Code Here

    return totalWidth;
  }

  public static ResourceLocation getUnicodePage(ResourceLocation resource) {
    if (enable && resource != null) {
      ResourceLocation newResource = new ResourceLocation(resource.getResourceDomain(), resource.getResourcePath().replaceFirst("^textures/", "mcpatcher/"));

      if (TexturePackAPI.hasResource(newResource)) {
        logger.fine("using %s instead of %s", new Object[] {newResource, resource});
        return newResource;
      }
View Full Code Here

      }
    }
  }

  private static void getCharWidthOverrides(ResourceLocation font, float[] charWidthf, boolean[] isOverride) {
    ResourceLocation textFile = TexturePackAPI.transformResourceLocation(font, ".png", ".properties");
    Properties props = TexturePackAPI.getProperties(textFile);

    if (props != null) {
      logger.fine("reading character widths from %s", new Object[] {textFile});
      Iterator i$ = props.entrySet().iterator();
View Full Code Here

    }
  }

  public static BufferedImage addBorder(TextureAtlasSprite stitched, Resource resource, BufferedImage input) {
    if (input != null && resource instanceof SimpleResource && addressField != null) {
      ResourceLocation name;

      try {
        name = (ResourceLocation)addressField.get(resource);
      } catch (IllegalAccessException var14) {
        var14.printStackTrace();
View Full Code Here

        if (!enableClock) {
          return;
        }
      }

      ResourceLocation resource = TexturePackAPI.newMCPatcherResourceLocation("dial/" + name + ".properties");

      if (TexturePackAPI.hasResource(resource)) {
        logger.fine("found custom %s (%s)", new Object[] {name, resource});
        setupInfo.put(icon, resource);
      }
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.