Package com.mojang.ld22.crafting

Source Code of com.mojang.ld22.crafting.ToolRecipe

package com.mojang.ld22.crafting;

import com.mojang.ld22.entity.Player;
import com.mojang.ld22.item.ToolItem;
import com.mojang.ld22.item.ToolType;

public class ToolRecipe extends Recipe {
  private ToolType type;
  private int level;

  public ToolRecipe(ToolType type, int level) {
    super(new ToolItem(type, level));
    this.type = type;
    this.level = level;
  }

  public void craft(Player player) {
    player.inventory.add(0, new ToolItem(type, level));
  }
}
TOP

Related Classes of com.mojang.ld22.crafting.ToolRecipe

TOP
Copyright © 2018 www.massapi.com. 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.