MUYUTwilighter / Croparia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction to this mod

Licenses

This is an forked project from Dalarion's Croparia v4.5, this mod page is set up to provide download sources for modpack authors and players.

Following GNU license, this project has provided a share for the original author, and this page would get closed if the original author opposes this.

Features

Most features in Dalarion's Croparia v4.5 are reserved.

You can only choose ONE installation between Croparia and Croparia-IF

This mod add a lot of features upon the original croparia that benefits modpack authors by offering extra customization.

Including:

  • The drops of the crop block is generated by loot tables, not hard-coded.
  • Auto-gen default textures and models for items & block.
  • Recipes of crop seeds can be replaced by datapack. (The original project would overwrite the recipes in datapacks)
  • Auto generate recipes for botany pots
  • Auto generate recipes converting fruits to resources on crafting table (Double reload might be needed)

Customization

Add custom seeds

To add custom seeds (for example, an end_stone seed), you need to create a json file in <GameDir>/crops/<fileName>.json, following formats below

{
    "name": "end_stone",
    "tier": 3,
    "tag": "c:end_stones",
    "color": "0xE28248"
}
  • name: name of the crop&seed, you'd better follow Identifier Formats but leave spacename empty.
  • tier: tier of the croparia seeds to craft the seed you're defining
  • tag: tag of the item the crop would grow, you may need to create your own tag by datapack in case the item you want do not have proper tags
  • color: base color for items&blocks textures, this mod will automatically generate corresponding textures and you can create your own textures following tutorials below.

Modify data files(recipes, loot tables, etc.) of a specific crop

To modify data files of this mod, simply replace the original data file by creating a new datapack.

The namespace should be "croparia".

You should always follow the auto generated files in config directory as prior tutorial.

Seed recipe

New seed recipe should be located in path <yourDataPackName>/data/croparia/recipes/seed_crop_<CropName>.json

Generally, as long as the json file you create is literally valid, the recipe will be modified. This means you do not have to strictly following recipe type of the original recipe.

Below is the original recipe for aluminum seeds, details can be seen in Minecraft wiki

{
    "type": "minecraft:crafting_shaped",
    "category": "misc",
    "key": {
        "P": {
            "tag": "c:aluminum_ingots"
        },
        "I": {
            "item": "minecraft:wheat_seeds"
        },
        "D": {
            "item": "croparia:croparia4"
        }
    },
    "pattern": [
        "PIP",
        "IDI",
        "PIP"
    ],
    "result": {
        "item": "croparia:seed_crop_aluminum"
    }
}

Botany pot recipe

New botany pot recipe should be located in path <yourDataPackName>/data/botanypots/recipes/croparia/seed/<CropName>.json

An example of a acacia seeds for botany pot recipe, details can be seen in Botany Pots

{
    "fabric:load_conditions": [
        {
            "condition": "fabric:all_mod_loaded",
            "values": [
                "botanypots"
            ]
        }
    ],
    "type": "botanypots:crop",
    "seed": {
        "item": "croparia:seed_crop_acacia"
    },
    "categories": [
        "dirt",
        "farmland"
    ],
    "growthTicks": 1200,
    "display": {
        "type": "botanypots:aging",
        "block": "croparia:block_crop_acacia"
    },
    "drops": [
        {
            "chance": 1.00,
            "output": {
                "item": "croparia:fruit_acacia"
            }
        },
        {
            "chance": 0.01,
            "output": {
                "item": "croparia:seed_crop_acacia"
            }
        }
    ]
}

Loot tables

You can modify the drops of crop blocks by creating datapack and replace the original loot tables.

New loot table of a specified crop should be located in path "/data/croparia/recipes/block_crop_.json"

An example of acacia seed loot table, details can be seen in Minecraft wiki

{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "croparia:seed_crop_acacia"
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "conditions": [
            {
              "block": "croparia:block_crop_acacia",
              "condition": "minecraft:block_state_property",
              "properties": {
                "age": "7"
              }
            }
          ],
          "name": "croparia:fruit_acacia"
        }
      ]
    }
  ]
}

Fruit-to-resource recipe

Once started your game and entered the world, this content will be auto generated in config directory.

See .../data/croparia/recipes/crafting/resource for detail.

Textures & models

Once started your game (entering world is not required), this content will be auto generated in config directory.

See .../assets/croparia for detail.

Following tutorials in original project is OK.

Config

Config directory is located at GAME_DIR/config/croparia. Modifiable config file is config.json.

WARNING: Auto-generated files is also located here, you can view them as the best tutorial of this mod but you should NEVER Modify them.

Config file will always be auto reloaded when using

Property

  • fruitUse: enable conversion from fruit to resource by using the fruit item, default: true.
  • postDataGen: enable post-generation of data pack files like recipes in config directory, default: true.

About

License:Other


Languages

Language:Java 99.8%Language:Python 0.2%