PHAYRIOSIS REBORN CONTINUED — METEOR / IN CONTROL COMPATIBILITY
Author: leo_san
Build: existing mod metadata version 0.1.2 preserved at user request
Minecraft: 1.20.1; Forge 47.4.x; Java runtime: 17
2026-10-11 — Meteor-only In Control spawn exemption patch

BASELINE / REFERENCE
- Input: phayriosis-reborn-continued-0.1.2(5).jar (the user-confirmed latest Phayriosis build).
- Reference: Spore-Meteor-Compat-0.1.8-TEST(1).jar, which carries the known meteor-origin gating approach.
- Target In Control: incontrol-1.20-9.4.6(3).jar. Exact method names/descriptors inspected.
- User spawn.json has day gates in ONJOIN and changes in FINALIZE, plus possible POSITION rules.

IMPLEMENTATION
1. Target only the private PhayriosisMeteorImpactSystem.spawnEntity helper, which both the
   meteor's impact infected wave and nucleus chamber guardian use. Replace its sole
   EntityType.spawn invocation with MeteorSpawnScope.spawn preserving exact arguments.
2. Adapt Spore's MeteorSpawnScope mechanism: push the expected EntityType onto
   thread-local ArrayDeque; register HIGHEST-priority Forge spawn observers that
   apply the persistent Boolean 'phayriosisreborn:meteor_spawned_v1' to the expected
   entity during PositionCheck, FinalizeSpawn, and EntityJoinLevelEvent, BEFORE
   In Control can evaluate its restrictive handlers. The temporary scope is popped
   in finally behavior; the successful spawned entity is marked as fallback.
3. Inject a narrow, optional Mixin targeting only the In Control class
   mcjty.incontrol.ForgeEventHandlers with remap=false. If marked, return EARLY
   from onEntityJoinWorld(EntityJoinLevelEvent),
   onEntitySpawnEvent(MobSpawnEvent.FinalizeSpawn), and
   onPositionCheck(MobSpawnEvent.PositionCheck).
   Do NOT cancel the underlying Forge event; cancel only In Control's handler method.
   No global suppression of In Control's other rules, bookkeeping, despawn events, etc.
4. Register the scope observer in PhayriosisrebornMod's existing initialization;
   enable only the new optional Mixin configuration via manifest MixinConfigs.
   In Control is NOT declared as a required mod dependency. Existing mixin config
   resources are preserved unmodified.
5. Do not stamp the meteor projectile, worldgen meteors, natural Phayriosis mobs,
   conversion-generated infected, or manual /summon entities. Other Phayriosis
   spawn paths are NOT wrapped or exempted.

CHANGED JAR MEMBERS
- net/mcreator/phayriosisreborn/PhayriosisrebornMod.class
- net/mcreator/phayriosisreborn/meteor/PhayriosisMeteorImpactSystem.class
- META-INF/MANIFEST.MF
- Added net/mcreator/phayriosisreborn/meteor/MeteorSpawnScope.class
- Added net/mcreator/phayriosisreborn/mixin/InControlMeteorBypassMixin.class
- Added phayriosisreborn.meteor-incontrol.mixins.json
- Updated PHAYRIOSIS_REBORN_CONTINUED_MAINTAINER_HISTORY.txt (append-only)
- Added this text file

CHECKS / STATUS
- Checked exact In Control 9.4.6 method descriptors and @SubscribeEvent event priorities.
- Ensured In Control's onEntityJoinWorldLast bookkeeping is untouched.
- Offline checks: compare unchanged JAR entry SHA256s, Java 17 bytecode major version,
  class annotation visibility, Mixin config + manifest registration, ZIP integrity.
- NOT YET validated inside running Forge: optional absence of In Control, full meteor
  event, world save/reload, gameplay interaction, and other mods' spawn hooks.
- If any MixinApplyError occurs, review actual exception, Mixin @Mixin annotation
  visibility (must be RuntimeInvisibleAnnotations), target names and Method descriptors
  before making further modifications. Keep previous successful features intact.

KNOWN CONSTRAINTS
- Marker is a normal persistent entity Boolean, not cryptographic authentication.
- A nested same-type spawn triggered synchronously inside an active meteor spawn
  event could inherit the marker (same limitation as reference Spore implementation).
- Scope markers do not follow offspring or entities spawned later through independent
  parasite behavior, which is intentional: only direct meteor impact creations bypass.
- A rule from other mods (not In Control) may still deny spawns; these are not modified.
