Package com.mojang.ld22.crafting

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

package com.mojang.ld22.crafting;

import com.mojang.ld22.entity.Player;
import com.mojang.ld22.gfx.Color;
import com.mojang.ld22.gfx.Font;
import com.mojang.ld22.gfx.Screen;
import com.mojang.ld22.item.ResourceItem;
import com.mojang.ld22.item.resource.Resource;

public class ResourceRecipe extends Recipe {
  private Resource resource;

  public ResourceRecipe(Resource resource) {
    super(new ResourceItem(resource, 1));
    this.resource = resource;
  }

  public void craft(Player player) {
    player.inventory.add(0, new ResourceItem(resource, 1));
  }
}
TOP

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

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.