From 387ee1ef9bcf4861d48a113436478a368135b772 Mon Sep 17 00:00:00 2001 From: Logan Date: Tue, 6 Oct 2026 18:27:42 -0400 Subject: [PATCH] chore(pack): make config files opt-in and ship a PetProtect default .packwizignore ignored config/ and defaultconfigs/ wholesale. They are now ignored per-entry (config/*) with deliberately authored files re-included at the bottom of the file, so one config can ship without any risk of pulling every runtime-generated config into the index - which matters because this repo doubles as a server directory. Ships config/petprotect.json disabling BOTH pet damage and death protection. PetProtect's isInvulnerableTo mixin gates on prevent_pet_damage alone, so disabling prevent_pet_death by itself leaves pets invulnerable to nearly all damage and Pet Cemetery's death -> collar -> respawn loop still never fires. prevent_pet_attack remains true, so pets are not provoked into fights. Without this file the two mods cancel each other: PetProtect's defaults keep pets immortal, so Pet Cemetery is dead weight. The config installs on clients as well as the server; that is harmless since petprotect itself is side = "server", but packwiz has no per-file side flag for non-metafile entries. --- .packwizignore | 15 ++++++++++++--- config/petprotect.json | 9 +++++++++ index.toml | 6 +++++- pack.toml | 2 +- 4 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 config/petprotect.json diff --git a/.packwizignore b/.packwizignore index a832a8e..615c79e 100644 --- a/.packwizignore +++ b/.packwizignore @@ -11,10 +11,13 @@ run.sh *.jar *.jar.log run.bat -# Server/runtime config is never tracked. -config/ +# Server/runtime config is opt-in. Everything under these directories is +# ignored; deliberately authored defaults are re-included at the bottom of +# this file. This repo doubles as a server directory, so a blanket un-ignore +# here would pull every runtime-generated config into the index. +config/* +defaultconfigs/* kubejs/ -defaultconfigs/ local/ # Authoring/review material - belongs in the repo, never in the pack @@ -40,3 +43,9 @@ cache/ sp-world/ *.tar.gz *.tgz + +# --- Shipped config defaults ---------------------------------------------- +# These must come AFTER every ignore above (last matching pattern wins), +# including the blanket "*.json" in the authoring section. Re-include only +# files we deliberately author and want enforced on install. +!config/petprotect.json diff --git a/config/petprotect.json b/config/petprotect.json new file mode 100644 index 0000000..5349a2d --- /dev/null +++ b/config/petprotect.json @@ -0,0 +1,9 @@ +{ + "prevent_pet_damage": false, + "only_prevent_players": false, + "prevent_pet_death": false, + "apply_totem_effects": false, + "prevent_pet_attack": true, + "allow_owner_damage": false, + "ignore_creative": true +} diff --git a/index.toml b/index.toml index 4976553..7f9ab8a 100644 --- a/index.toml +++ b/index.toml @@ -1,5 +1,9 @@ hash-format = "sha256" +[[files]] +file = "config/petprotect.json" +hash = "de9aefb0a05ee60c880c4c3d51e06d00f1a63b50b686ea740a70979323854637" + [[files]] file = "mods/3dskinlayers.pw.toml" hash = "b3b67f83faf9dcc4985b7a13fa8affb71062461d271f80cc0958652df9f3126b" @@ -712,7 +716,7 @@ metafile = true [[files]] file = "mods/petprotect.pw.toml" -hash = "09a0d9dbcec314df123a10cd560d70126365c0f15c9316376035f7f773aa7703" +hash = "97363bf59db02a5975f62231de661903ae9d8f0f9a1562825c38ad195d07ed80" metafile = true [[files]] diff --git a/pack.toml b/pack.toml index 504c397..ed4da40 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "8777e7fc3042b6fed9025bd5af4846c49f4a208cabe06dc5a8ea7b0e15c3f8d5" +hash = "29cee97f1dd3e093e11e3e565cbf11dd1ddc6203a82e7e81b93016e601fa9989" [versions] minecraft = "1.21.1"