Authentic Z - Duplicate Registration Fix
Fixes the duplicate body location registration crash that prevents clients from joining servers when both Authentic Z - Current and Authentic Z - Backpacks+ are enabled.
Problem
Both mods register the same body locations:
- AZ:TorsoRigPlus2
- AZ:TorsoExtraPlus1
When a client connects to a server, Core.ResetLua runs mod registries again. The second registration throws:
java.lang.IllegalArgumentException: Tried to register duplicate object: az:torsorigplus2 in: item_body_location
This can break server connections or crash mod initialization.
Fix
Wraps ItemBodyLocation.register in pcall so duplicate registrations are silently ignored.
- Both mods continue to work normally
- No body location functionality is lost (the first registration is kept)
- Only "duplicate" errors are suppressed; other errors are still logged
Requirements
- Authentic Z - Current
- Authentic Z - Backpacks+
Developed by $J
Workshop ID: 3712571282
Mod ID: AuthenticZ_Fix