Package net.minecraft.src

Examples of net.minecraft.src.ResourceLocation


      int worldType = world.provider.dimensionId;

      if (lightmaps.containsKey(Integer.valueOf(worldType))) {
        lightmap = (Lightmap)lightmaps.get(Integer.valueOf(worldType));
      } else {
        ResourceLocation resource = TexturePackAPI.newMCPatcherResourceLocation(String.format("lightmap/world%d.png", new Object[] {Integer.valueOf(worldType)}));
        BufferedImage image = TexturePackAPI.getImage(resource);

        if (image != null) {
          lightmap = new Lightmap(resource, image);
View Full Code Here


  private void loadSkies() {
    int i = -1;

    while (true) {
      String path = "sky/world" + this.worldType + "/sky" + (i < 0 ? "" : String.valueOf(i)) + ".properties";
      ResourceLocation resource = TexturePackAPI.newMCPatcherResourceLocation(path);
      SkyRenderer$Layer layer = SkyRenderer$Layer.create(resource);

      if (layer == null) {
        if (i > 0) {
          return;
View Full Code Here

      ++i;
    }
  }

  private void loadCelestialObject(String objName) {
    ResourceLocation textureName = new ResourceLocation("textures/environment/" + objName + ".png");
    ResourceLocation resource = TexturePackAPI.newMCPatcherResourceLocation("sky/world0/" + objName + ".properties");
    Properties properties = TexturePackAPI.getProperties(resource);

    if (properties != null) {
      properties.setProperty("fade", "false");
      properties.setProperty("rotate", "true");
View Full Code Here

    texturesToUnload1.addAll(this.textures);
    texturesToUnload1.removeAll(texturesNeeded);
    Iterator i$1 = texturesToUnload1.iterator();

    while (i$1.hasNext()) {
      ResourceLocation layer = (ResourceLocation)i$1.next();
      TexturePackAPI.unloadTexture(layer);
    }

    i$1 = this.skies.iterator();
View Full Code Here

        RenderBlocks blockRenderer = new RenderBlocks(chunkCache);

        Minecraft game = SpoutClient.getHandle();
        int currentTexture = 0;
        int limit = skipRenderPass.length; // MCPatcher 2.4.4 requires 4, anything less and things get missed.
        int defaultTexture = Minecraft.getMinecraft().renderEngine.getTextureId(new ResourceLocation("textures/atlas/blocks.png"));       
        TextureUtil.bindTexture(defaultTexture);

        List<String> hitTextures = new ArrayList<String>();
        List<String> hitTexturesPlugins = new ArrayList<String>();
        hitTextures.add("/terrain.png");
View Full Code Here

  public static void initializeMipMaps() {
    initialized = false;
    GL11.glPushMatrix();
    if (Configuration.getMipmapsPercent() > 0F) {
      // ToDO: this doesn't work.
      int terrain = Minecraft.getMinecraft().renderEngine.getTextureId(new ResourceLocation("textures/atlas/blocks.png"));
      initalizeTexture(terrain);

      for (CustomBlock block : MaterialData.getCustomBlocks()) {
        if (block.getBlockDesign() != null) {
          String texture = block.getBlockDesign().getTextureURL();
View Full Code Here

  public static void update() {
    if (!initialized && Configuration.getMipmapsPercent() > 0F) {
      initializeMipMaps();
    }
    MipMapUtils.targetFade = Configuration.getMipmapsPercent();
    int terrain = Minecraft.getMinecraft().renderEngine.getTextureId(new ResourceLocation("textures/atlas/blocks.png"));
    update(terrain);

    for (CustomBlock block : MaterialData.getCustomBlocks()) {
      if (block.getBlockDesign() != null) {
        String texture = block.getBlockDesign().getTextureURL();
View Full Code Here

    GL11.glPopMatrix();
  }

  public static void onTick() {
    if (updateTerrain) {     
      int terrain = Minecraft.getMinecraft().renderEngine.getTextureId(new ResourceLocation("textures/atlas/blocks.png"));
      onTick(terrain, targetFade, currentFade);

      if (targetFade != currentFade) {
        for (CustomBlock block : MaterialData.getCustomBlocks()) {
          if (block.getBlockDesign() != null) {
View Full Code Here

        "Your Minecraft community in a new dimension!", x, y);
    }

    GL11.glDisable(2896 /*GL_LIGHTING*/);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("gui/gui.png"));   
    RenderUtil.drawTexturedModalRectangle(this.width - 14, getInvertedScaledHeight(this.height), 0, 208, 16, 16, 0f);
    GL11.glDisable(2912 /*GL_FOG*/);
    GL11.glDisable(2929 /*GL_DEPTH_TEST*/);
    this.overlayBackground(0, 30, 255, 255);
    this.overlayBackground(this.height - 50, this.height, 255, 255);
    drawCenteredString(this.fontRenderer, "About", this.width / 2, 16, 0xffffff);
    Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("textures/gui/title/mojang.png"));   
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glPushMatrix();
    GL11.glTranslatef((0.0325f * this.width), (this.height - 40), 0);
    GL11.glScalef(0.4f, 0.4f, 0.4f);
    this.drawTexturedModalRect(0, 0, 0, 0, 155, 44);
View Full Code Here

    if (tileList.equals("")) {
      int range = 0;

      while (true) {
        ResourceLocation arr$ = TileLoader.parseTileAddress(this.propertiesFile, String.valueOf(range));

        if (!TexturePackAPI.hasResource(arr$) || !this.addIcon(arr$)) {
          break;
        }

        ++range;
      }
    } else {
      Pattern var14 = Pattern.compile("(\\d+)-(\\d+)");
      String[] var15 = tileList.split("\\s+");
      int len$ = var15.length;

      for (int i$ = 0; i$ < len$; ++i$) {
        String token = var15[i$];
        Matcher matcher = var14.matcher(token);

        if (!token.equals("")) {
          if (matcher.matches()) {
            try {
              int resource = Integer.parseInt(matcher.group(1));
              int to = Integer.parseInt(matcher.group(2));

              for (int i = resource; i <= to; ++i) {
                ResourceLocation resource1 = TileLoader.parseTileAddress(this.propertiesFile, String.valueOf(i));

                if (TexturePackAPI.hasResource(resource1)) {
                  this.addIcon(resource1);
                } else {
                  this.warn("could not find image %s", new Object[] {resource1});
                  // ToDO:
                  //this.tileNames.add((Object)null);
                }
              }
            } catch (NumberFormatException var13) {
              var13.printStackTrace();
            }
          } else {
            ResourceLocation var16 = TileLoader.parseTileAddress(this.propertiesFile, token);

            if (var16 == null) {
              // ToDo:
              this.tileNames.add((ResourceLocation)null);
            } else if (TexturePackAPI.hasResource(var16)) {
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.