fix(D-01/A): adversarial review fixes — 4 logic bugs
1. NECK region explicitly blocked in interactLivingEntity() — prevents V2 collars equipping without ownership setup (latent, no JSONs yet) 2. Swap rollback safety: if re-equip fails after swap failure, drop the old bind as item entity instead of losing it silently 3. GaggingComponent: cache GagMaterial at construction time — eliminates valueOf() log spam on every chat message with misconfigured material 4. Dual-bind prevention: check both V1 isTiedUp() AND V2 region occupied in TyingInteractionHelper and PacketSelfBondage to prevent equipping V2 bind on top of V1 bind
This commit is contained in:
@@ -167,8 +167,13 @@ public class DataDrivenBondageItem extends AbstractV2BondageItem {
|
||||
return TyingInteractionHelper.handleTying(serverPlayer, target, stack, hand);
|
||||
}
|
||||
|
||||
// NECK: collar equip blocked for now — V2 collar JSONs don't exist in Branch A.
|
||||
// Full collar equip flow (add owner, register, sound) wired in Branch C.
|
||||
// NECK: blocked until Branch C wires the full collar equip flow
|
||||
// (add owner to NBT, register in CollarRegistry, play sound, sync).
|
||||
// Without this, V2 collars equip without ownership — breaking GPS, shock, alerts.
|
||||
if (regions.contains(BodyRegionV2.NECK)) {
|
||||
TiedUpMod.LOGGER.debug("[DataDrivenBondageItem] NECK equip blocked — collar flow not wired yet");
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
// All other regions (MOUTH, EYES, EARS, HANDS): instant equip via parent
|
||||
return super.interactLivingEntity(stack, player, target, hand);
|
||||
|
||||
Reference in New Issue
Block a user