Skip to content

Commit

Permalink
Add legacy datapack
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenBagTwo committed Dec 25, 2023
1 parent 169e697 commit 4e3f553
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Desc: Periodically calls the various item-replacing functions
#
# Called by: #minecraft:load

execute at @p positioned ^ ^1 ^1 if block ~ ~ ~ minecraft:brewing_stand{CustomName:'{"text":"Hairo V60"}'} run function chappeau:caffeinate
execute at @p positioned ^ ^2 ^1 if block ~ ~ ~ minecraft:brewing_stand{CustomName:'{"text":"Hairo V60"}'} run function chappeau:caffeinate
execute at @p positioned ^ ^2 ^2 if block ~ ~ ~ minecraft:brewing_stand{CustomName:'{"text":"Hairo V60"}'} run function chappeau:caffeinate
execute at @p positioned ^ ^1 ^1 if block ~ ~ ~ minecraft:brewing_stand{CustomName:'{"text":"Chemex"}'} run function chappeau:caffeinate
execute at @p positioned ^ ^2 ^1 if block ~ ~ ~ minecraft:brewing_stand{CustomName:'{"text":"Chemex"}'} run function chappeau:caffeinate
execute at @p positioned ^ ^2 ^2 if block ~ ~ ~ minecraft:brewing_stand{CustomName:'{"text":"Chemex"}'} run function chappeau:caffeinate

execute at @e[type=minecraft:glow_item_frame] if block ~ ~1 ~ minecraft:hopper{CustomName:'{"text":"Enderman 3 Pro"}'} run function chappeau:legacy_print

schedule function chappeau:second 1s
6 changes: 6 additions & 0 deletions Chappeau Datapack (Legacy)/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"pack": {
"pack_format": 10,
"description": [{"text":"OpenBagTwo's Custom Items","color":"gold"}]
}
}
5 changes: 4 additions & 1 deletion Chappeau Resourcepack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ Command to Obtain: `/give @s minecraft:poisonous_potato{CustomModelData:1}`

## Datapack (Optional)

This repo also contains a **datapack** for obtaining these items in survival.
Matching **datapacks** are available to enable obtaining these items in survival.

- Use the "Chappeau Datapack" for Minecraft 1.20.3 and above
- Use the "Chappeau Datapack (Legacy)" version for Minecraft 1.20.1 and below

### Coffee and Espresso

Expand Down
24 changes: 21 additions & 3 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,35 @@ for pack in *; do
if [ "$pack" = "release" ]; then
continue
fi


if [[ "$pack" == *"(Legacy)" ]]; then
base_pack="${pack% (Legacy)}"
else
base_pack="$pack"
fi

echo Compressing $pack
(cd "$pack" && zip -rq ../release/"$pack $version".zip *)
(
cd "$base_pack"
zip -rq ../release/"$pack $version".zip *
if [[ "$pack" == *"(Legacy)" ]]; then
(
cd ../"$pack"
for fp in $(find . -type f); do
zip -u ../release/"$pack $version".zip $fp
done
)
fi
)
echo Created release/"$pack $version".zip
done

(
cd release
rpdp="Chappeau Resourcepack $version (Datapack Inside).zip"
rpdp="Chappeau Resourcepack $version (Datapacks Inside).zip"
echo Creating combo resource / data pack
cp "Chappeau Resourcepack $version.zip" "$rpdp"
zip -uq "$rpdp" "Chappeau Datapack $version.zip"
zip -uq "$rpdp" "Chappeau Datapack (Legacy) $version.zip"
echo Created release/"$rpdp"
)

0 comments on commit 4e3f553

Please sign in to comment.