-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #822 from bonii-xx/master
Add Casting events for CastingTable and CastingBasin, lots of bugfixes, remove console spam for invalid tools
- Loading branch information
Showing
14 changed files
with
115 additions
and
70 deletions.
There are no files selected for viewing
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
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
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
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
32 changes: 32 additions & 0 deletions
32
src/main/java/tconstruct/library/event/SmelteryCastEvent.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,32 @@ | ||
package tconstruct.library.event; | ||
|
||
import cpw.mods.fml.common.eventhandler.Event; | ||
import net.minecraftforge.fluids.FluidStack; | ||
import tconstruct.library.crafting.CastingRecipe; | ||
|
||
/** | ||
* Fires when somebody tries to pour a liquid into a metal cast. | ||
* | ||
* Set result to DENY to prevent casting. | ||
*/ | ||
public abstract class SmelteryCastEvent extends Event { | ||
public final CastingRecipe recipe; | ||
public final FluidStack fluid; | ||
|
||
public SmelteryCastEvent(CastingRecipe recipe, FluidStack fluid) { | ||
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); | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
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,34 @@ | ||
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 abstract 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; | ||
} | ||
|
||
|
||
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); | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
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