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:
NotEvil
2026-04-16 11:20:17 +02:00
parent 371a138b71
commit 9b2c5dec8e
28 changed files with 114 additions and 89 deletions

View File

@@ -89,8 +89,8 @@ public class CampChestHandler {
if (entity instanceof Player player) {
player.displayClientMessage(
Component.literal(
"This chest is locked by the camp!"
Component.translatable(
"msg.tiedup.event.chest_locked_by_camp"
).withStyle(ChatFormatting.RED),
true
);

View File

@@ -286,10 +286,9 @@ public class CampManagementHandler {
.getPlayer(prisonerId);
if (player != null) {
player.sendSystemMessage(
Component.literal(
"A new maid, " +
maidName +
", has arrived. Work resumes."
Component.translatable(
"msg.tiedup.event.new_maid_arrived",
maidName
).withStyle(ChatFormatting.GOLD)
);
}

View File

@@ -75,10 +75,10 @@ public class CampNpcProtectionHandler {
// Send warning message to player
player.sendSystemMessage(
Component.literal(
Component.translatable(
isTrader
? "The camp defends their leader! You are now under attack!"
: "The camp defends their servant! You are now under attack!"
? "msg.tiedup.event.camp_defends_trader"
: "msg.tiedup.event.camp_defends_maid"
).withStyle(ChatFormatting.RED, ChatFormatting.BOLD)
);
}

View File

@@ -48,8 +48,8 @@ public class GraceEventHandler {
record.setProtectionExpiry(0);
player.displayClientMessage(
Component.literal(
"You attacked a kidnapper - protection lost!"
Component.translatable(
"msg.tiedup.event.grace_lost"
).withStyle(ChatFormatting.RED),
true
);

View File

@@ -209,12 +209,10 @@ public class LaborAttackPunishmentHandler {
manager.increaseDebt(prisoner.getUUID(), DEBT_INCREASE_PER_ATTACK);
prisoner.sendSystemMessage(
Component.literal(
String.format(
"Your debt has increased by %d emeralds for attacking %s!",
DEBT_INCREASE_PER_ATTACK,
targetName
)
Component.translatable(
"msg.tiedup.event.debt_increased",
DEBT_INCREASE_PER_ATTACK,
targetName
).withStyle(ChatFormatting.RED, ChatFormatting.BOLD)
);
}
@@ -282,8 +280,8 @@ public class LaborAttackPunishmentHandler {
// 4. Warning message
prisoner.sendSystemMessage(
Component.literal(
"Your task has been marked as failed. You will not be paid for your work."
Component.translatable(
"msg.tiedup.event.task_failed"
).withStyle(ChatFormatting.DARK_RED)
);
@@ -315,8 +313,8 @@ public class LaborAttackPunishmentHandler {
laborRecord.setEscortMaidId(null);
prisoner.sendSystemMessage(
Component.literal(
"You have been returned to your cell for your insolence!"
Component.translatable(
"msg.tiedup.event.returned_to_cell"
).withStyle(ChatFormatting.RED, ChatFormatting.BOLD)
);

View File

@@ -363,8 +363,8 @@ public class PlayerStateEventHandler {
// Send death escape message if applicable
if (pendingDeathEscapeMessage.remove(player.getUUID())) {
player.sendSystemMessage(
net.minecraft.network.chat.Component.literal(
"You died and escaped captivity. Your items remain in the camp chest."
net.minecraft.network.chat.Component.translatable(
"msg.tiedup.event.death_escape"
).withStyle(net.minecraft.ChatFormatting.YELLOW)
);
}

View File

@@ -473,7 +473,7 @@ public class BondageItemRestrictionHandler {
if (state != null && state.isGagged()) {
event.setCanceled(true);
player.displayClientMessage(
Component.literal("You can't eat with a gag on.").withStyle(
Component.translatable("msg.tiedup.event.cant_eat_gagged").withStyle(
ChatFormatting.RED
),
true

View File

@@ -79,7 +79,7 @@ public class LaborToolProtectionHandler {
);
} else {
player.displayClientMessage(
Component.literal("You cannot drop labor tools!"),
Component.translatable("msg.tiedup.event.cant_drop_labor_tools"),
true
);
}
@@ -124,7 +124,7 @@ public class LaborToolProtectionHandler {
);
} else {
player.displayClientMessage(
Component.literal("You cannot store labor tools!"),
Component.translatable("msg.tiedup.event.cant_store_labor_tools"),
true
);
}

View File

@@ -63,7 +63,7 @@ public class ChatEventHandler {
if (!gagStack.isEmpty() && isGagItem) {
String originalMessage = event.getRawText();
// V2: get material from component, V1 fallback: from ItemGag
// V2: get material from GaggingComponent
GagMaterial material = null;
if (gaggingComp != null) {
material = gaggingComp.getMaterial();