chore(P2): V1 zombie comments cleanup + i18n events/network/items
Zombie comments (14 files): - Replace references to deleted V1 classes (ItemBind, ItemCollar, IBondageItem, BindVariant, etc.) with V2 equivalents or past-tense historical notes - "V1 path" → "legacy slot-index path" for still-active legacy codepaths - Clean misleading javadoc that implied V1 code was still present i18n (13 files, 31 new keys): - Events: 12 Component.literal() → translatable (labor tools, gag eat, death escape, debt, punishment, grace, camp protection, chest, maid) - Network: 12 Component.literal() → translatable (trader messages, lockpick jam, slave freedom warnings) - Items: 2 Component.literal() → translatable (ItemOwnerTarget tooltips)
This commit is contained in:
@@ -195,7 +195,7 @@ public interface IBondageState extends ICapturable {
|
||||
|
||||
/**
|
||||
* Check if gag item has gagging sound effect.
|
||||
* @return true if gag implements ItemGaggingEffect
|
||||
* @return true if gag has a GaggingComponent
|
||||
*/
|
||||
boolean hasGaggingEffect();
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ import net.minecraft.world.item.ItemStack;
|
||||
* Risk: MEDIUM (core equipment system)
|
||||
*
|
||||
* Epic 5F: Uses V2EquipmentHelper.
|
||||
* Uses low-level setInRegion for equips because V1 items (IBondageItem) do not
|
||||
* implement IV2BondageItem, so V2EquipmentHelper.equipItem() would reject them.
|
||||
* Uses low-level setInRegion for equips because force-equip paths (commands, NPC AI,
|
||||
* NBT restore) should bypass V2EquipmentManager conflict resolution.
|
||||
*/
|
||||
public class PlayerEquipment {
|
||||
|
||||
@@ -423,14 +423,11 @@ public class PlayerEquipment {
|
||||
// ========== Low-level V2 equipment operations ==========
|
||||
|
||||
/**
|
||||
* Low-level equip: writes to V2 capability, calls IBondageItem lifecycle hooks, syncs.
|
||||
* Low-level equip: writes to V2 capability, calls IV2BondageItem lifecycle hooks, syncs.
|
||||
*
|
||||
* <p>INTENTIONALLY bypasses V2EquipmentManager.tryEquip() because:
|
||||
* <ul>
|
||||
* <li>V1 items (IBondageItem) do not implement IV2BondageItem, so tryEquip() rejects them</li>
|
||||
* <li>All callers (commands, NPC AI, NBT restore) are force-equip paths that should not
|
||||
* be subject to V2 conflict resolution (SMELL-003 reviewed — bypass is by design)</li>
|
||||
* </ul>
|
||||
* <p>INTENTIONALLY bypasses V2EquipmentManager.tryEquip() because all callers
|
||||
* (commands, NPC AI, NBT restore) are force-equip paths that should not be subject
|
||||
* to V2 conflict resolution (SMELL-003 reviewed — bypass is by design).
|
||||
* <p>Basic safety (isRegionOccupied, canEquip) is still checked here.</p>
|
||||
*/
|
||||
private void equipInRegion(BodyRegionV2 region, ItemStack stack) {
|
||||
@@ -444,7 +441,7 @@ public class PlayerEquipment {
|
||||
// Check if already occupied
|
||||
if (equip.isRegionOccupied(region)) return;
|
||||
|
||||
// Check canEquip via V1 IBondageItem interface
|
||||
// Check canEquip via IV2BondageItem interface
|
||||
if (stack.getItem() instanceof IV2BondageItem bondageItem) {
|
||||
if (!bondageItem.canEquip(stack, player)) return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user