From 60956d254b4f309a2b974513cf1ffebb4c27adb8 Mon Sep 17 00:00:00 2001 From: AXOLOTsh <96595812+AXOLOTsh@users.noreply.github.com> Date: Mon, 8 Jun 2026 02:20:15 +0300 Subject: [PATCH] initial commit --- .github/workflows/release.yml | 100 +++++++ .gitignore | 2 + .../loot_table/gameplay/piglin_bartering.json | 268 ++++++++++++++++++ .../advancement/guide/enchantments.json | 23 ++ .../advancement/guide/thrust.json | 23 ++ .../more_enchantments/enchantment/thrust.json | 39 +++ pack.mcmeta | 13 + 7 files changed, 468 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .gitignore create mode 100644 data/minecraft/loot_table/gameplay/piglin_bartering.json create mode 100644 data/more_enchantments/advancement/guide/enchantments.json create mode 100644 data/more_enchantments/advancement/guide/thrust.json create mode 100644 data/more_enchantments/enchantment/thrust.json create mode 100644 pack.mcmeta diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d47baa0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,100 @@ +name: Publish Release + +on: + release: + types: [published] + +env: + # --- GLOBAL OVERRIDES --- + # Modify these variables to override default GitHub context values + PROJECT_NAME: ${{ github.event.repository.name }} + RELEASE_TAG: ${{ github.ref_name }} + RELEASE_BODY: ${{ github.event.release.body }} + COMMIT_URL: gitea.cheppyjam.ru/${{ github.repository }}/commit # overrode: ${{ github.server_url }} + CHANGELOG_FILE: "changelog.md" + # ------------------------ + +jobs: + build-and-release: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Configure Outputs + id: config + run: | + VERSION=${RELEASE_TAG#v} + echo "version=$VERSION" >> $GITHUB_OUTPUT + + echo "ARCHIVE_NAME=${PROJECT_NAME}-v${VERSION}.zip" >> $GITHUB_ENV + + - name: Generate Changelog + id: changelog + run: | + git fetch --prune --unshallow --tags || git fetch --tags + + echo "# Release Notes" > $CHANGELOG_FILE + echo "" >> $CHANGELOG_FILE + + if [ ! -z "$RELEASE_BODY" ]; then + echo "$RELEASE_BODY" >> $CHANGELOG_FILE + echo "" >> $CHANGELOG_FILE + fi + + echo "## Changelog" >> $CHANGELOG_FILE + echo "" >> $CHANGELOG_FILE + + PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "") + + if [ -z "$PREVIOUS_TAG" ]; then + LOG_RANGE="${RELEASE_TAG}" + echo "This is the first release." >> $CHANGELOG_FILE + else + LOG_RANGE="${PREVIOUS_TAG}..${RELEASE_TAG}" + fi + + FORMAT_STR="* %s ([\`%h\`]($COMMIT_URL/%H))" + + FEATS=$(git log $LOG_RANGE --grep="^feat" --pretty=format:"$FORMAT_STR" || true) + if [ ! -z "$FEATS" ]; then + echo "### New Features" >> $CHANGELOG_FILE + echo "$FEATS" >> $CHANGELOG_FILE + echo "" >> $CHANGELOG_FILE + fi + + FIXES=$(git log $LOG_RANGE --grep="^fix" --pretty=format:"$FORMAT_STR" || true) + if [ ! -z "$FIXES" ]; then + echo "### Bug Fixes" >> $CHANGELOG_FILE + echo "$FIXES" >> $CHANGELOG_FILE + echo "" >> $CHANGELOG_FILE + fi + + MAINTENANCE=$(git log $LOG_RANGE --grep="^chore\|^refactor\|^perf\|^style" --pretty=format:"$FORMAT_STR" || true) + if [ ! -z "$MAINTENANCE" ]; then + echo "### Maintenance" >> $CHANGELOG_FILE + echo "$MAINTENANCE" >> $CHANGELOG_FILE + echo "" >> $CHANGELOG_FILE + fi + + - name: Create Archive + run: | + git archive --format zip --output ${{ env.ARCHIVE_NAME }} HEAD \ + ':(exclude).github/' \ + ':(exclude).git/' \ + ':(exclude).gitignore' + + - name: Update Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.RELEASE_TAG }} + name: "${{ env.PROJECT_NAME }} ${{ env.RELEASE_TAG }}" + body_path: ${{ env.CHANGELOG_FILE }} + files: ${{ env.ARCHIVE_NAME }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d1315b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.code-workspace +*.zip \ No newline at end of file diff --git a/data/minecraft/loot_table/gameplay/piglin_bartering.json b/data/minecraft/loot_table/gameplay/piglin_bartering.json new file mode 100644 index 0000000..c01af14 --- /dev/null +++ b/data/minecraft/loot_table/gameplay/piglin_bartering.json @@ -0,0 +1,268 @@ +{ + "type": "minecraft:barter", + "pools": [ + { + "bonus_rolls": 0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:enchant_randomly", + "options": [ + "minecraft:soul_speed", + "more_enchantments:thrust" + ] + } + ], + "name": "minecraft:book", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:enchant_randomly", + "options": "minecraft:soul_speed" + } + ], + "name": "minecraft:iron_boots", + "weight": 8 + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_potion", + "id": "minecraft:fire_resistance" + } + ], + "name": "minecraft:potion", + "weight": 8 + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_potion", + "id": "minecraft:fire_resistance" + } + ], + "name": "minecraft:splash_potion", + "weight": 8 + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_potion", + "id": "minecraft:water" + } + ], + "name": "minecraft:potion", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 36, + "min": 10 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:iron_nugget", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4, + "min": 2 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:ender_pearl", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": 1, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:dried_ghast", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 9, + "min": 3 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:string", + "weight": 20 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 12, + "min": 5 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:quartz", + "weight": 20 + }, + { + "type": "minecraft:item", + "name": "minecraft:obsidian", + "weight": 40 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 3, + "min": 1 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:crying_obsidian", + "weight": 40 + }, + { + "type": "minecraft:item", + "name": "minecraft:fire_charge", + "weight": 40 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4, + "min": 2 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:leather", + "weight": 40 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 8, + "min": 2 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:soul_sand", + "weight": 40 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 8, + "min": 2 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:nether_brick", + "weight": 40 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 12, + "min": 6 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:spectral_arrow", + "weight": 40 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 16, + "min": 8 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:gravel", + "weight": 40 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 16, + "min": 8 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:blackstone", + "weight": 40 + } + ], + "rolls": 1 + } + ], + "random_sequence": "minecraft:gameplay/piglin_bartering" +} \ No newline at end of file diff --git a/data/more_enchantments/advancement/guide/enchantments.json b/data/more_enchantments/advancement/guide/enchantments.json new file mode 100644 index 0000000..7d87ed0 --- /dev/null +++ b/data/more_enchantments/advancement/guide/enchantments.json @@ -0,0 +1,23 @@ +{ + "parent": "guide:root", + "criteria": { + "Tick": { + "trigger": "minecraft:tick" + } + }, + "display": { + "announce_to_chat": false, + "description": { + "translate": "advancement.guide.enchantments.description", + "fallback": "На сервере есть несколько уникальных чар." + }, + "icon": { + "count": 1, + "id": "minecraft:enchanted_book" + }, + "title": { + "translate": "advancement.guide.enchantments.title", + "fallback": "Чары" + } + } +} \ No newline at end of file diff --git a/data/more_enchantments/advancement/guide/thrust.json b/data/more_enchantments/advancement/guide/thrust.json new file mode 100644 index 0000000..437e3b1 --- /dev/null +++ b/data/more_enchantments/advancement/guide/thrust.json @@ -0,0 +1,23 @@ +{ + "parent": "more_enchantments:guide/enchantments", + "criteria": { + "Tick": { + "trigger": "minecraft:tick" + } + }, + "display": { + "announce_to_chat": false, + "description": { + "translate": "advancement.guide.enchantments.thrust.description", + "fallback": "Чары «Тяга» можно применить к упряжке. Дружелюбный гаст, экипированный зачарованной упряжью, будет летать быстрее. Это зачарование можно выторговать у Пиглинов." + }, + "icon": { + "count": 1, + "id": "minecraft:blue_harness" + }, + "title": { + "translate": "advancement.guide.enchantments.thrust.title", + "fallback": "Тяга" + } + } +} \ No newline at end of file diff --git a/data/more_enchantments/enchantment/thrust.json b/data/more_enchantments/enchantment/thrust.json new file mode 100644 index 0000000..0508be3 --- /dev/null +++ b/data/more_enchantments/enchantment/thrust.json @@ -0,0 +1,39 @@ +{ + "anvil_cost": 1, + "description": { + "translate": "more_enchantments.enchantment.thrust.description", + "fallback": "Тяга" + }, + "effects": { + "minecraft:attributes": [ + { + "amount": { + "type": "minecraft:lookup", + "values": [ + 0.005, + 0.02, + 0.04 + ], + "fallback": 0.01 + }, + "attribute": "minecraft:flying_speed", + "id": "more_enchantments:enchantment.trust", + "operation": "add_value" + } + ] + }, + "max_cost": { + "base": 51, + "per_level_above_first": 10 + }, + "max_level": 3, + "min_cost": { + "base": 1, + "per_level_above_first": 10 + }, + "slots": [ + "body" + ], + "supported_items": "#minecraft:harnesses", + "weight": 10 +} \ No newline at end of file diff --git a/pack.mcmeta b/pack.mcmeta new file mode 100644 index 0000000..f8c9c0d --- /dev/null +++ b/pack.mcmeta @@ -0,0 +1,13 @@ +{ + "pack": { + "description": "more-enchantments", + "min_format": [ + 101, + 1 + ], + "max_format": [ + 101, + 1 + ] + } +} \ No newline at end of file