fix(D-01/D): checkup cleanup — 5 issues resolved
1. LockableComponent: remove duplicate "Lockable" tooltip line (ILockable.appendLockTooltip already handles lock status display) 2. ILockable/IHasResistance Javadoc: update @link refs from deleted V1 classes to V2 AbstractV2BondageItem/DataDrivenBondageItem 3. SettingsAccessor Javadoc: remove stale BindVariant @link references 4. DataDrivenBondageItem: update NECK block comment (remove branch ref) 5. Delete empty bondage3d/gags/ directory
This commit is contained in:
107
docs/plans/D01-branch-C-consumer-migration.md
Normal file
107
docs/plans/D01-branch-C-consumer-migration.md
Normal file
@@ -0,0 +1,107 @@
|
||||
# D-01 Branch C : Consumer Migration (~97 fichiers)
|
||||
|
||||
> **Prérequis :** Branch A + B mergées.
|
||||
> **Branche :** `feature/d01-branch-c-migration`
|
||||
> **Objectif :** Remplacer TOUTES les références V1 (`instanceof ItemBind`, `ItemCollar.isOwner()`, `BindVariant.ROPES`, etc.) par les helpers/composants V2. Les classes V1 existent encore mais ne sont plus référencées. À la fin, `grep -r "instanceof ItemBind\|instanceof ItemGag\|instanceof ItemCollar\|instanceof ItemBlindfold\|instanceof ItemEarplugs\|instanceof ItemMittens\|BindVariant\|GagVariant" src/` retourne ZÉRO résultats (hors items/ lui-même).
|
||||
|
||||
---
|
||||
|
||||
## Pattern migration
|
||||
|
||||
| V1 | V2 | Notes |
|
||||
|----|-----|-------|
|
||||
| `instanceof ItemBind` | `BindModeHelper.isBindItem(stack)` | Ou `instanceof IV2BondageItem` si on a juste besoin de savoir que c'est un bondage item |
|
||||
| `ItemBind.hasArmsBound(stack)` | `BindModeHelper.hasArmsBound(stack)` | Mêmes NBT keys |
|
||||
| `ItemBind.hasLegsBound(stack)` | `BindModeHelper.hasLegsBound(stack)` | |
|
||||
| `ItemBind.getBindModeId(stack)` | `BindModeHelper.getBindModeId(stack)` | |
|
||||
| `itemBind.getPoseType()` | `PoseTypeHelper.getPoseType(stack)` | |
|
||||
| `BindVariant.ROPES` / `ModItems.getBind(variant)` | `DataDrivenBondageItem.createStack(rl("tiedup:ropes"))` | **LAZY !** Ne pas appeler dans des static initializers |
|
||||
| `instanceof ItemCollar` + methods | `CollarHelper.isCollar(stack)` + `CollarHelper.method(stack)` | |
|
||||
| `instanceof ItemShockCollar` | `CollarHelper.canShock(stack)` | |
|
||||
| `instanceof ItemGpsCollar` | `CollarHelper.hasGPS(stack)` | |
|
||||
| `instanceof ItemChokeCollar` | `CollarHelper.isChokeCollar(stack)` | |
|
||||
| `instanceof IHasGaggingEffect` | `DataDrivenBondageItem.getComponent(stack, GAGGING, GaggingComponent.class) != null` | Pour V2 items. V1 items gardent l'interface pendant la transition. |
|
||||
| `instanceof IHasBlindingEffect` | `DataDrivenBondageItem.getComponent(stack, BLINDING, BlindingComponent.class) != null` | Idem |
|
||||
| `instanceof ItemGag` + `getGagMaterial()` | `GaggingComponent comp = getComponent(stack, GAGGING, ...)` + `comp.getMaterial()` | |
|
||||
| `PoseType` enum direct | Inchangé — l'enum est conservé | |
|
||||
| `IHasResistance` methods | Inchangé — l'interface est conservée | |
|
||||
| `ILockable` methods | Inchangé — l'interface est conservée | |
|
||||
|
||||
---
|
||||
|
||||
## Ordre de migration (critique d'abord)
|
||||
|
||||
### Phase 1 : State core (12 fichiers)
|
||||
|
||||
Ces fichiers sont la fondation — les migrer d'abord assure que le reste fonctionne.
|
||||
|
||||
| Fichier | Changements |
|
||||
|---------|------------|
|
||||
| `state/IBondageState.java` | `hasArmsBound()`/`hasLegsBound()` → `BindModeHelper` |
|
||||
| `state/PlayerBindState.java` | `instanceof ItemCollar` → `CollarHelper`, `instanceof ItemBind` → `BindModeHelper` |
|
||||
| `state/PlayerCaptorManager.java` | `instanceof ItemCollar` → `CollarHelper.isCollar() + CollarHelper.getOwners()` |
|
||||
| `state/HumanChairHelper.java` | `PoseType` import OK (conservé) |
|
||||
| `state/components/PlayerEquipment.java` | **Garder `equipInRegion()` V1 fallback** (migre en Branch D). Remplacer `instanceof ItemBind/ItemCollar` dans resistance methods. |
|
||||
| `state/components/PlayerDataRetrieval.java` | `instanceof ItemCollar` → `CollarHelper.getNickname()` |
|
||||
| `state/components/PlayerLifecycle.java` | imports V1 → V2 helpers |
|
||||
| `state/components/PlayerShockCollar.java` | `instanceof ItemShockCollar` → `CollarHelper.canShock()` |
|
||||
| `state/struggle/StruggleBinds.java` | Déjà migré en Branch A9 — vérifier |
|
||||
| `state/struggle/StruggleCollar.java` | Déjà migré en Branch A9 — vérifier |
|
||||
| `state/struggle/StruggleAccessory.java` | Vérifier |
|
||||
|
||||
### Phase 2 : Client animation/render (12 fichiers)
|
||||
|
||||
| Fichier | Changements |
|
||||
|---------|------------|
|
||||
| `client/animation/tick/AnimationTickHandler.java` | `instanceof ItemBind` → `PoseTypeHelper.getPoseType()` + `BindModeHelper` |
|
||||
| `client/animation/tick/NpcAnimationTickHandler.java` | Idem |
|
||||
| `client/animation/render/PlayerArmHideEventHandler.java` | `instanceof ItemBind` → `PoseTypeHelper` |
|
||||
| `client/animation/render/DogPoseRenderHandler.java` | Idem |
|
||||
| `client/animation/render/PetBedRenderHandler.java` | Idem |
|
||||
| `client/animation/util/AnimationIdBuilder.java` | `PoseType` import OK (conservé) |
|
||||
| `client/animation/StaticPoseApplier.java` | `PoseType` import OK |
|
||||
| `client/model/DamselModel.java` | `PoseType` + `instanceof ItemBind` → helpers |
|
||||
| `client/FirstPersonMittensRenderer.java` | `BindVariant.ROPES` → lazy createStack |
|
||||
| `mixin/client/MixinPlayerModel.java` | `instanceof ItemBind` → `PoseTypeHelper` |
|
||||
| `mixin/client/MixinCamera.java` | Idem |
|
||||
| `mixin/client/MixinVillagerEntityBaseModelMCA.java` | Idem |
|
||||
|
||||
### Phase 3 : Entity AI goals (15 fichiers)
|
||||
|
||||
Principalement `instanceof ItemBind` → `BindModeHelper`, `ModItems.getBind(variant)` → `createStack(rl)`, `instanceof ItemCollar` → `CollarHelper`.
|
||||
|
||||
### Phase 4 : Network packets (14 fichiers)
|
||||
|
||||
`PacketSelfBondage` déjà migré en A11. Reste : `PacketSlaveAction`, `PacketMasterEquip`, `PacketAssignCellToCollar`, `PacketNpcCommand`, etc. → `CollarHelper`.
|
||||
|
||||
### Phase 5 : Events (8 fichiers)
|
||||
|
||||
`BondageItemRestrictionHandler`, `RestraintTaskTickHandler`, `PlayerEnslavementHandler`, `ChatEventHandler`, etc.
|
||||
|
||||
### Phase 6 : Commands (6 fichiers)
|
||||
|
||||
`BondageSubCommand` (1232 lignes) — le plus gros. `BindVariant` → `createStack()`. `NPCCommand`, `CollarCommand`, `KidnapSetCommand`.
|
||||
|
||||
### Phase 7 : Entity classes (15 fichiers)
|
||||
|
||||
`EntityKidnapper`, `KidnapperCaptureEquipment`, `KidnapperTheme`, `KidnapperItemSelector`, `KidnapperCollarConfig`, etc.
|
||||
|
||||
### Phase 8 : Compat MCA (5 fichiers)
|
||||
|
||||
`MCAKidnappedAdapter` (907 lignes) — `instanceof IHasGaggingEffect/IHasBlindingEffect` → component checks. `instanceof ItemCollar` → `CollarHelper`.
|
||||
|
||||
### Phase 9 : Autres (10 fichiers)
|
||||
|
||||
Dialogue (`GagTalkManager`, `PetRequestManager`), worldgen (`HangingCagePiece`), util (`RestraintApplicator`), blocks (`BondageItemBlockEntity`), dispenser, creative tab.
|
||||
|
||||
---
|
||||
|
||||
## Vérification
|
||||
|
||||
- [ ] `make build` — clean
|
||||
- [ ] `grep -r "instanceof ItemBind\b" src/ --include="*.java" | grep -v "items/"` → 0 résultats
|
||||
- [ ] `grep -r "instanceof ItemGag\b" src/ --include="*.java" | grep -v "items/"` → 0 résultats
|
||||
- [ ] `grep -r "instanceof ItemCollar\b" src/ --include="*.java" | grep -v "items/"` → 0 résultats
|
||||
- [ ] `grep -r "BindVariant\b" src/ --include="*.java" | grep -v "items/"` → 0 résultats
|
||||
- [ ] `grep -r "GagVariant\b" src/ --include="*.java" | grep -v "items/"` → 0 résultats
|
||||
- [ ] `make run` — le mod fonctionne normalement
|
||||
Reference in New Issue
Block a user