From 013d030c87e65b14de025c13128ae7480f5748a3 Mon Sep 17 00:00:00 2001
From: Tschipcraft <78470530+Tschipcraft@users.noreply.github.com>
Date: Sun, 3 Sep 2023 17:48:17 +0200
Subject: [PATCH] Final changes for v1.5
- Updated GitHub workflow
- Added global /function #tschipcraft:menu command
---
.github/workflows/cd.yml | 44 ++++++++++++++-----
README.md | 9 ++--
.../functions/settings/core.mcfunction | 1 -
data/tschipcraft/functions/menu.mcfunction | 4 ++
data/tschipcraft/tags/functions/menu.json | 6 +++
wiki/menu.svg | 35 ++++-----------
wiki/settings.svg | 44 +++++++------------
7 files changed, 72 insertions(+), 71 deletions(-)
create mode 100644 data/tschipcraft/functions/menu.mcfunction
create mode 100644 data/tschipcraft/tags/functions/menu.json
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index c5b7302..12f813e 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -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
@@ -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'
@@ -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
diff --git a/README.md b/README.md
index bb86da6..08f88a5 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
-> A data pack for Minecraft 1.14x-1.20x
+> A data pack/mod for Minecraft 1.14x-1.20x
YouTube showcase
@@ -21,11 +21,12 @@
## 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)
@@ -33,6 +34,8 @@ Zombies, Husks, Drowned, Skeletons, Strays, Wither Skeletons, Mooshrooms, Piglin
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!
@@ -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.
diff --git a/data/more_mobs/functions/settings/core.mcfunction b/data/more_mobs/functions/settings/core.mcfunction
index d13c2f4..6d916c6 100644
--- a/data/more_mobs/functions/settings/core.mcfunction
+++ b/data/more_mobs/functions/settings/core.mcfunction
@@ -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."}]}}]
diff --git a/data/tschipcraft/functions/menu.mcfunction b/data/tschipcraft/functions/menu.mcfunction
new file mode 100644
index 0000000..93a17ce
--- /dev/null
+++ b/data/tschipcraft/functions/menu.mcfunction
@@ -0,0 +1,4 @@
+##by Tschipcraft
+
+scoreboard players set @s tschipcraft.menu 1
+function more_mobs:settings/hide_feedback/main
diff --git a/data/tschipcraft/tags/functions/menu.json b/data/tschipcraft/tags/functions/menu.json
new file mode 100644
index 0000000..84e3739
--- /dev/null
+++ b/data/tschipcraft/tags/functions/menu.json
@@ -0,0 +1,6 @@
+{
+ "replace": false,
+ "values": [
+ "tschipcraft:menu"
+ ]
+}
diff --git a/wiki/menu.svg b/wiki/menu.svg
index e4b793d..ee05774 100644
--- a/wiki/menu.svg
+++ b/wiki/menu.svg
@@ -1,42 +1,23 @@
-