Package com.mojang.ld22.item

Examples of com.mojang.ld22.item.Item


  public void tick() {
    super.tick();

    if (invulnerableTime > 0) invulnerableTime--;
    Tile onTile = level.getTile(x >> 4, y >> 4);
    if (onTile == Tile.stairsDown || onTile == Tile.stairsUp) {
      if (onStairDelay == 0) {
        changeLevel((onTile == Tile.stairsUp) ? 1 : -1);
        onStairDelay = 10;
        return;
View Full Code Here


    }
    return super.move(xa, ya);
  }

  protected boolean isSwimming() {
    Tile tile = level.getTile(x >> 4, y >> 4);
    return tile == Tile.water || tile == Tile.lava;
  }
View Full Code Here

    col = Color.get(-1, 110, 331, 552);
    sprite = 1;
  }

  public boolean use(Player player, int attackDir) {
    player.game.setMenu(new ContainerMenu(player, "Chest", inventory));
    return true;
  }
View Full Code Here

    xr = 3;
    yr = 2;
  }

  public boolean use(Player player, int attackDir) {
    player.game.setMenu(new CraftingMenu(Crafting.anvilRecipes, player));
    return true;
  }
View Full Code Here

    xr = 3;
    yr = 2;
  }

  public boolean use(Player player, int attackDir) {
    player.game.setMenu(new CraftingMenu(Crafting.workbenchRecipes, player));
    return true;
  }
View Full Code Here

    xr = 3;
    yr = 2;
  }

  public boolean use(Player player, int attackDir) {
    player.game.setMenu(new CraftingMenu(Crafting.ovenRecipes, player));
    return true;
  }
View Full Code Here

    xr = 3;
    yr = 2;
  }

  public boolean use(Player player, int attackDir) {
    player.game.setMenu(new CraftingMenu(Crafting.furnaceRecipes, player));
    return true;
  }
View Full Code Here

        menu.tick();
      } else {
        if (player.removed) {
          playerDeadTime++;
          if (playerDeadTime > 60) {
            setMenu(new DeadMenu());
          }
        } else {
          if (pendingLevelChange != 0) {
            setMenu(new LevelTransitionMenu(pendingLevelChange));
            pendingLevelChange = 0;
View Full Code Here

        attack();
      }
    }
    if (input.menu.clicked) {
      if (!use()) {
        game.setMenu(new InventoryMenu(this));
      }
    }
    if (attackTime > 0) attackTime--;

  }
View Full Code Here

          if (playerDeadTime > 60) {
            setMenu(new DeadMenu());
          }
        } else {
          if (pendingLevelChange != 0) {
            setMenu(new LevelTransitionMenu(pendingLevelChange));
            pendingLevelChange = 0;
          }
        }
        if (wonTimer > 0) {
          if (--wonTimer == 0) {
View Full Code Here

TOP

Related Classes of com.mojang.ld22.item.Item

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.