diff --git a/.editorconfig b/.editorconfig index cb3843f1b..b4fb9f3f6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,25 +14,6 @@ ij_smart_tabs = false ij_visual_guides = none ij_wrap_on_typing = false -[*.css] -ij_css_align_closing_brace_with_properties = false -ij_css_blank_lines_around_nested_selector = 1 -ij_css_blank_lines_between_blocks = 1 -ij_css_brace_placement = end_of_line -ij_css_enforce_quotes_on_format = false -ij_css_hex_color_long_format = false -ij_css_hex_color_lower_case = false -ij_css_hex_color_short_format = false -ij_css_hex_color_upper_case = false -ij_css_keep_blank_lines_in_code = 2 -ij_css_keep_indents_on_empty_lines = false -ij_css_keep_single_line_blocks = false -ij_css_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow -ij_css_space_after_colon = true -ij_css_space_before_opening_brace = true -ij_css_use_double_quotes = true -ij_css_value_alignment = do_not_align - [*.java] ij_continuation_indent_size = 4 ij_java_align_consecutive_assignments = false @@ -266,83 +247,12 @@ ij_java_wrap_comments = false ij_java_wrap_first_method_in_call_chain = false ij_java_wrap_long_lines = false -[*.nbtt] -max_line_length = 150 -ij_continuation_indent_size = 4 -ij_nbtt_keep_indents_on_empty_lines = false -ij_nbtt_space_after_colon = true -ij_nbtt_space_after_comma = true -ij_nbtt_space_before_colon = true -ij_nbtt_space_before_comma = false -ij_nbtt_spaces_within_brackets = false -ij_nbtt_spaces_within_parentheses = false - [*.properties] ij_properties_align_group_field_declarations = false ij_properties_keep_blank_lines = false ij_properties_key_value_delimiter = equals ij_properties_spaces_around_key_value_delimiter = false -[*.sass] -indent_size = 2 -ij_sass_align_closing_brace_with_properties = false -ij_sass_blank_lines_around_nested_selector = 1 -ij_sass_blank_lines_between_blocks = 1 -ij_sass_brace_placement = 0 -ij_sass_enforce_quotes_on_format = false -ij_sass_hex_color_long_format = false -ij_sass_hex_color_lower_case = false -ij_sass_hex_color_short_format = false -ij_sass_hex_color_upper_case = false -ij_sass_keep_blank_lines_in_code = 2 -ij_sass_keep_indents_on_empty_lines = false -ij_sass_keep_single_line_blocks = false -ij_sass_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow -ij_sass_space_after_colon = true -ij_sass_space_before_opening_brace = true -ij_sass_use_double_quotes = true -ij_sass_value_alignment = 0 - -[*.scss] -indent_size = 2 -ij_scss_align_closing_brace_with_properties = false -ij_scss_blank_lines_around_nested_selector = 1 -ij_scss_blank_lines_between_blocks = 1 -ij_scss_brace_placement = 0 -ij_scss_enforce_quotes_on_format = false -ij_scss_hex_color_long_format = false -ij_scss_hex_color_lower_case = false -ij_scss_hex_color_short_format = false -ij_scss_hex_color_upper_case = false -ij_scss_keep_blank_lines_in_code = 2 -ij_scss_keep_indents_on_empty_lines = false -ij_scss_keep_single_line_blocks = false -ij_scss_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow -ij_scss_space_after_colon = true -ij_scss_space_before_opening_brace = true -ij_scss_use_double_quotes = true -ij_scss_value_alignment = 0 - -[*.styl] -indent_size = 2 -ij_stylus_align_closing_brace_with_properties = false -ij_stylus_blank_lines_around_nested_selector = 1 -ij_stylus_blank_lines_between_blocks = 1 -ij_stylus_brace_placement = 0 -ij_stylus_enforce_quotes_on_format = false -ij_stylus_hex_color_long_format = false -ij_stylus_hex_color_lower_case = false -ij_stylus_hex_color_short_format = false -ij_stylus_hex_color_upper_case = false -ij_stylus_keep_blank_lines_in_code = 2 -ij_stylus_keep_indents_on_empty_lines = false -ij_stylus_keep_single_line_blocks = false -ij_stylus_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow -ij_stylus_space_after_colon = true -ij_stylus_space_before_opening_brace = true -ij_stylus_use_double_quotes = true -ij_stylus_value_alignment = 0 - [.editorconfig] ij_editorconfig_align_group_field_declarations = false ij_editorconfig_space_after_colon = false @@ -351,192 +261,6 @@ ij_editorconfig_space_before_colon = false ij_editorconfig_space_before_comma = false ij_editorconfig_spaces_around_assignment_operators = true -[{*.ant, *.fxml, *.jhm, *.jnlp, *.jrxml, *.pom, *.rng, *.tld, *.wsdl, *.xml, *.xsd, *.xsl, *.xslt, *.xul}] -ij_xml_align_attributes = true -ij_xml_align_text = false -ij_xml_attribute_wrap = normal -ij_xml_block_comment_at_first_column = true -ij_xml_keep_blank_lines = 2 -ij_xml_keep_indents_on_empty_lines = false -ij_xml_keep_line_breaks = true -ij_xml_keep_line_breaks_in_text = true -ij_xml_keep_whitespaces = false -ij_xml_keep_whitespaces_around_cdata = preserve -ij_xml_keep_whitespaces_inside_cdata = false -ij_xml_line_comment_at_first_column = true -ij_xml_space_after_tag_name = false -ij_xml_space_around_equals_in_attribute = false -ij_xml_space_inside_empty_tag = false -ij_xml_text_wrap = normal - -[{*.ats, *.ts}] -ij_continuation_indent_size = 4 -ij_typescript_align_imports = false -ij_typescript_align_multiline_array_initializer_expression = false -ij_typescript_align_multiline_binary_operation = false -ij_typescript_align_multiline_chained_methods = false -ij_typescript_align_multiline_extends_list = false -ij_typescript_align_multiline_for = true -ij_typescript_align_multiline_parameters = true -ij_typescript_align_multiline_parameters_in_calls = false -ij_typescript_align_multiline_ternary_operation = false -ij_typescript_align_object_properties = 0 -ij_typescript_align_union_types = false -ij_typescript_align_var_statements = 0 -ij_typescript_array_initializer_new_line_after_left_brace = false -ij_typescript_array_initializer_right_brace_on_new_line = false -ij_typescript_array_initializer_wrap = off -ij_typescript_assignment_wrap = off -ij_typescript_binary_operation_sign_on_next_line = false -ij_typescript_binary_operation_wrap = off -ij_typescript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/** -ij_typescript_blank_lines_after_imports = 1 -ij_typescript_blank_lines_around_class = 1 -ij_typescript_blank_lines_around_field = 0 -ij_typescript_blank_lines_around_field_in_interface = 0 -ij_typescript_blank_lines_around_function = 1 -ij_typescript_blank_lines_around_method = 1 -ij_typescript_blank_lines_around_method_in_interface = 1 -ij_typescript_block_brace_style = end_of_line -ij_typescript_call_parameters_new_line_after_left_paren = false -ij_typescript_call_parameters_right_paren_on_new_line = false -ij_typescript_call_parameters_wrap = off -ij_typescript_catch_on_new_line = false -ij_typescript_chained_call_dot_on_new_line = true -ij_typescript_class_brace_style = end_of_line -ij_typescript_comma_on_new_line = false -ij_typescript_do_while_brace_force = never -ij_typescript_else_on_new_line = false -ij_typescript_enforce_trailing_comma = keep -ij_typescript_extends_keyword_wrap = off -ij_typescript_extends_list_wrap = off -ij_typescript_field_prefix = _ -ij_typescript_file_name_style = relaxed -ij_typescript_finally_on_new_line = false -ij_typescript_for_brace_force = never -ij_typescript_for_statement_new_line_after_left_paren = false -ij_typescript_for_statement_right_paren_on_new_line = false -ij_typescript_for_statement_wrap = off -ij_typescript_force_quote_style = false -ij_typescript_force_semicolon_style = false -ij_typescript_function_expression_brace_style = end_of_line -ij_typescript_if_brace_force = never -ij_typescript_import_merge_members = global -ij_typescript_import_prefer_absolute_path = global -ij_typescript_import_sort_members = true -ij_typescript_import_sort_module_name = false -ij_typescript_import_use_node_resolution = true -ij_typescript_imports_wrap = on_every_item -ij_typescript_indent_case_from_switch = true -ij_typescript_indent_chained_calls = true -ij_typescript_indent_package_children = 0 -ij_typescript_jsdoc_include_types = false -ij_typescript_jsx_attribute_value = braces -ij_typescript_keep_blank_lines_in_code = 2 -ij_typescript_keep_first_column_comment = true -ij_typescript_keep_indents_on_empty_lines = false -ij_typescript_keep_line_breaks = true -ij_typescript_keep_simple_blocks_in_one_line = false -ij_typescript_keep_simple_methods_in_one_line = false -ij_typescript_line_comment_add_space = true -ij_typescript_line_comment_at_first_column = false -ij_typescript_method_brace_style = end_of_line -ij_typescript_method_call_chain_wrap = off -ij_typescript_method_parameters_new_line_after_left_paren = false -ij_typescript_method_parameters_right_paren_on_new_line = false -ij_typescript_method_parameters_wrap = off -ij_typescript_object_literal_wrap = on_every_item -ij_typescript_parentheses_expression_new_line_after_left_paren = false -ij_typescript_parentheses_expression_right_paren_on_new_line = false -ij_typescript_place_assignment_sign_on_next_line = false -ij_typescript_prefer_as_type_cast = false -ij_typescript_prefer_explicit_types_function_expression_returns = false -ij_typescript_prefer_explicit_types_function_returns = false -ij_typescript_prefer_explicit_types_vars_fields = false -ij_typescript_prefer_parameters_wrap = false -ij_typescript_reformat_c_style_comments = false -ij_typescript_space_after_colon = true -ij_typescript_space_after_comma = true -ij_typescript_space_after_dots_in_rest_parameter = false -ij_typescript_space_after_generator_mult = true -ij_typescript_space_after_property_colon = true -ij_typescript_space_after_quest = true -ij_typescript_space_after_type_colon = true -ij_typescript_space_after_unary_not = false -ij_typescript_space_before_async_arrow_lparen = true -ij_typescript_space_before_catch_keyword = true -ij_typescript_space_before_catch_left_brace = true -ij_typescript_space_before_catch_parentheses = true -ij_typescript_space_before_class_lbrace = true -ij_typescript_space_before_class_left_brace = true -ij_typescript_space_before_colon = true -ij_typescript_space_before_comma = false -ij_typescript_space_before_do_left_brace = true -ij_typescript_space_before_else_keyword = true -ij_typescript_space_before_else_left_brace = true -ij_typescript_space_before_finally_keyword = true -ij_typescript_space_before_finally_left_brace = true -ij_typescript_space_before_for_left_brace = true -ij_typescript_space_before_for_parentheses = true -ij_typescript_space_before_for_semicolon = false -ij_typescript_space_before_function_left_parenth = true -ij_typescript_space_before_generator_mult = false -ij_typescript_space_before_if_left_brace = true -ij_typescript_space_before_if_parentheses = true -ij_typescript_space_before_method_call_parentheses = false -ij_typescript_space_before_method_left_brace = true -ij_typescript_space_before_method_parentheses = false -ij_typescript_space_before_property_colon = false -ij_typescript_space_before_quest = true -ij_typescript_space_before_switch_left_brace = true -ij_typescript_space_before_switch_parentheses = true -ij_typescript_space_before_try_left_brace = true -ij_typescript_space_before_type_colon = false -ij_typescript_space_before_unary_not = false -ij_typescript_space_before_while_keyword = true -ij_typescript_space_before_while_left_brace = true -ij_typescript_space_before_while_parentheses = true -ij_typescript_spaces_around_additive_operators = true -ij_typescript_spaces_around_arrow_function_operator = true -ij_typescript_spaces_around_assignment_operators = true -ij_typescript_spaces_around_bitwise_operators = true -ij_typescript_spaces_around_equality_operators = true -ij_typescript_spaces_around_logical_operators = true -ij_typescript_spaces_around_multiplicative_operators = true -ij_typescript_spaces_around_relational_operators = true -ij_typescript_spaces_around_shift_operators = true -ij_typescript_spaces_around_unary_operator = false -ij_typescript_spaces_within_array_initializer_brackets = false -ij_typescript_spaces_within_brackets = false -ij_typescript_spaces_within_catch_parentheses = false -ij_typescript_spaces_within_for_parentheses = false -ij_typescript_spaces_within_if_parentheses = false -ij_typescript_spaces_within_imports = false -ij_typescript_spaces_within_interpolation_expressions = false -ij_typescript_spaces_within_method_call_parentheses = false -ij_typescript_spaces_within_method_parentheses = false -ij_typescript_spaces_within_object_literal_braces = false -ij_typescript_spaces_within_object_type_braces = true -ij_typescript_spaces_within_parentheses = false -ij_typescript_spaces_within_switch_parentheses = false -ij_typescript_spaces_within_type_assertion = false -ij_typescript_spaces_within_union_types = true -ij_typescript_spaces_within_while_parentheses = false -ij_typescript_special_else_if_treatment = true -ij_typescript_ternary_operation_signs_on_next_line = false -ij_typescript_ternary_operation_wrap = off -ij_typescript_union_types_wrap = on_every_item -ij_typescript_use_chained_calls_group_indents = false -ij_typescript_use_double_quotes = true -ij_typescript_use_explicit_js_extension = global -ij_typescript_use_path_mapping = always -ij_typescript_use_public_modifier = false -ij_typescript_use_semicolon_after_statement = true -ij_typescript_var_declaration_wrap = normal -ij_typescript_while_brace_force = never -ij_typescript_while_on_new_line = false -ij_typescript_wrap_comments = false - [{*.bash, *.sh, *.zsh}] indent_size = 2 tab_width = 2 @@ -546,174 +270,6 @@ ij_shell_minify_program = false ij_shell_redirect_followed_by_space = false ij_shell_switch_cases_indented = false -[{*.cjs, *.js}] -ij_continuation_indent_size = 4 -ij_javascript_align_imports = false -ij_javascript_align_multiline_array_initializer_expression = false -ij_javascript_align_multiline_binary_operation = false -ij_javascript_align_multiline_chained_methods = false -ij_javascript_align_multiline_extends_list = false -ij_javascript_align_multiline_for = true -ij_javascript_align_multiline_parameters = true -ij_javascript_align_multiline_parameters_in_calls = false -ij_javascript_align_multiline_ternary_operation = false -ij_javascript_align_object_properties = 0 -ij_javascript_align_union_types = false -ij_javascript_align_var_statements = 0 -ij_javascript_array_initializer_new_line_after_left_brace = false -ij_javascript_array_initializer_right_brace_on_new_line = false -ij_javascript_array_initializer_wrap = off -ij_javascript_assignment_wrap = off -ij_javascript_binary_operation_sign_on_next_line = false -ij_javascript_binary_operation_wrap = off -ij_javascript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/** -ij_javascript_blank_lines_after_imports = 1 -ij_javascript_blank_lines_around_class = 1 -ij_javascript_blank_lines_around_field = 0 -ij_javascript_blank_lines_around_function = 1 -ij_javascript_blank_lines_around_method = 1 -ij_javascript_block_brace_style = end_of_line -ij_javascript_call_parameters_new_line_after_left_paren = false -ij_javascript_call_parameters_right_paren_on_new_line = false -ij_javascript_call_parameters_wrap = off -ij_javascript_catch_on_new_line = false -ij_javascript_chained_call_dot_on_new_line = true -ij_javascript_class_brace_style = end_of_line -ij_javascript_comma_on_new_line = false -ij_javascript_do_while_brace_force = never -ij_javascript_else_on_new_line = false -ij_javascript_enforce_trailing_comma = keep -ij_javascript_extends_keyword_wrap = off -ij_javascript_extends_list_wrap = off -ij_javascript_field_prefix = _ -ij_javascript_file_name_style = relaxed -ij_javascript_finally_on_new_line = false -ij_javascript_for_brace_force = never -ij_javascript_for_statement_new_line_after_left_paren = false -ij_javascript_for_statement_right_paren_on_new_line = false -ij_javascript_for_statement_wrap = off -ij_javascript_force_quote_style = false -ij_javascript_force_semicolon_style = false -ij_javascript_function_expression_brace_style = end_of_line -ij_javascript_if_brace_force = never -ij_javascript_import_merge_members = global -ij_javascript_import_prefer_absolute_path = global -ij_javascript_import_sort_members = true -ij_javascript_import_sort_module_name = false -ij_javascript_import_use_node_resolution = true -ij_javascript_imports_wrap = on_every_item -ij_javascript_indent_case_from_switch = true -ij_javascript_indent_chained_calls = true -ij_javascript_indent_package_children = 0 -ij_javascript_jsx_attribute_value = braces -ij_javascript_keep_blank_lines_in_code = 2 -ij_javascript_keep_first_column_comment = true -ij_javascript_keep_indents_on_empty_lines = false -ij_javascript_keep_line_breaks = true -ij_javascript_keep_simple_blocks_in_one_line = false -ij_javascript_keep_simple_methods_in_one_line = false -ij_javascript_line_comment_add_space = true -ij_javascript_line_comment_at_first_column = false -ij_javascript_method_brace_style = end_of_line -ij_javascript_method_call_chain_wrap = off -ij_javascript_method_parameters_new_line_after_left_paren = false -ij_javascript_method_parameters_right_paren_on_new_line = false -ij_javascript_method_parameters_wrap = off -ij_javascript_object_literal_wrap = on_every_item -ij_javascript_parentheses_expression_new_line_after_left_paren = false -ij_javascript_parentheses_expression_right_paren_on_new_line = false -ij_javascript_place_assignment_sign_on_next_line = false -ij_javascript_prefer_as_type_cast = false -ij_javascript_prefer_explicit_types_function_expression_returns = false -ij_javascript_prefer_explicit_types_function_returns = false -ij_javascript_prefer_explicit_types_vars_fields = false -ij_javascript_prefer_parameters_wrap = false -ij_javascript_reformat_c_style_comments = false -ij_javascript_space_after_colon = true -ij_javascript_space_after_comma = true -ij_javascript_space_after_dots_in_rest_parameter = false -ij_javascript_space_after_generator_mult = true -ij_javascript_space_after_property_colon = true -ij_javascript_space_after_quest = true -ij_javascript_space_after_type_colon = true -ij_javascript_space_after_unary_not = false -ij_javascript_space_before_async_arrow_lparen = true -ij_javascript_space_before_catch_keyword = true -ij_javascript_space_before_catch_left_brace = true -ij_javascript_space_before_catch_parentheses = true -ij_javascript_space_before_class_lbrace = true -ij_javascript_space_before_class_left_brace = true -ij_javascript_space_before_colon = true -ij_javascript_space_before_comma = false -ij_javascript_space_before_do_left_brace = true -ij_javascript_space_before_else_keyword = true -ij_javascript_space_before_else_left_brace = true -ij_javascript_space_before_finally_keyword = true -ij_javascript_space_before_finally_left_brace = true -ij_javascript_space_before_for_left_brace = true -ij_javascript_space_before_for_parentheses = true -ij_javascript_space_before_for_semicolon = false -ij_javascript_space_before_function_left_parenth = true -ij_javascript_space_before_generator_mult = false -ij_javascript_space_before_if_left_brace = true -ij_javascript_space_before_if_parentheses = true -ij_javascript_space_before_method_call_parentheses = false -ij_javascript_space_before_method_left_brace = true -ij_javascript_space_before_method_parentheses = false -ij_javascript_space_before_property_colon = false -ij_javascript_space_before_quest = true -ij_javascript_space_before_switch_left_brace = true -ij_javascript_space_before_switch_parentheses = true -ij_javascript_space_before_try_left_brace = true -ij_javascript_space_before_type_colon = false -ij_javascript_space_before_unary_not = false -ij_javascript_space_before_while_keyword = true -ij_javascript_space_before_while_left_brace = true -ij_javascript_space_before_while_parentheses = true -ij_javascript_spaces_around_additive_operators = true -ij_javascript_spaces_around_arrow_function_operator = true -ij_javascript_spaces_around_assignment_operators = true -ij_javascript_spaces_around_bitwise_operators = true -ij_javascript_spaces_around_equality_operators = true -ij_javascript_spaces_around_logical_operators = true -ij_javascript_spaces_around_multiplicative_operators = true -ij_javascript_spaces_around_relational_operators = true -ij_javascript_spaces_around_shift_operators = true -ij_javascript_spaces_around_unary_operator = false -ij_javascript_spaces_within_array_initializer_brackets = false -ij_javascript_spaces_within_brackets = false -ij_javascript_spaces_within_catch_parentheses = false -ij_javascript_spaces_within_for_parentheses = false -ij_javascript_spaces_within_if_parentheses = false -ij_javascript_spaces_within_imports = false -ij_javascript_spaces_within_interpolation_expressions = false -ij_javascript_spaces_within_method_call_parentheses = false -ij_javascript_spaces_within_method_parentheses = false -ij_javascript_spaces_within_object_literal_braces = false -ij_javascript_spaces_within_object_type_braces = true -ij_javascript_spaces_within_parentheses = false -ij_javascript_spaces_within_switch_parentheses = false -ij_javascript_spaces_within_type_assertion = false -ij_javascript_spaces_within_union_types = true -ij_javascript_spaces_within_while_parentheses = false -ij_javascript_special_else_if_treatment = true -ij_javascript_ternary_operation_signs_on_next_line = false -ij_javascript_ternary_operation_wrap = off -ij_javascript_union_types_wrap = on_every_item -ij_javascript_use_chained_calls_group_indents = false -ij_javascript_use_double_quotes = true -ij_javascript_use_explicit_js_extension = global -ij_javascript_use_path_mapping = always -ij_javascript_use_public_modifier = false -ij_javascript_use_semicolon_after_statement = true -ij_javascript_var_declaration_wrap = normal -ij_javascript_while_brace_force = never -ij_javascript_while_on_new_line = false -ij_javascript_wrap_comments = false - -[{*.comp, *.frag, *.fsh, *.geom, *.glsl, *.shader, *.tesc, *.tese, *.vert, *.vsh}] -ij_glsl_keep_indents_on_empty_lines = false - [{*.gant, *.gradle, *.groovy, *.gy}] ij_groovy_align_group_field_declarations = false ij_groovy_align_multiline_array_initializer_expression = false @@ -893,7 +449,7 @@ ij_groovy_while_brace_force = never ij_groovy_while_on_new_line = false ij_groovy_wrap_long_lines = false -[{*.gradle.kts, *.kt, *.kts, *.main.kts}] +[{*.kt, *.kts}] ij_continuation_indent_size = 4 ij_kotlin_align_in_columns_case_branch = false ij_kotlin_align_multiline_binary_operation = false @@ -988,34 +544,6 @@ ij_json_spaces_within_braces = false ij_json_spaces_within_brackets = false ij_json_wrap_long_lines = false -[{*.htm, *.html, *.sht, *.shtm, *.shtml}] -ij_html_add_new_line_before_tags = body, div, p, form, h1, h2, h3 -ij_html_align_attributes = true -ij_html_align_text = false -ij_html_attribute_wrap = normal -ij_html_block_comment_at_first_column = true -ij_html_do_not_align_children_of_min_lines = 0 -ij_html_do_not_break_if_inline_tags = title, h1, h2, h3, h4, h5, h6, p -ij_html_do_not_indent_children_of_tags = html, body, thead, tbody, tfoot -ij_html_enforce_quotes = false -ij_html_inline_tags = a, abbr, acronym, b, basefont, bdo, big, br, cite, cite, code, dfn, em, font, i, img, input, kbd, label, q, s, samp, select, small, span, strike, strong, sub, sup, textarea, tt, u, var -ij_html_keep_blank_lines = 2 -ij_html_keep_indents_on_empty_lines = false -ij_html_keep_line_breaks = true -ij_html_keep_line_breaks_in_text = true -ij_html_keep_whitespaces = false -ij_html_keep_whitespaces_inside = span, pre, textarea -ij_html_line_comment_at_first_column = true -ij_html_new_line_after_last_attribute = never -ij_html_new_line_before_first_attribute = never -ij_html_quote_style = double -ij_html_remove_new_line_before_tags = br -ij_html_space_after_tag_name = false -ij_html_space_around_equality_in_attribute = false -ij_html_space_inside_empty_tag = false -ij_html_text_wrap = normal -ij_html_uniform_ident = false - [{*.markdown, *.md}] ij_markdown_force_one_space_after_blockquote_symbol = true ij_markdown_force_one_space_after_header_symbol = true diff --git a/build.gradle b/build.gradle index 341cfa0a3..cb06e544a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,27 +1,25 @@ -version project.modVersion -group project.modGroup - buildscript { repositories { mavenCentral() maven { url = 'https://maven.minecraftforge.net/' } maven { url = 'https://repo.spongepowered.org/maven/' } } - dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:5.+' classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" - classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion" } } -apply plugin: 'idea' -apply plugin: 'kotlin' +plugins { + id 'org.jetbrains.kotlin.jvm' version "$kotlinVersion" +} + apply plugin: 'net.minecraftforge.gradle' -apply plugin: 'org.jetbrains.dokka' apply plugin: 'org.spongepowered.mixin' +version project.modVersion +group project.modGroup + compileJava { sourceCompatibility = targetCompatibility = '1.8' options.encoding = 'UTF-8' @@ -34,10 +32,10 @@ compileKotlin.kotlinOptions { } repositories { + mavenCentral() maven { url = 'https://repo.spongepowered.org/maven/' } maven { url = 'https://impactdevelopment.github.io/maven/' } - maven { url = "https://jitpack.io" } - mavenCentral() + maven { url = 'https://jitpack.io' } } minecraft { @@ -70,36 +68,20 @@ dependencies { // Forge minecraft "net.minecraftforge:forge:$minecraftVersion-$forgeVersion" - jarLibs('org.spongepowered:mixin:0.8.3') { + jarLibs('org.spongepowered:mixin:0.8.5') { exclude module: 'commons-io' exclude module: 'gson' exclude module: 'guava' - exclude module: 'launchwrapper' - exclude module: 'log4j-core' // we want to exclude this as well because 0.8.3 includes it too new for MC } // Hacky way to get mixin work - annotationProcessor('org.spongepowered:mixin:0.8.3:processor') { + annotationProcessor('org.spongepowered:mixin:0.8.5:processor') { exclude module: 'gson' } // Not the latest Reflections because it breaks Future compatibility :/ - jarLibs('org.reflections:reflections:0.9.12') { - exclude module: 'gson' - exclude module: 'guava' - } - - // Kotlin libs - // kotlin-stdlib-common and annotations aren't required at runtime - jarLibs("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion") { - exclude module: 'kotlin-stdlib-common' - exclude module: 'annotations' - } - - jarLibs("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion") { - exclude module: 'kotlin-stdlib-common' - exclude module: 'annotations' - } + //noinspection GradlePackageUpdate + jarLibs 'org.reflections:reflections:0.9.12' jarLibs("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") { exclude module: 'kotlin-stdlib-common' @@ -107,16 +89,19 @@ dependencies { } jarLibs("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") { - exclude module: 'kotlin-stdlib-common' - exclude module: 'annotations' + exclude module: 'kotlin-stdlib' } jarLibs("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion") { + exclude module: 'kotlin-stdlib-jdk8' exclude module: 'kotlin-stdlib-common' - exclude module: 'annotations' } - jarLibs "com.github.cbyrneee:DiscordIPC:e18542f600" + jarLibs('com.github.cbyrneee:DiscordIPC:e18542f600') { + exclude module: 'junixsocket-common' + exclude module: 'junixsocket-native-common' + exclude module: 'json' + } // Add them back to compileOnly (provided) compileOnly "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion" @@ -134,7 +119,11 @@ dependencies { mixin { defaultObfuscationEnv 'searge' - add sourceSets.main, 'mixins.lambda.refmap.json' + sourceSets { + main { + ext.refMap = 'mixins.lambda.refmap.json' + } + } } processResources { @@ -151,7 +140,7 @@ task sourceJar(type: Jar) { // Generate sources group 'build' description 'Assemble API library source archive' - archiveClassifier.set('api-source') + archiveClassifier.set 'api-source' from sourceSets.main.allSource } @@ -159,7 +148,7 @@ task apiJar(type: Jar) { group 'build' description 'Assemble API library archive' - archiveClassifier.set('api') + archiveClassifier.set 'api' from sourceSets.main.output } @@ -176,7 +165,17 @@ jar { // Copy needed libs to jar from { - exclude "**/module-info.class" + exclude '**/module-info.class', + 'DebugProbesKt.bin', + 'META-INF/maven/**', + 'META-INF/proguard/**', + 'META-INF/versions/**', + 'META-INF/**.RSA', + 'META-INF/com.android.tools/**', + 'META-INF/*.kotlin_module', + 'kotlin/**/*.kotlin_metadata', + 'kotlin/**/*.kotlin_builtins', + 'META-INF/*.version' configurations.jarLibs.collect { it.isDirectory() ? it : zipTree(it) } diff --git a/gradle.properties b/gradle.properties index fecff9c66..4591bbb65 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,5 @@ org.gradle.jvmargs=-Xmx3G +org.gradle.caching=true org.gradle.parallel=true modGroup=com.lambda diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c02..41d9927a4 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradlew b/gradlew index 4f906e0c8..1b6c78733 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/src/main/java/com/lambda/mixin/MixinStateImplementation.java b/src/main/java/com/lambda/mixin/MixinStateImplementation.java index 6609355ab..209588a58 100644 --- a/src/main/java/com/lambda/mixin/MixinStateImplementation.java +++ b/src/main/java/com/lambda/mixin/MixinStateImplementation.java @@ -24,7 +24,7 @@ public class MixinStateImplementation { @Shadow @Final private Block block; - @Inject(method = "addCollisionBoxToList", at = @At("HEAD"), cancellable = true) + @Inject(method = "addCollisionBoxToList", at = @At("HEAD")) public void addCollisionBoxToList(World worldIn, BlockPos pos, AxisAlignedBB entityBox, List collidingBoxes, Entity entityIn, boolean isActualState, CallbackInfo ci) { Jesus.handleAddCollisionBoxToList(pos, block, entityIn, collidingBoxes); } diff --git a/src/main/java/com/lambda/mixin/accessor/AccessorEntityFireworkRocket.java b/src/main/java/com/lambda/mixin/accessor/AccessorEntityFireworkRocket.java index ed38a9578..c5f490d22 100644 --- a/src/main/java/com/lambda/mixin/accessor/AccessorEntityFireworkRocket.java +++ b/src/main/java/com/lambda/mixin/accessor/AccessorEntityFireworkRocket.java @@ -1,6 +1,5 @@ package com.lambda.mixin.accessor; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityFireworkRocket; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/com/lambda/mixin/network/MixinNetworkManager.java b/src/main/java/com/lambda/mixin/network/MixinNetworkManager.java index 566e0048e..d9d44f4fa 100644 --- a/src/main/java/com/lambda/mixin/network/MixinNetworkManager.java +++ b/src/main/java/com/lambda/mixin/network/MixinNetworkManager.java @@ -34,7 +34,7 @@ private void sendPacketPost(Packet packet, CallbackInfo callbackInfo) { } } - @Inject(method = "channelRead0", at = @At("HEAD"), cancellable = true) + @Inject(method = "channelRead0(Lio/netty/channel/ChannelHandlerContext;Lnet/minecraft/network/Packet;)V", at = @At("HEAD"), cancellable = true) private void channelReadPre(ChannelHandlerContext context, Packet packet, CallbackInfo callbackInfo) { PacketEvent event = new PacketEvent.Receive(packet); LambdaEventBus.INSTANCE.post(event); @@ -44,7 +44,7 @@ private void channelReadPre(ChannelHandlerContext context, Packet packet, Cal } } - @Inject(method = "channelRead0", at = @At("RETURN")) + @Inject(method = "channelRead0(Lio/netty/channel/ChannelHandlerContext;Lnet/minecraft/network/Packet;)V", at = @At("RETURN")) private void channelReadPost(ChannelHandlerContext context, Packet packet, CallbackInfo callbackInfo) { PacketEvent event = new PacketEvent.PostReceive(packet); LambdaEventBus.INSTANCE.post(event); diff --git a/src/main/java/com/lambda/mixin/player/MixinEntityPlayerSP.java b/src/main/java/com/lambda/mixin/player/MixinEntityPlayerSP.java index 5dc96568e..57e40faa7 100644 --- a/src/main/java/com/lambda/mixin/player/MixinEntityPlayerSP.java +++ b/src/main/java/com/lambda/mixin/player/MixinEntityPlayerSP.java @@ -120,7 +120,7 @@ protected void mixinIsCurrentViewEntity(CallbackInfoReturnable cir) { } } - @Inject(method = "sendChatMessage", at = @At("HEAD"), cancellable = true) + @Inject(method = "sendChatMessage", at = @At("HEAD")) public void sendChatMessage(String message, CallbackInfo ci) { MessageManager.INSTANCE.setLastPlayerMessage(message); } diff --git a/src/main/java/com/lambda/mixin/render/MixinEntityRenderer.java b/src/main/java/com/lambda/mixin/render/MixinEntityRenderer.java index a05e34a5a..9bb9dcc61 100644 --- a/src/main/java/com/lambda/mixin/render/MixinEntityRenderer.java +++ b/src/main/java/com/lambda/mixin/render/MixinEntityRenderer.java @@ -51,7 +51,7 @@ public void displayItemActivation(ItemStack stack, CallbackInfo ci) { } } - @Inject(method = "setupFog", at = @At(value = "RETURN"), cancellable = true) + @Inject(method = "setupFog", at = @At(value = "RETURN")) public void setupFog(int startCoords, float partialTicks, CallbackInfo callbackInfo) { if (NoRender.INSTANCE.isEnabled() && NoRender.INSTANCE.getFog()) { GlStateManager.disableFog(); diff --git a/src/main/java/com/lambda/mixin/render/MixinLayerCape.java b/src/main/java/com/lambda/mixin/render/MixinLayerCape.java index 74a2832d1..c99c7cbd5 100644 --- a/src/main/java/com/lambda/mixin/render/MixinLayerCape.java +++ b/src/main/java/com/lambda/mixin/render/MixinLayerCape.java @@ -15,7 +15,7 @@ public class MixinLayerCape { @Shadow @Final private RenderPlayer playerRenderer; - @Inject(method = "doRenderLayer", at = @At("HEAD"), cancellable = true) + @Inject(method = "doRenderLayer(Lnet/minecraft/client/entity/AbstractClientPlayer;FFFFFFF)V", at = @At("HEAD"), cancellable = true) public void doRenderLayer(AbstractClientPlayer player, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale, CallbackInfo ci) { if (Capes.INSTANCE.tryRenderCape(playerRenderer, player, partialTicks)) ci.cancel(); diff --git a/src/main/java/com/lambda/mixin/render/MixinModelBiped.java b/src/main/java/com/lambda/mixin/render/MixinModelBiped.java index fbc50aebb..b4e26d732 100644 --- a/src/main/java/com/lambda/mixin/render/MixinModelBiped.java +++ b/src/main/java/com/lambda/mixin/render/MixinModelBiped.java @@ -109,7 +109,7 @@ public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageI this.bipedLeftArm.rotationPointX = MathHelper.cos(this.bipedBody.rotateAngleY) * 5.0F; this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY; this.bipedLeftArm.rotateAngleY += this.bipedBody.rotateAngleY; - this.bipedLeftArm.rotateAngleX += this.bipedBody.rotateAngleY; + this.bipedLeftArm.rotateAngleX += this.bipedBody.rotateAngleX; f1 = 1.0F - this.swingProgress; f1 = f1 * f1; f1 = f1 * f1; diff --git a/src/main/java/com/lambda/mixin/render/MixinModelBoat.java b/src/main/java/com/lambda/mixin/render/MixinModelBoat.java index 292086578..7d9a1ae72 100644 --- a/src/main/java/com/lambda/mixin/render/MixinModelBoat.java +++ b/src/main/java/com/lambda/mixin/render/MixinModelBoat.java @@ -23,7 +23,7 @@ public void render(Entity entityIn, float limbSwing, float limbSwingAmount, floa } } - @Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/ModelBoat;setRotationAngles(FFFFFFLnet/minecraft/entity/Entity;)V"), cancellable = true) + @Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/ModelBoat;setRotationAngles(FFFFFFLnet/minecraft/entity/Entity;)V")) private void onRender(final Entity entityIn, final float limbSwing, final float limbSwingAmount, final float ageInTicks, final float netHeadYaw, final float headPitch, final float scale, final CallbackInfo ci) { if (BoatFly.shouldModifyScale(entityIn)) { final double size = BoatFly.INSTANCE.getSize(); diff --git a/src/main/java/com/lambda/mixin/render/MixinRenderLivingBase.java b/src/main/java/com/lambda/mixin/render/MixinRenderLivingBase.java index a15cf9789..9f5a0f5a8 100644 --- a/src/main/java/com/lambda/mixin/render/MixinRenderLivingBase.java +++ b/src/main/java/com/lambda/mixin/render/MixinRenderLivingBase.java @@ -12,7 +12,7 @@ @Mixin(value = RenderLivingBase.class, priority = 114514) public class MixinRenderLivingBase { - @Inject(method = "renderModel", at = @At("HEAD"), cancellable = true) + @Inject(method = "renderModel", at = @At("HEAD")) public void renderModelHead(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, CallbackInfo ci) { if (entity == null || !RenderEntityEvent.getRenderingEntities()) return; @@ -20,7 +20,7 @@ public void renderModelHead(T entity, float limbSwing, float limbSwingAmount, fl LambdaEventBus.INSTANCE.post(eventModel); } - @Inject(method = "renderModel", at = @At("RETURN"), cancellable = true) + @Inject(method = "renderModel", at = @At("RETURN")) public void renderEntityReturn(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, CallbackInfo ci) { if (entity == null || !RenderEntityEvent.getRenderingEntities()) return; diff --git a/src/main/java/com/lambda/mixin/render/MixinRenderPlayer.java b/src/main/java/com/lambda/mixin/render/MixinRenderPlayer.java index e3519f18e..e4787fff3 100644 --- a/src/main/java/com/lambda/mixin/render/MixinRenderPlayer.java +++ b/src/main/java/com/lambda/mixin/render/MixinRenderPlayer.java @@ -26,7 +26,7 @@ public MixinRenderPlayer(RenderManager renderManagerIn, ModelBase modelBaseIn, f @Shadow protected abstract void setModelVisibilities(AbstractClientPlayer clientPlayer); - @Inject(method = "applyRotations", at = @At("RETURN")) + @Inject(method = "applyRotations(Lnet/minecraft/client/entity/AbstractClientPlayer;FFF)V", at = @At("RETURN")) protected void applyRotations(AbstractClientPlayer entityLiving, float ageInTicks, float rotationYaw, float partialTicks, CallbackInfo ci) { if (entityLiving == Wrapper.getMinecraft().player && ElytraFlight.INSTANCE.shouldSwing()) { Vec3d vec3d = entityLiving.getLook(partialTicks); @@ -42,7 +42,7 @@ protected void applyRotations(AbstractClientPlayer entityLiving, float ageInTick } // Force it to render the original player in Freecam - @Inject(method = "doRender", at = @At(value = "FIELD", target = "Lnet/minecraft/client/renderer/entity/RenderManager;renderViewEntity:Lnet/minecraft/entity/Entity;")) + @Inject(method = "doRender(Lnet/minecraft/client/entity/AbstractClientPlayer;DDDFF)V", at = @At(value = "FIELD", target = "Lnet/minecraft/client/renderer/entity/RenderManager;renderViewEntity:Lnet/minecraft/entity/Entity;")) public void doRenderGetRenderViewEntity(AbstractClientPlayer entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo ci) { if (Freecam.INSTANCE.isEnabled() && Wrapper.getMinecraft().getRenderViewEntity() != entity) { double renderY = y; diff --git a/src/main/java/com/lambda/mixin/render/MixinTileEntitySignRenderer.java b/src/main/java/com/lambda/mixin/render/MixinTileEntitySignRenderer.java index 989f7ef05..c779e8c5d 100644 --- a/src/main/java/com/lambda/mixin/render/MixinTileEntitySignRenderer.java +++ b/src/main/java/com/lambda/mixin/render/MixinTileEntitySignRenderer.java @@ -19,7 +19,7 @@ public class MixinTileEntitySignRenderer { private final Minecraft mc = Minecraft.getMinecraft(); - @Redirect(method = "render", at = @At(value = "FIELD", target = "Lnet/minecraft/tileentity/TileEntitySign;signText:[Lnet/minecraft/util/text/ITextComponent;", opcode = Opcodes.GETFIELD)) + @Redirect(method = "render(Lnet/minecraft/tileentity/TileEntitySign;DDDFIF)V", at = @At(value = "FIELD", target = "Lnet/minecraft/tileentity/TileEntitySign;signText:[Lnet/minecraft/util/text/ITextComponent;", opcode = Opcodes.GETFIELD)) public ITextComponent[] getRenderViewEntity(TileEntitySign sign) { if (NoRender.INSTANCE.isEnabled() && NoRender.INSTANCE.getSignText()) { GuiScreen screen = mc.currentScreen; diff --git a/src/main/kotlin/com/lambda/client/capeapi/AbstractUUIDManager.kt b/src/main/kotlin/com/lambda/client/capeapi/AbstractUUIDManager.kt index 3e36624fa..5ea46e3ee 100644 --- a/src/main/kotlin/com/lambda/client/capeapi/AbstractUUIDManager.kt +++ b/src/main/kotlin/com/lambda/client/capeapi/AbstractUUIDManager.kt @@ -18,7 +18,6 @@ abstract class AbstractUUIDManager( private val file = File(filePath) - @Suppress("DEPRECATION") private val parser = JsonParser() private val gson = GsonBuilder().setPrettyPrinting().create() private val type = TypeToken.getArray(PlayerProfile::class.java).type @@ -79,7 +78,7 @@ abstract class AbstractUUIDManager( null } else { try { - @Suppress("DEPRECATION") val jsonElement = parser.parse(response) + val jsonElement = parser.parse(response) if (isUUID) { val name = jsonElement.asJsonArray.last().asJsonObject["name"].asString PlayerProfile(UUID.fromString(nameOrUUID), name) diff --git a/src/main/kotlin/com/lambda/client/command/ClientCommand.kt b/src/main/kotlin/com/lambda/client/command/ClientCommand.kt index 8a835b12f..c0c7fdcd2 100644 --- a/src/main/kotlin/com/lambda/client/command/ClientCommand.kt +++ b/src/main/kotlin/com/lambda/client/command/ClientCommand.kt @@ -1,6 +1,10 @@ package com.lambda.client.command import com.lambda.client.capeapi.PlayerProfile +import com.lambda.client.command.CommandBuilder +import com.lambda.client.command.args.AbstractArg +import com.lambda.client.command.utils.BuilderBlock +import com.lambda.client.command.utils.ExecuteBlock import com.lambda.client.event.ClientExecuteEvent import com.lambda.client.event.SafeExecuteEvent import com.lambda.client.gui.hudgui.AbstractHudElement @@ -9,10 +13,6 @@ import com.lambda.client.module.modules.client.CommandConfig import com.lambda.client.util.Wrapper import com.lambda.client.util.threads.defaultScope import com.lambda.client.util.threads.toSafe -import com.lambda.client.command.CommandBuilder -import com.lambda.client.command.args.AbstractArg -import com.lambda.client.command.utils.BuilderBlock -import com.lambda.client.command.utils.ExecuteBlock import kotlinx.coroutines.launch import net.minecraft.block.Block import net.minecraft.item.Item diff --git a/src/main/kotlin/com/lambda/client/command/CommandManager.kt b/src/main/kotlin/com/lambda/client/command/CommandManager.kt index f08a52e0c..272a32e27 100644 --- a/src/main/kotlin/com/lambda/client/command/CommandManager.kt +++ b/src/main/kotlin/com/lambda/client/command/CommandManager.kt @@ -1,6 +1,10 @@ package com.lambda.client.command import com.lambda.client.LambdaMod +import com.lambda.client.command.utils.CommandNotFoundException +import com.lambda.client.command.utils.SubCommandNotFoundException +import com.lambda.client.commons.utils.ClassUtils +import com.lambda.client.commons.utils.ClassUtils.instance import com.lambda.client.event.ClientExecuteEvent import com.lambda.client.event.LambdaEventBus import com.lambda.client.module.modules.client.CommandConfig @@ -9,13 +13,6 @@ import com.lambda.client.util.text.MessageSendHelper import com.lambda.client.util.text.formatValue import com.lambda.client.util.threads.defaultScope import com.lambda.client.util.threads.onMainThread -import com.lambda.client.command.AbstractCommandManager -import com.lambda.client.command.Command -import com.lambda.client.command.CommandBuilder -import com.lambda.client.command.utils.CommandNotFoundException -import com.lambda.client.command.utils.SubCommandNotFoundException -import com.lambda.client.commons.utils.ClassUtils -import com.lambda.client.commons.utils.ClassUtils.instance import kotlinx.coroutines.Deferred import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking diff --git a/src/main/kotlin/com/lambda/client/commons/collections/CloseableList.kt b/src/main/kotlin/com/lambda/client/commons/collections/CloseableList.kt index 0e6cea8ea..8c456b9e9 100644 --- a/src/main/kotlin/com/lambda/client/commons/collections/CloseableList.kt +++ b/src/main/kotlin/com/lambda/client/commons/collections/CloseableList.kt @@ -36,7 +36,7 @@ class CloseableList( override fun removeAll(elements: Collection) = if (closed) throw IllegalAccessException("This list is immutable!") - else list.removeAll(elements) + else list.removeAll(elements.toSet()) override fun removeAt(index: Int): E = if (closed) throw IllegalAccessException("This list is immutable!") @@ -44,7 +44,7 @@ class CloseableList( override fun retainAll(elements: Collection) = if (closed) throw IllegalAccessException("This list is immutable!") - else list.retainAll(elements) + else list.retainAll(elements.toSet()) override fun set(index: Int, element: E): E = if (closed) throw IllegalAccessException("This list is immutable!") diff --git a/src/main/kotlin/com/lambda/client/gui/hudgui/elements/player/InventoryViewer.kt b/src/main/kotlin/com/lambda/client/gui/hudgui/elements/player/InventoryViewer.kt index 585526246..98a204626 100644 --- a/src/main/kotlin/com/lambda/client/gui/hudgui/elements/player/InventoryViewer.kt +++ b/src/main/kotlin/com/lambda/client/gui/hudgui/elements/player/InventoryViewer.kt @@ -15,7 +15,6 @@ import net.minecraft.client.renderer.GlStateManager import net.minecraft.client.renderer.Tessellator import net.minecraft.client.renderer.vertex.DefaultVertexFormats import net.minecraft.init.Blocks -import net.minecraft.inventory.Container import net.minecraft.inventory.ContainerChest import net.minecraft.inventory.InventoryBasic import net.minecraft.item.ItemStack diff --git a/src/main/kotlin/com/lambda/client/gui/rgui/InteractiveComponent.kt b/src/main/kotlin/com/lambda/client/gui/rgui/InteractiveComponent.kt index 44f86dca6..5e630e76b 100644 --- a/src/main/kotlin/com/lambda/client/gui/rgui/InteractiveComponent.kt +++ b/src/main/kotlin/com/lambda/client/gui/rgui/InteractiveComponent.kt @@ -1,9 +1,9 @@ package com.lambda.client.gui.rgui +import com.lambda.client.commons.interfaces.Nameable import com.lambda.client.setting.GuiConfig import com.lambda.client.setting.configs.AbstractConfig import com.lambda.client.util.math.Vec2f -import com.lambda.client.commons.interfaces.Nameable open class InteractiveComponent( name: String, @@ -65,7 +65,6 @@ open class InteractiveComponent( private fun isInComponent(mousePos: Vec2f) = mousePos.x in 0.0f..width && mousePos.y in 0.0f..height - @Suppress("UNUSED") enum class MouseState { NONE, HOVER, CLICK, DRAG } diff --git a/src/main/kotlin/com/lambda/client/manager/managers/KamiMojiManager.kt b/src/main/kotlin/com/lambda/client/manager/managers/KamiMojiManager.kt index c43c37e4d..4bcf1ab17 100644 --- a/src/main/kotlin/com/lambda/client/manager/managers/KamiMojiManager.kt +++ b/src/main/kotlin/com/lambda/client/manager/managers/KamiMojiManager.kt @@ -68,7 +68,7 @@ object LambdaMojiManager : Manager { if (globalVer != null) { if (!globalVer.has("version")) { updateEmojis() - } else if (globalVer["version"].asInt != localVer?.get("version")?.asInt ?: 8) { + } else if (globalVer["version"].asInt != (localVer?.get("version")?.asInt ?: 8)) { updateEmojis() } } diff --git a/src/main/kotlin/com/lambda/client/manager/managers/NetworkManager.kt b/src/main/kotlin/com/lambda/client/manager/managers/NetworkManager.kt index f6090c188..481bd1b65 100644 --- a/src/main/kotlin/com/lambda/client/manager/managers/NetworkManager.kt +++ b/src/main/kotlin/com/lambda/client/manager/managers/NetworkManager.kt @@ -11,7 +11,6 @@ object NetworkManager : Manager { init { BackgroundScope.launchLooping("offline", 1500L) { - @Suppress("BlockingMethodInNonBlockingContext") isOffline = try { Socket().use { socket -> socket.connect(InetSocketAddress("1.1.1.1", 80), 100) diff --git a/src/main/kotlin/com/lambda/client/mixin/extension/Render.kt b/src/main/kotlin/com/lambda/client/mixin/extension/Render.kt index 4c48dd8bd..c5151fdb5 100644 --- a/src/main/kotlin/com/lambda/client/mixin/extension/Render.kt +++ b/src/main/kotlin/com/lambda/client/mixin/extension/Render.kt @@ -6,6 +6,7 @@ import com.lambda.mixin.accessor.render.AccessorShaderGroup import com.lambda.mixin.accessor.render.AccessorViewFrustum import net.minecraft.client.renderer.RenderGlobal import net.minecraft.client.renderer.ViewFrustum +import net.minecraft.client.renderer.chunk.RenderChunk import net.minecraft.client.renderer.entity.RenderManager import net.minecraft.client.shader.Framebuffer import net.minecraft.client.shader.Shader @@ -23,4 +24,4 @@ val ShaderGroup.listShaders: List get() = (this as AccessorShaderGroup). val ShaderGroup.listFrameBuffers: List get() = (this as AccessorShaderGroup).listFramebuffers // Unused, but kept for consistency. Java equivalent used in Mixins -fun ViewFrustum.getRenderChunk(pos: BlockPos) = (this as AccessorViewFrustum).invokeGetRenderChunk(pos) +fun ViewFrustum.getRenderChunk(pos: BlockPos): RenderChunk = (this as AccessorViewFrustum).invokeGetRenderChunk(pos) diff --git a/src/main/kotlin/com/lambda/client/module/modules/combat/CrystalBasePlace.kt b/src/main/kotlin/com/lambda/client/module/modules/combat/CrystalBasePlace.kt index 450b3f1da..38b6898f2 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/combat/CrystalBasePlace.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/combat/CrystalBasePlace.kt @@ -2,6 +2,7 @@ package com.lambda.client.module.modules.combat import com.lambda.client.event.SafeClientEvent import com.lambda.client.event.events.RenderWorldEvent +import com.lambda.client.event.listener.listener import com.lambda.client.manager.managers.CombatManager import com.lambda.client.manager.managers.HotbarManager.resetHotbar import com.lambda.client.manager.managers.HotbarManager.serverSideItem @@ -25,7 +26,6 @@ import com.lambda.client.util.world.PlaceInfo import com.lambda.client.util.world.getNeighbour import com.lambda.client.util.world.hasNeighbour import com.lambda.client.util.world.isPlaceable -import com.lambda.client.event.listener.listener import net.minecraft.entity.EntityLivingBase import net.minecraft.init.Blocks import net.minecraft.item.ItemStack @@ -145,9 +145,7 @@ object CrystalBasePlace : Module( val eyePos = player.getPositionEyes(1.0f) val posList = VectorUtils.getBlockPosInSphere(eyePos, range) val maxCurrentDamage = CombatManager.placeMap.entries - .filter { eyePos.distanceTo(it.key) < range } - .map { it.value.targetDamage } - .maxOrNull() ?: 0.0f + .filter { eyePos.distanceTo(it.key) < range }.maxOfOrNull { it.value.targetDamage } ?: 0.0f for (pos in posList) { // Placeable check diff --git a/src/main/kotlin/com/lambda/client/module/modules/combat/VisualRange.kt b/src/main/kotlin/com/lambda/client/module/modules/combat/VisualRange.kt index c56b164eb..6245636ca 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/combat/VisualRange.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/combat/VisualRange.kt @@ -60,7 +60,7 @@ object VisualRange : Module( if (isEnabled) onLeave(player) } } - playerSet.removeAll(toRemove) + playerSet.removeAll(toRemove.toSet()) } } diff --git a/src/main/kotlin/com/lambda/client/module/modules/misc/FakePlayer.kt b/src/main/kotlin/com/lambda/client/module/modules/misc/FakePlayer.kt index b98111178..85ff10011 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/misc/FakePlayer.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/misc/FakePlayer.kt @@ -4,6 +4,7 @@ import com.lambda.client.command.CommandManager import com.lambda.client.event.SafeClientEvent import com.lambda.client.event.events.ConnectionEvent import com.lambda.client.event.events.GuiEvent +import com.lambda.client.event.listener.listener import com.lambda.client.module.Category import com.lambda.client.module.Module import com.lambda.client.util.text.MessageSendHelper @@ -11,7 +12,6 @@ import com.lambda.client.util.text.formatValue import com.lambda.client.util.threads.onMainThread import com.lambda.client.util.threads.onMainThreadSafe import com.lambda.client.util.threads.runSafeR -import com.lambda.client.event.listener.listener import com.mojang.authlib.GameProfile import kotlinx.coroutines.runBlocking import net.minecraft.client.entity.EntityOtherPlayerMP @@ -34,7 +34,7 @@ object FakePlayer : Module( private val copyPotions by setting("Copy Potions", true) private val maxArmor by setting("Max Armor", false) private val gappleEffects by setting("Gapple Effects", false) - val playerName by setting("Player Name", "Player") + private val playerName by setting("Player Name", "Player") private const val ENTITY_ID = -696969420 private var fakePlayer: EntityOtherPlayerMP? = null diff --git a/src/main/kotlin/com/lambda/client/module/modules/misc/LogoutLogger.kt b/src/main/kotlin/com/lambda/client/module/modules/misc/LogoutLogger.kt index 7f33be3e3..6df1606b8 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/misc/LogoutLogger.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/misc/LogoutLogger.kt @@ -61,7 +61,7 @@ object LogoutLogger : Module( } } - loggedPlayers.keys.removeAll(toRemove) + loggedPlayers.keys.removeAll(toRemove.toSet()) } } } diff --git a/src/main/kotlin/com/lambda/client/module/modules/movement/ElytraFlight.kt b/src/main/kotlin/com/lambda/client/module/modules/movement/ElytraFlight.kt index 9706180a6..6cc63b19f 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/movement/ElytraFlight.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/movement/ElytraFlight.kt @@ -384,7 +384,7 @@ object ElytraFlight : Module( if (!isStandingStillH || moveUp) { if ((moveUp || hoverState) && (currentSpeed >= 0.8 || player.motionY > 1.0)) { upwardFlight(currentSpeed, getYaw()) - } else if (!isStandingStillH || moveUp) { /* Runs when pressing wasd */ + } else { /* Runs when pressing wasd */ packetPitch = forwardPitch.toFloat() player.motionY = -fallSpeedControl.toDouble() setSpeed(getYaw(), moveUp) diff --git a/src/main/kotlin/com/lambda/client/module/modules/movement/EntitySpeed.kt b/src/main/kotlin/com/lambda/client/module/modules/movement/EntitySpeed.kt index 6a7d6062f..77fa7a0b8 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/movement/EntitySpeed.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/movement/EntitySpeed.kt @@ -5,10 +5,8 @@ import com.lambda.client.module.Category import com.lambda.client.module.Module import com.lambda.client.util.EntityUtils.steerEntity import com.lambda.client.util.threads.safeListener -import net.minecraft.entity.Entity import net.minecraft.entity.item.EntityBoat import net.minecraft.entity.passive.AbstractHorse -import net.minecraft.entity.passive.EntityHorse import net.minecraft.entity.passive.EntityPig object EntitySpeed : Module( diff --git a/src/main/kotlin/com/lambda/client/module/modules/render/VoidESP.kt b/src/main/kotlin/com/lambda/client/module/modules/render/VoidESP.kt index 5237b8c27..03d7f75cc 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/render/VoidESP.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/render/VoidESP.kt @@ -29,7 +29,6 @@ object VoidESP : Module( private val range by setting("Range", 8, 4..32, 1) private val dangerous by setting("Show safe void", false, description = "Show all void holes, rather than just dangerous ones") - @Suppress("UNUSED") private enum class Mode { BLOCK_HOLE, BLOCK_VOID, FLAT } diff --git a/src/main/kotlin/com/lambda/client/util/TimeUtils.kt b/src/main/kotlin/com/lambda/client/util/TimeUtils.kt index 064bbf5e6..6af5b3380 100644 --- a/src/main/kotlin/com/lambda/client/util/TimeUtils.kt +++ b/src/main/kotlin/com/lambda/client/util/TimeUtils.kt @@ -38,7 +38,6 @@ object TimeUtils { HH("hh") } - @Suppress("UNUSED") enum class TimeUnit { H12, H24 } diff --git a/src/main/resources/mixins.lambda.json b/src/main/resources/mixins.lambda.json index 67b8a6c1d..a8eae32ff 100644 --- a/src/main/resources/mixins.lambda.json +++ b/src/main/resources/mixins.lambda.json @@ -3,6 +3,7 @@ "compatibilityLevel": "JAVA_8", "package": "com.lambda.mixin", "refmap": "mixins.lambda.refmap.json", + "minVersion": "0.8.5", "client": [ "MixinElytraSound", "MixinKeyBinding",