Skip to content

Commit

Permalink
Added IncubusRecipe and IncubusRecipeType
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragonoidzero committed Mar 16, 2021
1 parent bbd0528 commit 4842298
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.11.2

# Mod Properties
mod_version = 1.1.2
mod_version = 1.2.0
maven_group = azzy.fabric
archives_base_name = incubus-core

Expand Down
28 changes: 28 additions & 0 deletions src/main/java/azzy/fabric/incubus_core/recipe/IncubusRecipe.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package azzy.fabric.incubus_core.recipe;

import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.Recipe;

import java.util.Collections;
import java.util.List;

@SuppressWarnings("unused")
public interface IncubusRecipe<C extends Inventory> extends Recipe<C> {

boolean isEmpty();

@Override
IncubusRecipeType<?> getType();

List<IngredientStack> getInputs();

@Override
default String getGroup() {
return "incubus_core:undefined";
}

default List<ItemStack> getOutputs() {
return Collections.singletonList(getOutput());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package azzy.fabric.incubus_core.recipe;

import net.minecraft.recipe.Recipe;
import net.minecraft.recipe.RecipeType;
import net.minecraft.util.Identifier;

@SuppressWarnings("unused")
public class IncubusRecipeType<T extends Recipe<?>> implements RecipeType<T> {

private final Identifier id;

public IncubusRecipeType(Identifier id) {
this.id = id;
}

@Override
public String toString() {
return id.toString();
}

public Identifier getId() {
return id;
}
}

0 comments on commit 4842298

Please sign in to comment.