Package com.prupe.mcpatcher.sky

Examples of com.prupe.mcpatcher.sky.SkyRenderer$1


    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


    Properties properties = TexturePackAPI.getProperties(resource);

    if (properties != null) {
      properties.setProperty("fade", "false");
      properties.setProperty("rotate", "true");
      SkyRenderer$Layer layer = new SkyRenderer$Layer(resource, properties);

      if (layer.valid) {
        SkyRenderer.access$400().fine("using %s (%s) for the %s", new Object[] {resource, SkyRenderer$Layer.access$300(layer), objName});
        this.objects.put(textureName, layer);
      }
View Full Code Here

  void renderAll(Tessellator tessellator) {
    HashSet texturesNeeded = new HashSet();
    Iterator texturesToUnload = this.skies.iterator();

    while (texturesToUnload.hasNext()) {
      SkyRenderer$Layer i$ = (SkyRenderer$Layer)texturesToUnload.next();

      if (i$.prepare()) {
        texturesNeeded.add(SkyRenderer$Layer.access$300(i$));
      }
    }

    HashSet texturesToUnload1 = new HashSet();
    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();

    while (i$1.hasNext()) {
      SkyRenderer$Layer layer1 = (SkyRenderer$Layer)i$1.next();

      if (layer1.brightness > 0.0F) {
        layer1.render(tessellator);
        SkyRenderer$Layer.clearBlendingMethod();
      }
    }
  }
View Full Code Here

  void unloadTextures() {
    Iterator i$ = this.skies.iterator();

    while (i$.hasNext()) {
      SkyRenderer$Layer layer = (SkyRenderer$Layer)i$.next();
      TexturePackAPI.unloadTexture(SkyRenderer$Layer.access$300(layer));
    }
  }
View Full Code Here

  }

  public static ResourceLocation setupCelestialObject(ResourceLocation defaultTexture) {
    if (active) {
      SkyRenderer$Layer.clearBlendingMethod();
      SkyRenderer$Layer layer = currentWorld.getCelestialObject(defaultTexture);

      if (layer != null) {
        layer.setBlendingMethod(rainStrength);
        return SkyRenderer$Layer.access$300(layer);
      }
    }

    return defaultTexture;
View Full Code Here

  public static void setup(World world, float partialTick, float celestialAngle) {
    if (TexturePackAPI.isDefaultTexturePack()) {
      active = false;
    } else {
      int worldType = Minecraft.getMinecraft().theWorld.provider.dimensionId;
      SkyRenderer$WorldEntry newEntry = getWorldEntry(worldType);

      if (newEntry != currentWorld && currentWorld != null) {
        currentWorld.unloadTextures();
      }
View Full Code Here

    return defaultTexture;
  }

  private static SkyRenderer$WorldEntry getWorldEntry(int worldType) {
    SkyRenderer$WorldEntry entry = (SkyRenderer$WorldEntry)worldSkies.get(Integer.valueOf(worldType));

    if (entry == null) {
      entry = new SkyRenderer$WorldEntry(worldType);
      worldSkies.put(Integer.valueOf(worldType), entry);
    }

    return entry;
  }
View Full Code Here

TOP

Related Classes of com.prupe.mcpatcher.sky.SkyRenderer$1

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.