private boolean doAttachmentHighlight(RayTraceResult target, EntityPlayer player, float partialTicks) {
if (!(ItemHelper.getHeldStack(player).getItem() instanceof ItemAttachment) || target.typeOfHit != Type.BLOCK) {
return false;
}
RayTracer.retraceBlock(player.world, player, target.getBlockPos());
ItemStack stack = ItemHelper.getHeldStack(player);
Attachment attachment = ItemAttachment.getAttachment(stack, player, player.world, target.getBlockPos(), target.sideHit);
if (attachment == null || !attachment.canAddToTile(attachment.baseTile)) {
return false;
}
Cuboid6 c = attachment.getCuboid();
c.max.subtract(c.min);
RenderHitbox.drawSelectionBox(player, target, partialTicks, new CustomHitBox(c.max.y, c.max.z, c.max.x, attachment.baseTile.x() + c.min.x, attachment.baseTile.y() + c.min.y, attachment.baseTile.z() + c.min.z));
attachment.drawSelectionExtra(player, target, partialTicks);
return true;
}