Also fire cast-events for CastingBasin. Add separate events for CastingBasin and CastingTable.

This commit is contained in:
Bernhard Bonigl committed 2014-08-06 15:57:06 +02:00
1 parent 3cab9c0063
commit 0821f9f77f
5 files changed
+45 -6

No files matched your search

@@ -9,7 +9,7 @@ import tconstruct.library.crafting.CastingRecipe;
*
* Set result to DENY to prevent casting.
*/
public class SmelteryCastEvent extends Event {
public abstract class SmelteryCastEvent extends Event {
public final CastingRecipe recipe;
public final FluidStack fluid;
@@ -17,4 +17,16 @@ public class SmelteryCastEvent extends Event {
this.recipe = recipe;
this.fluid = fluid;
}
public static class CastingTable extends SmelteryCastEvent {
public CastingTable(CastingRecipe recipe, FluidStack fluid) {
super(recipe, fluid);
}
}
public static class CastingBasin extends SmelteryCastEvent {
public CastingBasin(CastingRecipe recipe, FluidStack fluid) {
super(recipe, fluid);
}
}
}
@@ -8,7 +8,7 @@ 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 abstract class SmelteryCastedEvent extends Event {
public final CastingRecipe recipe;
public ItemStack output;
public boolean consumeCast;
@@ -20,4 +20,15 @@ public class SmelteryCastedEvent extends Event {
}
public static class CastingTable extends SmelteryCastedEvent {
public CastingTable(CastingRecipe recipe, ItemStack output) {
super(recipe, output);
}
}
public static class CastingBasin extends SmelteryCastedEvent {
public CastingBasin(CastingRecipe recipe, ItemStack output) {
super(recipe, output);
}
}
}