besterfauli

A complete game enhancing Mod named "Ascendcraft". I wanna start in the early game. It should add a new cooking system with a lot of new foods and drinks and different ways of making them while staying in a more medieval vibe without modern technology. This should add new crops ways of making food and a lot of different food.

Kodari AI
KodariNov 11 at 6:22 pm 33
AscendcraftCulinary
A medieval-themed Minecraft Fabric mod that introduces a comprehensive cooking system with over 40 new foods and drinks. Players cultivate new crops, use traditional tools like clay pots and spits, and combine ingredients through crafting, brewing, and roasting to create hearty meals. The mod emphasizes a rustic, pre-industrial aesthetic, offering alternative progression paths for hunger management and health benefits without modern machinery.
  • Add barley and cabbage crops with harvestable seeds.

  • Add medieval-style foods and drinks using crafting, furnaces, smokers, and campfires.

  • Give each addition its own artwork, recipes, and creative-tab entries.

Built Ascendcraft’s early-game cooking foundation: two crops, seven foods and two drinks, with custom textures and recipes.

In survival:

  • Craft barley seeds from two wheat seeds, or cabbage seeds from wheat and beetroot seeds. Plant them on farmland and harvest the mature crops.

  • Craft barley into flour for bread, meat pies and berry tarts. Use cabbage for stew or roast it in a furnace, smoker or campfire.

  • Make apple cider from two apples and a potion, or honey tea from a honey bottle, glass bottle and short grass. Drinks return a glass bottle when consumed.

besterfauli

Change so you cant craft the cabbage and barley seeds but can find them in villages. Sometimes you can even find barley in the wild, but that only drops the seeds and not the barley itself. Make a new stove block where you can put a pot or a pan on top. When you right click the pan with anything smokebale like meat or cabbage in your hand, the item is placed inside the pan. When it is done the texture changes to its roasted version and you can right click it to collect it again. When you right click the pot on a stove it opens a gui with 6 ingredients slots, 1 bowl/glass input slot and 1 meal outcome slot. To make a cabbage stew you cannot craft it but need to put 2 cabbages, 1 carrot and one potato. Then you need to put a bowl into the bowl/glass input slot. Then outcomes a cabbage stew. To make a meat pie and a berry tart, first you need to make dough, which you can make by crafting barley flour with a water bottle. You get the empty bottle back. Then for the meat pie you need to take any kind of roasted meat and put it into the crafting grid with dough and sugar, to get a raw meat pie. When you put this into a pot on a stove, after a quick wait you get a meat pie. For the berry tart you need to put 1 sweet berries, 1 dough and sugar into the crafting grid to get a raw berry tart. When you put this into a pot on a stove, after a quick wait you get a berry tart. Apple cider is replaced with apple juice and to get it you need to put 2 apples, 1 sugar into a pot on a stove and into the bowl/glass slot you need to put an empty bottle. Then you get apple juice. To get Honey tea, you need to put a honey bottle and 1 sugar into a heated pot (a pot over a stove). You can also make cacao by putting 1 cacao and 2 sugar with a glass in the glass slot into a heated pot.

Kodari AI
KodariNov 11 at 7:02 pm 8
  1. Move seed discovery to villages and add wild barley.

  2. Add the stove, pan and pot cooking system.

  3. Rework pies, stew and drinks around the new cooking process.

  • Removed the seed recipes. Barley and cabbage seeds can now appear in village house chests.

  • Added wild barley to plains and meadows; breaking it drops seeds, not barley.

Still missing: the stove, pan, pot GUI, and the requested food and drink recipe changes. The existing recipes remain in place.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
66 235
src/main/java/com/ascendcraft/Ascendcraft.java
package com.ascendcraft;

import com.mojang.serialization.MapCodec;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.fabricmc.fabric.api.loot.v3.LootTableEvents;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.CropBlock;
import net.minecraft.block.PlantBlock;
import net.minecraft.component.type.ConsumableComponents;
import net.minecraft.component.type.FoodComponent;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.Items;
import net.minecraft.loot.LootPool;
import net.minecraft.loot.LootTables;
import net.minecraft.loot.condition.RandomChanceLootCondition;
import net.minecraft.loot.entry.ItemEntry;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.Identifier;
import net.minecraft.item.ItemConvertible;
import net.minecraft.world.biome.BiomeKeys;
import net.minecraft.world.gen.GenerationStep;

public class Ascendcraft implements ModInitializer {
    private static final Block BARLEY_CROP = crop("barley_crop", true);
    private static final Block CABBAGE_CROP = crop("cabbage_crop", false);
    private static final Block WILD_BARLEY = wildBarley();
    private static final Item BARLEY_SEEDS = seed("barley_seeds", BARLEY_CROP);
    private static final Item CABBAGE_SEEDS = seed("cabbage_seeds", CABBAGE_CROP);
    private static final Item BARLEY = item("barley", 0, 0, null, false);
    private static final Item CABBAGE = item("cabbage", 2, 0.3f, null, false);
    private static final Item BARLEY_FLOUR = item("barley_flour", 0, 0, null, false);
    private static final Item BARLEY_BREAD = item("barley_bread", 5, 0.6f, null, false);
    private static final Item CABBAGE_STEW = item("cabbage_stew", 7, 0.6f, Items.BOWL, false);
    private static final Item ROASTED_CABBAGE = item("roasted_cabbage", 5, 0.5f, null, false);
    private static final Item MEAT_PIE = item("meat_pie", 8, 0.7f, null, false);
    private static final Item BERRY_TART = item("berry_tart", 6, 0.4f, null, false);
    private static final Item APPLE_CIDER = item("apple_cider", 4, 0.3f, Items.GLASS_BOTTLE, true);
    private static final Item HONEY_TEA = item("honey_tea", 3, 0.4f, Items.GLASS_BOTTLE, true);

