Add AltarCraftedEvent
Called after an altar has crafted an item. Not cancellable, however the output itemstack may be modified.
This commit is contained in:
parent
45710ebb8f
commit
7af53ce85b
2 changed files with 36 additions and 0 deletions
|
@ -0,0 +1,31 @@
|
|||
package WayofTime.bloodmagic.api.event;
|
||||
|
||||
import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* Fired whenever a craft is completed in a BloodAltar.
|
||||
*
|
||||
* It is not cancelable, however you can modify the output stack.
|
||||
*/
|
||||
@Getter
|
||||
public class AltarCraftedEvent extends Event
|
||||
{
|
||||
|
||||
private final AltarRecipeRegistry.AltarRecipe altarRecipe;
|
||||
private final ItemStack output;
|
||||
|
||||
/**
|
||||
* @param altarRecipe
|
||||
* - The recipe that was crafted.
|
||||
* @param output
|
||||
* - The item obtained from the recipe
|
||||
*/
|
||||
public AltarCraftedEvent(AltarRecipeRegistry.AltarRecipe altarRecipe, ItemStack output)
|
||||
{
|
||||
this.altarRecipe = altarRecipe;
|
||||
this.output = output;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue