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 - ); - } }