[Change] Adopted new Recipe handling

This commit is contained in:
Frank 2023-12-18 15:48:11 +01:00
parent 7a972fc22f
commit f6703dc8bf
2 changed files with 10 additions and 32 deletions

View file

@ -26,8 +26,6 @@ import net.minecraft.world.level.Level;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import com.google.gson.JsonObject;
import java.util.List;
public class AlloyingRecipe implements Recipe<Container>, UnknownReceipBookCategory {
@ -207,15 +205,9 @@ public class AlloyingRecipe implements Recipe<Container>, UnknownReceipBookCateg
}
@Override
protected void serializeRecipeData(JsonObject root) {
super.serializeRecipeData(root);
if (experience != 0) {
root.addProperty("experience", experience);
}
if (experience != 350) {
root.addProperty("smelttime", smeltTime);
}
protected AlloyingRecipe createRecipe(ResourceLocation id) {
checkRecipe();
return new AlloyingRecipe(group, primaryInput, secondaryInput, output, experience, smeltTime);
}
}