-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switched Recipe RECIPE_TYPE to use Recipe instead of IRecipe as the type
also made AntimatterRecipeSerializer abstract and moved the instance to MacineRecipeSerializer
- Loading branch information
Showing
9 changed files
with
58 additions
and
38 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
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
common/src/main/java/muramasa/antimatter/recipe/serializer/MachineRecipeSerializer.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 muramasa.antimatter.recipe.serializer; | ||
|
||
import earth.terrarium.botarium.common.fluid.base.FluidHolder; | ||
import muramasa.antimatter.Ref; | ||
import muramasa.antimatter.recipe.Recipe; | ||
import muramasa.antimatter.recipe.ingredient.FluidIngredient; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.item.crafting.Ingredient; | ||
import net.minecraft.world.item.crafting.RecipeType; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.List; | ||
|
||
public class MachineRecipeSerializer extends AntimatterRecipeSerializer<Recipe>{ | ||
public static final MachineRecipeSerializer INSTANCE = new MachineRecipeSerializer(); | ||
|
||
protected MachineRecipeSerializer() { | ||
super(Ref.ID, "machine"); | ||
} | ||
|
||
public static void init() { | ||
} | ||
|
||
@Override | ||
public RecipeType<Recipe> getRecipeType() { | ||
return Recipe.RECIPE_TYPE; | ||
} | ||
|
||
public Recipe createRecipe(@NotNull List<Ingredient> stacksInput, ItemStack[] stacksOutput, @NotNull List<FluidIngredient> fluidsInput, FluidHolder[] fluidsOutput, int duration, long power, int special, int amps){ | ||
return new Recipe(stacksInput, stacksOutput, fluidsInput, fluidsOutput, duration, power, special, amps); | ||
} | ||
} |