JujutsuCraft Persistent Crash Fix 1.0.1
Minecraft 1.20.1 / Forge 47.x / JujutsuCraft 50-50.1

Purpose
-------
Fixes the persistent crash where JujutsuCraft's CompletedAdvancementProcedure accesses
JujutsucraftModVariables.PlayerVariables after the capability returned null, for example:

  Cannot read field "PlayerLevel" because "pVars" is null
  at net.mcreator.jujutsucraft.procedures.CompletedAdvancementProcedure.execute(...)

How it works
------------
This is a Forge JavaScript coremod. At launch it transforms only
net.mcreator.jujutsucraft.procedures.CompletedAdvancementProcedure.

PlayerVariables field reads/writes inside that procedure are redirected through small
null-safe hooks. When PlayerVariables is null, reads return a harmless default and writes
are ignored instead of crashing the server thread. Non-null accesses preserve the original
field values through reflection.

Install
-------
1. Keep JujutsuCraft-ver50.1-forge-1.20.1.jar installed.
2. Put JujutsuCraft-Persistent-Crash-Fix-1.0.0.jar in the same mods folder.
3. Launch normally.
4. Do not remove your worldgen fix; this patch is independent from world generation.

Scope
-----
This v1 patch deliberately targets only the exact procedure present in the supplied crash
report. If another JujutsuCraft procedure later crashes with the same pVars-null pattern,
that class can be added in a follow-up version.

No JujutsuCraft code or assets are redistributed by this patch.


Attribution
-----------
The mod metadata credits MVQ1303, and when a player first enters a world with this
version installed it displays: [JJC Crash Fix] Made by MVQ1303

The chat credit is implemented as a built-in datapack advancement, so it appears once
per player per world rather than spamming every tick.
