// Interact with attachments.
if (leftClick || rightClick) {
IHasAttachments hasAttachments =
WorldUtils.get(world, x, y, z, IHasAttachments.class);
if (hasAttachments != null) {
EnumAttachmentInteraction interactionType =
((event.action == Action.LEFT_CLICK_BLOCK)
? EnumAttachmentInteraction.attack
: EnumAttachmentInteraction.use);
if (hasAttachments.getAttachments().interact(WorldUtils.rayTrace(player, 1.0F),
player, interactionType)) {