diff --git a/src/main/java/com/minelittlepony/unicopia/datagen/providers/UModelProvider.java b/src/main/java/com/minelittlepony/unicopia/datagen/providers/UModelProvider.java index 4a652170..8dd5d9c5 100644 --- a/src/main/java/com/minelittlepony/unicopia/datagen/providers/UModelProvider.java +++ b/src/main/java/com/minelittlepony/unicopia/datagen/providers/UModelProvider.java @@ -59,7 +59,7 @@ public class UModelProvider extends FabricModelProvider { ItemModels.register(itemModelGenerator, UItems.ACORN, UItems.APPLE_PIE_HOOF, UItems.APPLE_PIE_SLICE, UItems.APPLE_PIE, UItems.BANANA, UItems.BOTCHED_GEM, UItems.BOWL_OF_NUTS, UItems.BROKEN_SUNGLASSES, UItems.BURNED_JUICE, UItems.BURNED_TOAST, - UItems.CARAPACE, UItems.CLAM_SHELL, UItems.COOKED_ZAP_APPLE, UItems.CLOUD_LUMP, UItems.CRISPY_HAY_FRIES, UItems.CRYSTAL_HEART, UItems.CRYSTAL_SHARD, + UItems.CARAPACE, UItems.CLAM_SHELL, UItems.COOKED_ZAP_APPLE, UItems.CHOCOLATE_OATMEAL_COOKIE, UItems.CLOUD_LUMP, UItems.CRISPY_HAY_FRIES, UItems.CRYSTAL_HEART, UItems.CRYSTAL_SHARD, UItems.DAFFODIL_DAISY_SANDWICH, UItems.DRAGON_BREATH_SCROLL, UItems.EMPTY_JAR, UItems.FRIENDSHIP_BRACELET, @@ -70,7 +70,7 @@ public class UModelProvider extends FabricModelProvider { UItems.JAM_TOAST, UItems.JUICE, UItems.LIGHTNING_JAR, UItems.MANGO, UItems.MUFFIN, - UItems.OATMEAL, UItems.OATMEAL_COOKIE, + UItems.OATMEAL, UItems.OATMEAL_COOKIE, UItems.SCONE, UItems.PEBBLES, UItems.PEGASUS_FEATHER, UItems.PINECONE, UItems.PINECONE_COOKIE, UItems.PINEAPPLE_CROWN, UItems.RAIN_CLOUD_JAR, UItems.ROCK_STEW, UItems.ROCK, UItems.ROTTEN_APPLE, UItems.SALT_CUBE, UItems.SCALLOP_SHELL, UItems.SHELLY, UItems.SOUR_APPLE_SEEDS, UItems.SOUR_APPLE, UItems.SPELLBOOK, UItems.STORM_CLOUD_JAR, diff --git a/src/main/java/com/minelittlepony/unicopia/datagen/providers/recipe/URecipeProvider.java b/src/main/java/com/minelittlepony/unicopia/datagen/providers/recipe/URecipeProvider.java index 2161b97a..3a95e32e 100644 --- a/src/main/java/com/minelittlepony/unicopia/datagen/providers/recipe/URecipeProvider.java +++ b/src/main/java/com/minelittlepony/unicopia/datagen/providers/recipe/URecipeProvider.java @@ -3,6 +3,7 @@ package com.minelittlepony.unicopia.datagen.providers.recipe; import java.util.Arrays; import java.util.List; import java.util.function.Consumer; +import java.util.stream.Stream; import org.jetbrains.annotations.Nullable; import com.minelittlepony.unicopia.UConventionalTags; @@ -320,16 +321,28 @@ public class URecipeProvider extends FabricRecipeProvider { .input(Items.BOWL) .offerTo(exporter); ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.OATMEAL_COOKIE) - .input(UItems.OATS, 3).criterion(hasItem(UItems.OATS), conditionsFromItem(UItems.OATS)) + .input(UItems.OATS, 2).criterion(hasItem(UItems.OATS), conditionsFromItem(UItems.OATS)) + .offerTo(exporter); + ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.CHOCOLATE_OATMEAL_COOKIE) + .input(UItems.OATS, 2) + .input(Items.COCOA_BEANS).criterion(hasItem(Items.COCOA_BEANS), conditionsFromItem(Items.COCOA_BEANS)) .offerTo(exporter); ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.PINECONE_COOKIE) .input(UItems.PINECONE).criterion(hasItem(UItems.PINECONE), conditionsFromItem(UItems.PINECONE)) .input(Items.WHEAT, 2) .offerTo(exporter); + ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.SCONE) + .input(UItems.OATS).criterion(hasItem(UItems.OATS), conditionsFromItem(UItems.OATS)) + .input(Items.WHEAT, 2) + .offerTo(exporter); ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.ROCK_CANDY, 3) .input(Items.SUGAR, 6).criterion(hasItem(Items.SUGAR), conditionsFromItem(Items.SUGAR)) .input(UItems.PEBBLES, 3) .offerTo(exporter); + ShapedRecipeJsonBuilder.create(RecipeCategory.FOOD, Items.BREAD) + .input('#', UItems.OATS).criterion("has_oats", conditionsFromItem(UItems.OATS)) + .pattern("###") + .offerTo(exporter, convertBetween(UItems.OATS, Items.WHEAT)); ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.JUICE) .input(Ingredient.fromTag(UTags.FRESH_APPLES), 6).criterion(hasItem(Items.APPLE), conditionsFromTag(UTags.FRESH_APPLES)) .input(Items.GLASS_BOTTLE) @@ -349,7 +362,9 @@ public class URecipeProvider extends FabricRecipeProvider { ShapedRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.HAY_FRIES) .input('#', UItems.OATS).criterion(hasItem(UItems.OATS), conditionsFromItem(UItems.OATS)) - .pattern("###") + .pattern("#") + .pattern("#") + .pattern("#") .offerTo(exporter); ShapedRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.HAY_BURGER) .input('~', Items.BREAD).criterion(hasItem(Items.BREAD), conditionsFromItem(Items.BREAD)) @@ -717,4 +732,10 @@ public class URecipeProvider extends FabricRecipeProvider { .traits(traits) .offerTo(exporter); } + + public static InventoryChangedCriterion.Conditions conditionsFromMultipleItems(ItemConvertible... items) { + return conditionsFromItemPredicates( + Stream.of(items).map(item -> ItemPredicate.Builder.create().items(item).build()).toArray(ItemPredicate[]::new) + ); + } } diff --git a/src/main/java/com/minelittlepony/unicopia/item/UFoodComponents.java b/src/main/java/com/minelittlepony/unicopia/item/UFoodComponents.java index a7ff322a..ee093b08 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/UFoodComponents.java +++ b/src/main/java/com/minelittlepony/unicopia/item/UFoodComponents.java @@ -3,6 +3,7 @@ package com.minelittlepony.unicopia.item; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.effect.StatusEffects; import net.minecraft.item.FoodComponent; +import net.minecraft.item.FoodComponents; public interface UFoodComponents { FoodComponent OATS = builder(1, 0.7F).build(); @@ -12,8 +13,8 @@ public interface UFoodComponents { .statusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 1200, 1), 0.3F) .statusEffect(new StatusEffectInstance(StatusEffects.SPEED, 1200, 1), 0.2F) .build(); - FoodComponent DAFODIL_DAISY_SANDWICH = builder(3, 2).build(); - FoodComponent HAY_BURGER = builder(7, 1.4F).build(); + FoodComponent DAFODIL_DAISY_SANDWICH = builder(3, 1.4F).build(); + FoodComponent BURGER = builder(7, 1.4F).build(); FoodComponent HAY_FRIES = builder(4, 2).build(); FoodComponent CRISPY_HAY_FRIES = builder(6, 7).build(); @@ -23,6 +24,12 @@ public interface UFoodComponents { FoodComponent JUICE = builder(2, 1.8F).alwaysEdible().build(); FoodComponent BURNED_JUICE = builder(3, 1).build(); + FoodComponent NUT_BOWL = FoodComponents.BAKED_POTATO; //builder(4, 0.6F).build(); + + FoodComponent OATMEAL_COOKIE = FoodComponents.COOKIE; //builder(2, 0.1F).build(); + FoodComponent CHOCOLATE_OATMEAL_COOKIE = builder(3, 0.4F).build(); + FoodComponent SCONE = builder(2, 0.2F).build(); + @Deprecated FoodComponent RANDOM_FOLIAGE = builder(2, 1).build(); @Deprecated diff --git a/src/main/java/com/minelittlepony/unicopia/item/UItems.java b/src/main/java/com/minelittlepony/unicopia/item/UItems.java index 5e365031..242e9a13 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/UItems.java +++ b/src/main/java/com/minelittlepony/unicopia/item/UItems.java @@ -75,12 +75,14 @@ public interface UItems { Item IMPORTED_OATS = register("imported_oats", new Item(new Item.Settings().food(UFoodComponents.IMPORTED_OATS)), ItemGroups.FOOD_AND_DRINK); Item OATMEAL = register("oatmeal", new OatmealItem(new Item.Settings().recipeRemainder(Items.BOWL).maxCount(1).food(UFoodComponents.OATMEAL)), ItemGroups.FOOD_AND_DRINK); - Item OATMEAL_COOKIE = register("oatmeal_cookie", new Item(new Item.Settings().food(FoodComponents.COOKIE)), ItemGroups.FOOD_AND_DRINK); + Item OATMEAL_COOKIE = register("oatmeal_cookie", new Item(new Item.Settings().food(UFoodComponents.OATMEAL_COOKIE)), ItemGroups.FOOD_AND_DRINK); + Item CHOCOLATE_OATMEAL_COOKIE = register("chocolate_oatmeal_cookie", new Item(new Item.Settings().food(UFoodComponents.CHOCOLATE_OATMEAL_COOKIE)), ItemGroups.FOOD_AND_DRINK); Item PINECONE_COOKIE = register("pinecone_cookie", new Item(new Item.Settings().food(FoodComponents.COOKIE)), ItemGroups.FOOD_AND_DRINK); - Item BOWL_OF_NUTS = register("bowl_of_nuts", new StewItem(new Item.Settings().food(FoodComponents.BAKED_POTATO).recipeRemainder(Items.BOWL)), ItemGroups.FOOD_AND_DRINK); + Item BOWL_OF_NUTS = register("bowl_of_nuts", new StewItem(new Item.Settings().food(UFoodComponents.NUT_BOWL).recipeRemainder(Items.BOWL)), ItemGroups.FOOD_AND_DRINK); + Item SCONE = register("scone", new MuffinItem(new Item.Settings().maxCount(32).food(UFoodComponents.SCONE), 0), ItemGroups.FOOD_AND_DRINK); Item DAFFODIL_DAISY_SANDWICH = register("daffodil_daisy_sandwich", new Item(new Item.Settings().food(UFoodComponents.DAFODIL_DAISY_SANDWICH)), ItemGroups.FOOD_AND_DRINK); - Item HAY_BURGER = register("hay_burger", new Item(new Item.Settings().maxCount(1).food(UFoodComponents.HAY_BURGER)), ItemGroups.FOOD_AND_DRINK); + Item HAY_BURGER = register("hay_burger", new Item(new Item.Settings().maxCount(1).food(UFoodComponents.BURGER)), ItemGroups.FOOD_AND_DRINK); Item HAY_FRIES = register("hay_fries", new Item(new Item.Settings().maxCount(16).food(UFoodComponents.HAY_FRIES)), ItemGroups.FOOD_AND_DRINK); Item CRISPY_HAY_FRIES = register("crispy_hay_fries", new Item(new Item.Settings().maxCount(16).food(UFoodComponents.CRISPY_HAY_FRIES)), ItemGroups.FOOD_AND_DRINK); /** diff --git a/src/main/resources/assets/unicopia/lang/en_us.json b/src/main/resources/assets/unicopia/lang/en_us.json index 6b3a168b..22f18738 100644 --- a/src/main/resources/assets/unicopia/lang/en_us.json +++ b/src/main/resources/assets/unicopia/lang/en_us.json @@ -147,7 +147,9 @@ "item.unicopia.wheat_worms": "Wheat Worms", "item.unicopia.baited_fishing_rod": "Baited Fishing Rod", "item.unicopia.muffin": "Muffin", + "item.unicopia.scone": "Scone", "item.unicopia.oatmeal_cookie": "Oatmeal Cookie", + "item.unicopia.chocolate_oatmeal_cookie": "Chocolate Oatmeal Cookie", "item.unicopia.pinecone_cookie": "Pinecone Cookie", "item.unicopia.bowl_of_nuts": "Bowl of Nuts", diff --git a/src/main/resources/assets/unicopia/textures/item/chocolate_oatmeal_cookie.png b/src/main/resources/assets/unicopia/textures/item/chocolate_oatmeal_cookie.png new file mode 100644 index 00000000..d3396a3a Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/item/chocolate_oatmeal_cookie.png differ diff --git a/src/main/resources/assets/unicopia/textures/item/scone.png b/src/main/resources/assets/unicopia/textures/item/scone.png new file mode 100644 index 00000000..20ab1ce0 Binary files /dev/null and b/src/main/resources/assets/unicopia/textures/item/scone.png differ diff --git a/src/main/resources/data/unicopia/tags/items/food_types/baked_goods.json b/src/main/resources/data/unicopia/tags/items/food_types/baked_goods.json index b28e7389..e9ac11e8 100644 --- a/src/main/resources/data/unicopia/tags/items/food_types/baked_goods.json +++ b/src/main/resources/data/unicopia/tags/items/food_types/baked_goods.json @@ -4,6 +4,7 @@ "minecraft:bread", "minecraft:cookie", "unicopia:muffin", + "unicopia:scone", "#c:grain", "unicopia:cooked_zap_apple", "minecraft:pumpkin_pie", @@ -18,6 +19,7 @@ "unicopia:crispy_hay_fries", "unicopia:horse_shoe_fries", "unicopia:oatmeal_cookie", + "unicopia:chocolate_oatmeal_cookie", "unicopia:pinecone_cookie", "unicopia:bowl_of_nuts", { "id": "farmersdelight:wheat_dough", "required": false },