mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-24 01:19:24 +00:00
refactor recipes
This commit is contained in:
@@ -21,11 +21,11 @@ public class CustomBlastingRecipe<T> extends CustomCookingRecipe<T> {
|
||||
return RecipeTypes.BLASTING;
|
||||
}
|
||||
|
||||
public static class Factory<A> implements RecipeFactory<CustomBlastingRecipe<A>> {
|
||||
public static class Factory<A> implements RecipeFactory<A> {
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes", "DuplicatedCode"})
|
||||
@Override
|
||||
public Recipe<CustomBlastingRecipe<A>> create(Key id, Map<String, Object> arguments) {
|
||||
public Recipe<A> create(Key id, Map<String, Object> arguments) {
|
||||
CookingRecipeCategory recipeCategory = arguments.containsKey("category") ? CookingRecipeCategory.valueOf(arguments.get("category").toString().toUpperCase(Locale.ENGLISH)) : null;
|
||||
String group = arguments.containsKey("group") ? arguments.get("group").toString() : null;
|
||||
int cookingTime = MiscUtils.getAsInt(arguments.getOrDefault("time", 80));
|
||||
|
||||
@@ -21,11 +21,11 @@ public class CustomCampfireRecipe<T> extends CustomCookingRecipe<T> {
|
||||
return RecipeTypes.CAMPFIRE_COOKING;
|
||||
}
|
||||
|
||||
public static class Factory<A> implements RecipeFactory<CustomCampfireRecipe<A>> {
|
||||
public static class Factory<A> implements RecipeFactory<A> {
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes", "DuplicatedCode"})
|
||||
@Override
|
||||
public Recipe<CustomCampfireRecipe<A>> create(Key id, Map<String, Object> arguments) {
|
||||
public Recipe<A> create(Key id, Map<String, Object> arguments) {
|
||||
CookingRecipeCategory recipeCategory = arguments.containsKey("category") ? CookingRecipeCategory.valueOf(arguments.get("category").toString().toUpperCase(Locale.ENGLISH)) : null;
|
||||
String group = arguments.containsKey("group") ? arguments.get("group").toString() : null;
|
||||
int cookingTime = MiscUtils.getAsInt(arguments.getOrDefault("time", 80));
|
||||
|
||||
@@ -21,11 +21,11 @@ public class CustomSmeltingRecipe<T> extends CustomCookingRecipe<T> {
|
||||
return RecipeTypes.SMELTING;
|
||||
}
|
||||
|
||||
public static class Factory<A> implements RecipeFactory<CustomSmeltingRecipe<A>> {
|
||||
public static class Factory<A> implements RecipeFactory<A> {
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes", "DuplicatedCode"})
|
||||
@Override
|
||||
public Recipe<CustomSmeltingRecipe<A>> create(Key id, Map<String, Object> arguments) {
|
||||
public Recipe<A> create(Key id, Map<String, Object> arguments) {
|
||||
CookingRecipeCategory recipeCategory = arguments.containsKey("category") ? CookingRecipeCategory.valueOf(arguments.get("category").toString().toUpperCase(Locale.ENGLISH)) : null;
|
||||
String group = arguments.containsKey("group") ? arguments.get("group").toString() : null;
|
||||
int cookingTime = MiscUtils.getAsInt(arguments.getOrDefault("time", 80));
|
||||
|
||||
@@ -2,39 +2,69 @@ package net.momirealms.craftengine.core.item.recipe;
|
||||
|
||||
import net.momirealms.craftengine.core.item.ItemBuildContext;
|
||||
import net.momirealms.craftengine.core.item.recipe.input.RecipeInput;
|
||||
import net.momirealms.craftengine.core.item.recipe.input.SmithingInput;
|
||||
import net.momirealms.craftengine.core.plugin.CraftEngine;
|
||||
import net.momirealms.craftengine.core.registry.BuiltInRegistries;
|
||||
import net.momirealms.craftengine.core.registry.Holder;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
import net.momirealms.craftengine.core.util.MiscUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
public class CustomSmithingTransformRecipe<T> implements Recipe<T> {
|
||||
public static final Factory<?> FACTORY = new Factory<>();
|
||||
private final Key id;
|
||||
private final CustomRecipeResult<T> result;
|
||||
private final Ingredient<T> template;
|
||||
private final Ingredient<T> base;
|
||||
private final Ingredient<T> template;
|
||||
private final Ingredient<T> addition;
|
||||
|
||||
public CustomSmithingTransformRecipe(Key id,
|
||||
CustomRecipeResult<T> result,
|
||||
Ingredient<T> template,
|
||||
Ingredient<T> base,
|
||||
Ingredient<T> addition
|
||||
@Nullable Ingredient<T> addition,
|
||||
@Nullable Ingredient<T> base,
|
||||
@Nullable Ingredient<T> template,
|
||||
CustomRecipeResult<T> result
|
||||
) {
|
||||
this.id = id;
|
||||
this.result = result;
|
||||
this.template = template;
|
||||
this.base = base;
|
||||
this.template = template;
|
||||
this.addition = addition;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean matches(RecipeInput input) {
|
||||
return false;
|
||||
SmithingInput<T> smithingInput = (SmithingInput<T>) input;
|
||||
return checkIngredient(this.base, smithingInput.base())
|
||||
&& checkIngredient(this.template, smithingInput.template())
|
||||
&& checkIngredient(this.addition, smithingInput.addition());
|
||||
}
|
||||
|
||||
private boolean checkIngredient(Ingredient<T> ingredient, OptimizedIDItem<T> item) {
|
||||
if (ingredient != null) {
|
||||
if (item == null) {
|
||||
return false;
|
||||
}
|
||||
return ingredient.test(item);
|
||||
} else {
|
||||
return item == null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Ingredient<T>> ingredientsInUse() {
|
||||
return List.of();
|
||||
List<Ingredient<T>> ingredients = new ArrayList<>();
|
||||
ingredients.add(this.base);
|
||||
if (this.template != null) {
|
||||
ingredients.add(this.template);
|
||||
}
|
||||
if (this.addition != null) {
|
||||
ingredients.add(this.addition);
|
||||
}
|
||||
return ingredients;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,4 +86,46 @@ public class CustomSmithingTransformRecipe<T> implements Recipe<T> {
|
||||
public CustomRecipeResult<T> result() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Ingredient<T> base() {
|
||||
return base;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Ingredient<T> template() {
|
||||
return template;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Ingredient<T> addition() {
|
||||
return addition;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"DuplicatedCode"})
|
||||
public static class Factory<A> implements RecipeFactory<A> {
|
||||
|
||||
@Override
|
||||
public Recipe<A> create(Key id, Map<String, Object> arguments) {
|
||||
List<String> base = MiscUtils.getAsStringList(arguments.get("base"));
|
||||
List<String> addition = MiscUtils.getAsStringList(arguments.get("addition"));
|
||||
List<String> template = MiscUtils.getAsStringList(arguments.get("template"));
|
||||
return new CustomSmithingTransformRecipe<>(
|
||||
id,
|
||||
toIngredient(addition), toIngredient(base), toIngredient(template), parseResult(arguments)
|
||||
);
|
||||
}
|
||||
|
||||
private Ingredient<A> toIngredient(List<String> items) {
|
||||
Set<Holder<Key>> holders = new HashSet<>();
|
||||
for (String item : items) {
|
||||
if (item.charAt(0) == '#') {
|
||||
holders.addAll(CraftEngine.instance().itemManager().tagToItems(Key.of(item.substring(1))));
|
||||
} else {
|
||||
holders.add(BuiltInRegistries.OPTIMIZED_ITEM_ID.get(Key.of(item)).orElseThrow(() -> new IllegalArgumentException("Invalid vanilla/custom item: " + item)));
|
||||
}
|
||||
}
|
||||
return Ingredient.of(holders);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ public class CustomSmokingRecipe<T> extends CustomCookingRecipe<T> {
|
||||
return RecipeTypes.SMOKING;
|
||||
}
|
||||
|
||||
public static class Factory<A> implements RecipeFactory<CustomSmokingRecipe<A>> {
|
||||
public static class Factory<A> implements RecipeFactory<A> {
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes", "DuplicatedCode"})
|
||||
@Override
|
||||
public Recipe<CustomSmokingRecipe<A>> create(Key id, Map<String, Object> arguments) {
|
||||
public Recipe<A> create(Key id, Map<String, Object> arguments) {
|
||||
CookingRecipeCategory recipeCategory = arguments.containsKey("category") ? CookingRecipeCategory.valueOf(arguments.get("category").toString().toUpperCase(Locale.ENGLISH)) : null;
|
||||
String group = arguments.containsKey("group") ? arguments.get("group").toString() : null;
|
||||
int cookingTime = MiscUtils.getAsInt(arguments.getOrDefault("time", 80));
|
||||
|
||||
@@ -18,6 +18,7 @@ public class RecipeTypes {
|
||||
public static final Key CAMPFIRE_COOKING = Key.of("minecraft:campfire_cooking");
|
||||
public static final Key STONE_CUTTING = Key.of("minecraft:stone_cutting");
|
||||
public static final Key SMITHING_TRANSFORM = Key.of("minecraft:smithing_transform");
|
||||
public static final Key SMITHING_TRIM = Key.of("minecraft:smithing_trim");
|
||||
|
||||
static {
|
||||
register(SHAPED, CustomShapedRecipe.FACTORY);
|
||||
@@ -27,6 +28,7 @@ public class RecipeTypes {
|
||||
register(BLASTING, CustomBlastingRecipe.FACTORY);
|
||||
register(CAMPFIRE_COOKING, CustomCampfireRecipe.FACTORY);
|
||||
register(STONE_CUTTING, CustomStoneCuttingRecipe.FACTORY);
|
||||
register(SMITHING_TRANSFORM, CustomSmithingTransformRecipe.FACTORY);
|
||||
}
|
||||
|
||||
public static <T> void register(Key key, RecipeFactory<T> factory) {
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.input;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.OptimizedIDItem;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class SmithingInput<T> implements RecipeInput {
|
||||
private final OptimizedIDItem<T> base;
|
||||
private final OptimizedIDItem<T> template;
|
||||
private final OptimizedIDItem<T> addition;
|
||||
|
||||
public SmithingInput(@Nullable OptimizedIDItem<T> base,
|
||||
@Nullable OptimizedIDItem<T> template,
|
||||
@Nullable OptimizedIDItem<T> addition) {
|
||||
this.base = base;
|
||||
this.template = template;
|
||||
this.addition = addition;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public OptimizedIDItem<T> base() {
|
||||
return base;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public OptimizedIDItem<T> template() {
|
||||
return template;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public OptimizedIDItem<T> addition() {
|
||||
return addition;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.CookingRecipeCategory;
|
||||
import net.momirealms.craftengine.core.item.recipe.RecipeTypes;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -9,4 +11,9 @@ public class VanillaBlastingRecipe extends VanillaCookingRecipe {
|
||||
public VanillaBlastingRecipe(CookingRecipeCategory category, String group, RecipeResult result, List<String> ingredient, float experience, int cookingTime) {
|
||||
super(category, group, result, ingredient, experience, cookingTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key type() {
|
||||
return RecipeTypes.BLASTING;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.CookingRecipeCategory;
|
||||
import net.momirealms.craftengine.core.item.recipe.RecipeTypes;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -9,4 +11,9 @@ public class VanillaCampfireRecipe extends VanillaCookingRecipe {
|
||||
public VanillaCampfireRecipe(CookingRecipeCategory category, String group, RecipeResult result, List<String> ingredient, float experience, int cookingTime) {
|
||||
super(category, group, result, ingredient, experience, cookingTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key type() {
|
||||
return RecipeTypes.CAMPFIRE_COOKING;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.momirealms.craftengine.core.item.recipe.CookingRecipeCategory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class VanillaCookingRecipe extends VanillaRecipe {
|
||||
public abstract class VanillaCookingRecipe extends VanillaGroupedRecipe {
|
||||
protected final List<String> ingredient;
|
||||
protected final CookingRecipeCategory category;
|
||||
protected final float experience;
|
||||
|
||||
@@ -2,7 +2,7 @@ package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.CraftingRecipeCategory;
|
||||
|
||||
public class VanillaCraftingRecipe extends VanillaRecipe {
|
||||
public abstract class VanillaCraftingRecipe extends VanillaGroupedRecipe {
|
||||
protected final CraftingRecipeCategory category;
|
||||
|
||||
protected VanillaCraftingRecipe(CraftingRecipeCategory category, String group, RecipeResult result) {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
public abstract class VanillaGroupedRecipe implements VanillaRecipe {
|
||||
protected final String group;
|
||||
protected final RecipeResult result;
|
||||
|
||||
protected VanillaGroupedRecipe(String group, RecipeResult result) {
|
||||
this.group = group;
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String group() {
|
||||
return group;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecipeResult result() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,10 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
public abstract class VanillaRecipe {
|
||||
protected final String group;
|
||||
protected final RecipeResult result;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
|
||||
protected VanillaRecipe(String group, RecipeResult result) {
|
||||
this.group = group;
|
||||
this.result = result;
|
||||
}
|
||||
public interface VanillaRecipe {
|
||||
|
||||
public String group() {
|
||||
return group;
|
||||
}
|
||||
Key type();
|
||||
|
||||
public RecipeResult result() {
|
||||
return result;
|
||||
}
|
||||
RecipeResult result();
|
||||
}
|
||||
|
||||
@@ -17,4 +17,6 @@ public interface VanillaRecipeReader {
|
||||
VanillaCampfireRecipe readCampfire(JsonObject json);
|
||||
|
||||
VanillaStoneCuttingRecipe readStoneCutting(JsonObject json);
|
||||
|
||||
VanillaSmithingTransformRecipe readSmithingTransform(JsonObject json);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.CraftingRecipeCategory;
|
||||
import net.momirealms.craftengine.core.item.recipe.RecipeTypes;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -26,4 +28,9 @@ public class VanillaShapedRecipe extends VanillaCraftingRecipe {
|
||||
public String[] pattern() {
|
||||
return pattern;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key type() {
|
||||
return RecipeTypes.SHAPED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.CraftingRecipeCategory;
|
||||
import net.momirealms.craftengine.core.item.recipe.RecipeTypes;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,4 +17,9 @@ public class VanillaShapelessRecipe extends VanillaCraftingRecipe {
|
||||
public List<List<String>> ingredients() {
|
||||
return ingredients;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key type() {
|
||||
return RecipeTypes.SHAPELESS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.CookingRecipeCategory;
|
||||
import net.momirealms.craftengine.core.item.recipe.RecipeTypes;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -9,4 +11,9 @@ public class VanillaSmeltingRecipe extends VanillaCookingRecipe {
|
||||
public VanillaSmeltingRecipe(CookingRecipeCategory category, String group, RecipeResult result, List<String> ingredient, float experience, int cookingTime) {
|
||||
super(category, group, result, ingredient, experience, cookingTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key type() {
|
||||
return RecipeTypes.SMELTING;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.RecipeTypes;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class VanillaSmithingTransformRecipe implements VanillaRecipe {
|
||||
private final RecipeResult result;
|
||||
private final List<String> base;
|
||||
private final List<String> template;
|
||||
private final List<String> addition;
|
||||
|
||||
public VanillaSmithingTransformRecipe(List<String> addition, List<String> base, List<String> template, RecipeResult result) {
|
||||
this.result = result;
|
||||
this.base = base;
|
||||
this.template = template;
|
||||
this.addition = addition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key type() {
|
||||
return RecipeTypes.SMITHING_TRANSFORM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecipeResult result() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<String> base() {
|
||||
return base;
|
||||
}
|
||||
|
||||
public List<String> template() {
|
||||
return template;
|
||||
}
|
||||
|
||||
public List<String> addition() {
|
||||
return addition;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.CookingRecipeCategory;
|
||||
import net.momirealms.craftengine.core.item.recipe.RecipeTypes;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -9,4 +11,9 @@ public class VanillaSmokingRecipe extends VanillaCookingRecipe {
|
||||
public VanillaSmokingRecipe(CookingRecipeCategory category, String group, RecipeResult result, List<String> ingredient, float experience, int cookingTime) {
|
||||
super(category, group, result, ingredient, experience, cookingTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key type() {
|
||||
return RecipeTypes.SMOKING;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package net.momirealms.craftengine.core.item.recipe.vanilla;
|
||||
|
||||
import net.momirealms.craftengine.core.item.recipe.RecipeTypes;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class VanillaStoneCuttingRecipe extends VanillaRecipe {
|
||||
public class VanillaStoneCuttingRecipe extends VanillaGroupedRecipe {
|
||||
private final List<String> ingredient;
|
||||
|
||||
public VanillaStoneCuttingRecipe(String group, RecipeResult result, List<String> ingredient) {
|
||||
@@ -13,4 +16,9 @@ public class VanillaStoneCuttingRecipe extends VanillaRecipe {
|
||||
public List<String> ingredient() {
|
||||
return ingredient;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key type() {
|
||||
return RecipeTypes.STONE_CUTTING;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,16 @@ public class VanillaRecipeReader1_20 extends AbstractRecipeReader {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VanillaSmithingTransformRecipe readSmithingTransform(JsonObject json) {
|
||||
return new VanillaSmithingTransformRecipe(
|
||||
readSingleIngredient(json.get("base")),
|
||||
readSingleIngredient(json.get("template")),
|
||||
readSingleIngredient(json.get("addition")),
|
||||
readSmithingResult(json.getAsJsonObject("result"))
|
||||
);
|
||||
}
|
||||
|
||||
protected List<String> readSingleIngredient(JsonElement json) {
|
||||
List<String> ingredients = new ArrayList<>();
|
||||
if (json.isJsonObject()) {
|
||||
@@ -126,6 +136,12 @@ public class VanillaRecipeReader1_20 extends AbstractRecipeReader {
|
||||
return new RecipeResult(item, count, null);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected RecipeResult readSmithingResult(JsonObject object) {
|
||||
String item = object.get("item").getAsString();
|
||||
return new RecipeResult(item, 1, null);
|
||||
}
|
||||
|
||||
protected List<List<String>> readShapelessIngredients(JsonArray json) {
|
||||
List<List<String>> ingredients = new ArrayList<>();
|
||||
for (JsonElement element : json) {
|
||||
|
||||
@@ -26,4 +26,9 @@ public class VanillaRecipeReader1_20_5 extends VanillaRecipeReader1_20 {
|
||||
protected RecipeResult readStoneCuttingResult(JsonObject json) {
|
||||
return readCraftingResult(json.getAsJsonObject("result"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @NotNull RecipeResult readSmithingResult(JsonObject object) {
|
||||
return readCraftingResult(object.getAsJsonObject());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user