Compiling version (some features are currently disabled and need a rewrite)
This commit is contained in:
parent
b1f4173ce4
commit
f8bcba4d3a
48 changed files with 488 additions and 506 deletions
|
@ -4,6 +4,7 @@ import net.minecraft.resources.ResourceLocation;
|
|||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.Container;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.crafting.CookingBookCategory;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
|
@ -11,6 +12,7 @@ import net.minecraft.world.level.ItemLike;
|
|||
public abstract class CookingRecipe<T extends AbstractSimpleRecipe, C extends Container, R extends Recipe<C>> extends AbstractSimpleRecipe<T, C, R> {
|
||||
protected float experience;
|
||||
protected int cookingTime;
|
||||
protected CookingBookCategory bookCategory;
|
||||
|
||||
CookingRecipe(ResourceLocation id, RecipeType<R> type, ItemLike output) {
|
||||
this(id, type, type.toString(), output);
|
||||
|
@ -20,6 +22,7 @@ public abstract class CookingRecipe<T extends AbstractSimpleRecipe, C extends Co
|
|||
super(id, type, category, output);
|
||||
cookingTime = 1000;
|
||||
experience = 0;
|
||||
this.bookCategory = CookingBookCategory.MISC;
|
||||
}
|
||||
|
||||
public T setInput(ItemLike in) {
|
||||
|
@ -39,4 +42,9 @@ public abstract class CookingRecipe<T extends AbstractSimpleRecipe, C extends Co
|
|||
cookingTime = time;
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
public T setCookingBookCategory(CookingBookCategory c) {
|
||||
bookCategory = c;
|
||||
return (T) this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue