Move API to it's own source set

This commit is contained in:
Nicholas Ignoffo 2018-02-14 23:37:23 -08:00
parent c03af41c88
commit 2afc235af7
11 changed files with 32 additions and 27 deletions

View file

@ -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;
}
}
}

View 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;

View file

@ -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;

View file

@ -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;