From 75cf1358f943f5e2d2e13a780d0194ba8fcb9281 Mon Sep 17 00:00:00 2001 From: NotEvil Date: Wed, 15 Apr 2026 02:12:05 +0200 Subject: [PATCH] chore(D-01/D): remove dead V1 handleSelfAccessory method --- .../selfbondage/PacketSelfBondage.java | 71 ------------------- 1 file changed, 71 deletions(-) diff --git a/src/main/java/com/tiedup/remake/network/selfbondage/PacketSelfBondage.java b/src/main/java/com/tiedup/remake/network/selfbondage/PacketSelfBondage.java index 13024ec..746092c 100644 --- a/src/main/java/com/tiedup/remake/network/selfbondage/PacketSelfBondage.java +++ b/src/main/java/com/tiedup/remake/network/selfbondage/PacketSelfBondage.java @@ -208,75 +208,4 @@ public class PacketSelfBondage { } } - /** - * Handle self-equipping an accessory (gag, blindfold, mittens, earplugs). - * Can be used anytime (no need to be tied). - * Blocked only if arms are fully bound. - * Supports swapping: if same type already equipped (and not locked), swap them. - */ - private static void handleSelfAccessory( - ServerPlayer player, - ItemStack stack, - IBondageState state, - String itemType, - java.util.function.Predicate isEquipped, - java.util.function.Function getCurrent, - java.util.function.Function takeOff, - java.util.function.BiConsumer putOn - ) { - // Can't equip if arms are fully bound (need hands to put on accessories) - ItemStack currentBind = state.getEquipment(BodyRegionV2.ARMS); - if (!currentBind.isEmpty()) { - if (BindModeHelper.hasArmsBound(currentBind)) { - TiedUpMod.LOGGER.debug( - "[SelfBondage] {} can't self-{} - arms are bound", - player.getName().getString(), - itemType - ); - return; - } - } - - // Already equipped? Try to swap - if (isEquipped.test(state)) { - ItemStack currentItem = getCurrent.apply(state); - - // Check if current item is locked - if ( - currentItem.getItem() instanceof ILockable lockable && - lockable.isLocked(currentItem) - ) { - TiedUpMod.LOGGER.debug( - "[SelfBondage] {} can't swap {} - current is locked", - player.getName().getString(), - itemType - ); - return; - } - - // Remove current and drop it - ItemStack removed = takeOff.apply(state); - if (!removed.isEmpty()) { - state.kidnappedDropItem(removed); - TiedUpMod.LOGGER.debug( - "[SelfBondage] {} swapping {} - dropped old one", - player.getName().getString(), - itemType - ); - } - } - - // Equip new item on self - putOn.accept(state, stack.copy()); - stack.shrink(1); - - // Sync to client - SyncManager.syncInventory(player); - - TiedUpMod.LOGGER.info( - "[SelfBondage] {} self-equipped {}", - player.getName().getString(), - itemType - ); - } }