Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fire a SmelteryCastedEvent when a casting table finished casting an i…
…tem. Allows to change/modify the output and consume the cast.
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/main/java/tconstruct/library/event/SmelteryCastedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package tconstruct.library.event; | ||
|
||
import cpw.mods.fml.common.eventhandler.Event; | ||
import net.minecraft.item.ItemStack; | ||
import tconstruct.library.crafting.CastingRecipe; | ||
|
||
/** | ||
* Fired when an item is cast in the casting table. | ||
* If consumeCast is set to true, the cast will be destroyed. | ||
*/ | ||
public class SmelteryCastedEvent extends Event { | ||
public final CastingRecipe recipe; | ||
public ItemStack output; | ||
public boolean consumeCast; | ||
|
||
public SmelteryCastedEvent(CastingRecipe recipe, ItemStack output) { | ||
this.recipe = recipe; | ||
this.consumeCast = recipe.consumeCast; | ||
this.output = output; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters