Move API to it's own source set
This commit is contained in:
parent
c03af41c88
commit
2afc235af7
11 changed files with 32 additions and 27 deletions
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.bloodmagic.api.event;
|
||||
|
||||
import WayofTime.bloodmagic.api.impl.recipe.RecipeBloodAltar;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
public class BloodMagicCraftedEvent extends Event {
|
||||
|
@ -34,16 +34,16 @@ public class BloodMagicCraftedEvent extends Event {
|
|||
*/
|
||||
public static class Altar extends BloodMagicCraftedEvent {
|
||||
|
||||
private final RecipeBloodAltar recipe;
|
||||
private final Ingredient input;
|
||||
|
||||
public Altar(RecipeBloodAltar recipe, ItemStack output) {
|
||||
public Altar(Ingredient input, ItemStack output) {
|
||||
super(output, true);
|
||||
|
||||
this.recipe = recipe;
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
public RecipeBloodAltar getRecipe() {
|
||||
return recipe;
|
||||
public Ingredient getInput() {
|
||||
return input;
|
||||
}
|
||||
}
|
||||
}
|
4
src/api/java/WayofTime/bloodmagic/api/package-info.java
Normal file
4
src/api/java/WayofTime/bloodmagic/api/package-info.java
Normal file
|
@ -0,0 +1,4 @@
|
|||
@API(owner = "bloodmagic", provides = "bloodmagic-api", apiVersion = "2.0.0")
|
||||
package WayofTime.bloodmagic.api;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
|
@ -314,7 +314,7 @@ public class BloodAltar implements IFluidHandler {
|
|||
if (progress >= liquidRequired * stackSize) {
|
||||
ItemStack result = recipe.getOutput().copy();
|
||||
|
||||
BloodMagicCraftedEvent.Altar event = new BloodMagicCraftedEvent.Altar(recipe, result);
|
||||
BloodMagicCraftedEvent.Altar event = new BloodMagicCraftedEvent.Altar(recipe.getInput(), result);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
tileAltar.setInventorySlotContents(0, event.getOutput());
|
||||
progress = 0;
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
@API(owner = BloodMagic.MODID, provides = BloodMagic.MODID + "|api", apiVersion = "2.0.0")
|
||||
package WayofTime.bloodmagic.api;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import net.minecraftforge.fml.common.API;
|
Loading…
Add table
Add a link
Reference in a new issue