ResourceType.template was filled in the enum constructor, which can run before ItemTemplate.templates is loaded, leaving it null. lootBuilding was its only reader and threw on the first non-gold resource. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>