Skip to content

Commit

Permalink
Final changes for v1.5
Browse files Browse the repository at this point in the history
- Updated GitHub workflow
- Added global /function #tschipcraft:menu command
  • Loading branch information
Tschipcraft committed Sep 3, 2023
1 parent 37fcfba commit 013d030
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 71 deletions.
44 changes: 32 additions & 12 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "${file_name}"
replace: ${{ github.event.repository.name }}-${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip
replace: ${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip
regex: false
include: "**uninstall.mcfunction"
- name: Find and replace data pack version
Expand All @@ -34,23 +34,33 @@ jobs:
replace: ${{ github.event.inputs.tag }}
regex: false

# Check for existence of datapack and/or resourcepack folders.
# Check for existence of datapack, mod and/or resourcepack folders.
- name: Check for data folder
id: check_datapack_folder
uses: andstor/file-existence-action@v2
with:
files: "data"
- name: Check for assets folder
- name: Check for mod folders
id: check_mod_folder
uses: andstor/file-existence-action@v2
with:
files: "META-INF, net, fabric.mod.json, assets"
- name: Check for resource pack folder
id: check_assets_folder
uses: andstor/file-existence-action@v2
with:
files: "assets"
files: "assets/minecraft"

- name: Create data pack zip file
uses: montudor/action-zip@v1
if: steps.check_datapack_folder.outputs.files_exists == 'true'
with:
args: zip -qq datapack.zip -r data pack.mcmeta pack.png LICENSE README.md
- name: Create mod jar file
uses: montudor/action-zip@v1
if: steps.check_mod_folder.outputs.files_exists == 'true'
with:
args: zip -qq mod.zip -r data assets META-INF net fabric.mod.json pack.mcmeta pack.png LICENSE README.md
- name: Create asset pack zip file
uses: montudor/action-zip@v1
if: steps.check_assets_folder.outputs.files_exists == 'true'
Expand All @@ -68,23 +78,33 @@ jobs:
draft: false
prerelease: false

- name: Upload assetpack release asset
- name: Upload datapack release asset
uses: actions/upload-release-asset@v1
if: steps.check_assets_folder.outputs.files_exists == 'true'
if: steps.check_datapack_folder.outputs.files_exists == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./assetpack.zip
asset_name: ${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-resourcepack.zip
asset_path: ./datapack.zip
asset_name: ${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip
asset_content_type: application/zip
- name: Upload datapack release asset
- name: Upload mod release asset
uses: actions/upload-release-asset@v1
if: steps.check_datapack_folder.outputs.files_exists == 'true'
if: steps.check_mod_folder.outputs.files_exists == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./datapack.zip
asset_name: ${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip
asset_path: ./mod.zip
asset_name: ${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar
asset_content_type: application/jar
- name: Upload assetpack release asset
uses: actions/upload-release-asset@v1
if: steps.check_assets_folder.outputs.files_exists == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./assetpack.zip
asset_name: ${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-resourcepack.zip
asset_content_type: application/zip
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a href="https://github.com/Tschipcraft/more_mobs/releases/latest"><img src="https://img.shields.io/github/downloads/Tschipcraft/more_mobs/total?logo=github&colorA=1b1b29&colorB=bd5216&style=for-the-badge"></a>
</p>

> A data pack for Minecraft 1.14x-1.20x
> A data pack/mod for Minecraft 1.14x-1.20x
<details>
<summary>YouTube showcase</summary>
Expand All @@ -21,18 +21,21 @@
## Features

Mobs have new variants through custom heads or through hidden vanilla mobs! This pack uses **over 85 custom player heads** which can be obtained and placed in your world.
No Resource pack needed!

**Supported Entities:**
Zombies, Husks, Drowned, Skeletons, Strays, Wither Skeletons, Mooshrooms, Piglins, Pillagers, Evokers and Vindicators

This data pack/mod is completely server-side, but can also be installed on the client for singleplayer worlds! No resource pack needed!

[➜ For all added heads, available settings and customization, take a look at the wiki](https://github.com/Tschipcraft/more_mobs/wiki)


## Installation

Download the latest release from [here](https://github.com/Tschipcraft/more_mobs/releases/latest) and put the data pack .zip file into the `datapacks` folder of your Minecraft world.

This data pack is also available as a mod with an additional global settings menu when installed alongside [MidnightLib](https://modrinth.com/mod/midnightlib). Download the latest release and put the mod .jar file into your `.minecraft/mods` folder.

Also available on Modrinth and CurseForge!

<a href="https://modrinth.com/datapack/more-mobs">
Expand All @@ -53,4 +56,4 @@ Also available on Modrinth and CurseForge!

## Manage

To check for updates use `/trigger tschipcraft.menu` and hit the Check for Updates button. There is also a **Reset** and an **Uninstall** button.
To check for updates execute `/trigger tschipcraft.menu` or `/function #tschipcraft:menu` and hit the Check for Updates button. There is also a **Reset** and an **Uninstall** button.
1 change: 0 additions & 1 deletion data/more_mobs/functions/settings/core.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ execute if score $enable_heads ts.mm.settings matches 1..2 if score $head_drops
execute if score $enable_heads ts.mm.settings matches 1..2 if score $head_drops ts.mm.settings matches 2 run tellraw @s [{"text":" └Drop Custom Heads [on]","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
execute if score $enable_heads ts.mm.settings matches -1..0 run tellraw @s [{"text": "","color":"gray"},{"text":"Drop Custom Heads","bold":false},{"text":" \u0020 "},{"text":"[on]"},{"text":" \u0020| \u0020"},{"text":"[off]"}]


execute if score $loot ts.mm.settings matches 1 run tellraw @s ["",{"text":"Add additional loot to some mobs","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"This includes for example low value tools and low value fishing loot."}]}},{"text":" \u0020 "},{"text":"[on]","bold":true,"color":"green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/additional_loot/enable"}},{"text":" \u0020| \u0020"},{"text":"[off]","color":"dark_red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/additional_loot/disable"}}]
execute if score $loot ts.mm.settings matches 0 run tellraw @s ["",{"text":"Add additional loot to some mobs","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"This includes for example low value tools and low value fishing loot."}]}},{"text":" \u0020 "},{"text":"[on]","color":"dark_green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/additional_loot/enable"}},{"text":" \u0020| \u0020"},{"text":"[off]","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/additional_loot/disable"}}]
execute if score $loot ts.mm.settings matches -1 run tellraw @s [{"text":"Add additional loot to some mobs [off]","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
Expand Down
4 changes: 4 additions & 0 deletions data/tschipcraft/functions/menu.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
##by Tschipcraft

scoreboard players set @s tschipcraft.menu 1
function more_mobs:settings/hide_feedback/main
6 changes: 6 additions & 0 deletions data/tschipcraft/tags/functions/menu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"tschipcraft:menu"
]
}
35 changes: 8 additions & 27 deletions wiki/menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 16 additions & 28 deletions wiki/settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 013d030

Please sign in to comment.