Package com.prupe.mcpatcher.sky

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


      boolean var7 = false;
      int glError = 0;

      while (true) {
        FancyDial$Layer layer = this.newLayer(resource, properties, "." + glError);

        if (layer == null) {
          if (glError > 0) {
            this.keyboard = new InputHandler(this.name, var7);
View Full Code Here


    GL11.glPushMatrix();
    GL11.glLoadIdentity();
    Iterator i$ = this.layers.iterator();

    while (i$.hasNext()) {
      FancyDial$Layer layer = (FancyDial$Layer)i$.next();
      layer.blendMethod.applyBlending();
      GL11.glPushMatrix();
      TexturePackAPI.bindTexture(layer.textureName);
      float offsetX = layer.offsetX;
      float offsetY = layer.offsetY;
View Full Code Here

        if (blendMethod == null) {
          logger.error("%s: unknown blend method %s", new Object[] {resource, blend});
          return null;
        } else {
          boolean debug = MCPatcherUtils.getBooleanProperty(properties, "debug" + suffix, false);
          return new FancyDial$Layer(this, textureResource, scaleX, scaleY, offsetX, offsetY, angleMultiplier, angleOffset, blendMethod, debug);
        }
      }
    }
  }
View Full Code Here

    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$Layer

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.