    private static Identifier id(String name) { return Identifier.of("ascendcraft", name); }

    private static Block wildBarley() {
        RegistryKey<Block> key = RegistryKey.of(RegistryKeys.BLOCK, id("wild_barley"));
        return Registry.register(Registries.BLOCK, key, new WildBarley(AbstractBlock.Settings.create()
                .registryKey(key).noCollision().breakInstantly().sounds(BlockSoundGroup.CROP)));
    }

    private static Block crop(String name, boolean barley) {
        RegistryKey<Block> key = RegistryKey.of(RegistryKeys.BLOCK, id(name));
        return Registry.register(Registries.BLOCK, key, new RusticCrop(AbstractBlock.Settings.create()
                .registryKey(key).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.CROP), barley));
    }

    private static Item seed(String name, Block block) {
        RegistryKey<Item> key = RegistryKey.of(RegistryKeys.ITEM, id(name));
        return Registry.register(Registries.ITEM, key, new BlockItem(block, new Item.Settings().registryKey(key)));
    }

    private static Item item(String name, int nutrition, float saturation, Item remainder, boolean drink) {
        RegistryKey<Item> key = RegistryKey.of(RegistryKeys.ITEM, id(name));
        Item.Settings settings = new Item.Settings().registryKey(key);
        if (nutrition > 0) {
            FoodComponent food = new FoodComponent.Builder().nutrition(nutrition).saturationModifier(saturation).build();
            if (drink) settings.food(food, ConsumableComponents.DRINK);
            else settings.food(food);
        }
        if (remainder != null) settings.useRemainder(remainder).maxCount(16);
        return Registry.register(Registries.ITEM, key, new Item(settings));
    }

    @Override
    public void onInitialize() {
        BiomeModifications.addFeature(BiomeSelectors.includeByKey(BiomeKeys.PLAINS, BiomeKeys.MEADOW),
                GenerationStep.Feature.VEGETAL_DECORATION,
                RegistryKey.of(RegistryKeys.PLACED_FEATURE, id("wild_barley")));
        LootTableEvents.MODIFY.register((key, table, source, registries) -> {
            if (source.isBuiltin() && (key.equals(LootTables.VILLAGE_PLAINS_CHEST)
                    || key.equals(LootTables.VILLAGE_DESERT_HOUSE_CHEST)
                    || key.equals(LootTables.VILLAGE_TAIGA_HOUSE_CHEST)
                    || key.equals(LootTables.VILLAGE_SNOWY_HOUSE_CHEST)
                    || key.equals(LootTables.VILLAGE_SAVANNA_HOUSE_CHEST))) {
                table.pool(LootPool.builder().with(ItemEntry.builder(BARLEY_SEEDS))
                        .conditionally(RandomChanceLootCondition.builder(0.35f)));
                table.pool(LootPool.builder().with(ItemEntry.builder(CABBAGE_SEEDS))
                        .conditionally(RandomChanceLootCondition.builder(0.35f)));
            }
        });
        RegistryKey<ItemGroup> foodGroup = RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.of("minecraft", "food_and_drinks"));
        ItemGroupEvents.modifyEntriesEvent(foodGroup).register(entries -> {
            entries.add(CABBAGE); entries.add(BARLEY_BREAD); entries.add(CABBAGE_STEW);
            entries.add(ROASTED_CABBAGE); entries.add(MEAT_PIE); entries.add(BERRY_TART);
            entries.add(APPLE_CIDER); entries.add(HONEY_TEA);
        });
        RegistryKey<ItemGroup> ingredients = RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.of("minecraft", "ingredients"));
        ItemGroupEvents.modifyEntriesEvent(ingredients).register(entries -> {
            entries.add(BARLEY_SEEDS); entries.add(CABBAGE_SEEDS); entries.add(BARLEY); entries.add(BARLEY_FLOUR);
        });
    }

    private static final class RusticCrop extends CropBlock {
        private final boolean barley;
        private RusticCrop(AbstractBlock.Settings settings, boolean barley) { super(settings); this.barley = barley; }
        @Override protected ItemConvertible getSeedsItem() { return barley ? BARLEY_SEEDS : CABBAGE_SEEDS; }
    }

    private static final class WildBarley extends PlantBlock {
        private static final MapCodec<WildBarley> CODEC = createCodec(WildBarley::new);
        private WildBarley(AbstractBlock.Settings settings) { super(settings); }
        @Override protected MapCodec<? extends PlantBlock> getCodec() { return CODEC; }
    }
}