mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed the trick apple recipes
This commit is contained in:
parent
0995d01a2f
commit
8c90991214
2 changed files with 7 additions and 1 deletions
|
@ -5,6 +5,7 @@ import java.util.Map;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.spongepowered.include.com.google.common.base.Preconditions;
|
import org.spongepowered.include.com.google.common.base.Preconditions;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.item.UItems;
|
||||||
import com.minelittlepony.unicopia.recipe.ZapAppleRecipe;
|
import com.minelittlepony.unicopia.recipe.ZapAppleRecipe;
|
||||||
|
|
||||||
import net.minecraft.advancement.Advancement;
|
import net.minecraft.advancement.Advancement;
|
||||||
|
@ -71,7 +72,7 @@ public class TrickCraftingRecipeJsonBuilder implements CraftingRecipeJsonBuilder
|
||||||
.criteriaMerger(AdvancementRequirements.CriterionMerger.OR);
|
.criteriaMerger(AdvancementRequirements.CriterionMerger.OR);
|
||||||
criterions.forEach(builder::criterion);
|
criterions.forEach(builder::criterion);
|
||||||
exporter.accept(id,
|
exporter.accept(id,
|
||||||
new ZapAppleRecipe(group == null ? "" : group, CraftingRecipeCategory.MISC, output.getDefaultStack(), inputs),
|
new ZapAppleRecipe(group == null ? "" : group, CraftingRecipeCategory.MISC, UItems.ZAP_APPLE.setAppearance(UItems.ZAP_APPLE.getDefaultStack(), output.getDefaultStack()), inputs),
|
||||||
builder.build(id.withPrefixedPath("recipes/" + category.getName() + "/"))
|
builder.build(id.withPrefixedPath("recipes/" + category.getName() + "/"))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,11 @@ public class ZapAppleRecipe extends ShapelessRecipe {
|
||||||
super(group, category, output, input);
|
super(group, category, output, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RecipeSerializer<?> getSerializer() {
|
||||||
|
return URecipes.ZAP_APPLE_SERIALIZER;
|
||||||
|
}
|
||||||
|
|
||||||
public static class Serializer implements RecipeSerializer<ZapAppleRecipe> {
|
public static class Serializer implements RecipeSerializer<ZapAppleRecipe> {
|
||||||
private static final Codec<ZapAppleRecipe> CODEC = RecordCodecBuilder.create(instance -> instance.group(
|
private static final Codec<ZapAppleRecipe> CODEC = RecordCodecBuilder.create(instance -> instance.group(
|
||||||
Codec.STRING.optionalFieldOf("group", "").forGetter(ZapAppleRecipe::getGroup),
|
Codec.STRING.optionalFieldOf("group", "").forGetter(ZapAppleRecipe::getGroup),
|
||||||
|
|
Loading…
Reference in a new issue