RecipeChosenEvent.java 629 B

12345678910111213141516171819202122232425262728
  1. package me.kcm.events;
  2. import net.minecraft.entity.player.EntityPlayer;
  3. import net.minecraft.item.crafting.IRecipe;
  4. import net.minecraftforge.event.entity.player.PlayerEvent;
  5. import net.minecraftforge.fml.common.eventhandler.Cancelable;
  6. @Cancelable
  7. public class RecipeChosenEvent extends PlayerEvent
  8. {
  9. private IRecipe recipe;
  10. public RecipeChosenEvent(EntityPlayer player, IRecipe recipe)
  11. {
  12. super(player);
  13. this.recipe = recipe;
  14. }
  15. public void setRecipe(IRecipe recipe)
  16. {
  17. this.recipe = recipe;
  18. }
  19. public IRecipe getRecipe()
  20. {
  21. return recipe;
  22. }
  23. }