diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..b9880e79 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,1457 @@ +[*] +charset = utf-8 +end_of_line = crlf +indent_size = 4 +indent_style = space +insert_final_newline = false +max_line_length = 120 +tab_width = 4 +ij_continuation_indent_size = 8 +ij_formatter_off_tag = @formatter:off +ij_formatter_on_tag = @formatter:on +ij_formatter_tags_enabled = true +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_block_comment_add_space = false +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 + +[*.feature] +indent_size = 2 +ij_gherkin_keep_indents_on_empty_lines = false + +[*.java] +ij_java_align_consecutive_assignments = false +ij_java_align_consecutive_variable_declarations = false +ij_java_align_group_field_declarations = false +ij_java_align_multiline_annotation_parameters = false +ij_java_align_multiline_array_initializer_expression = false +ij_java_align_multiline_assignment = false +ij_java_align_multiline_binary_operation = false +ij_java_align_multiline_chained_methods = false +ij_java_align_multiline_deconstruction_list_components = true +ij_java_align_multiline_extends_list = false +ij_java_align_multiline_for = true +ij_java_align_multiline_method_parentheses = false +ij_java_align_multiline_parameters = true +ij_java_align_multiline_parameters_in_calls = false +ij_java_align_multiline_parenthesized_expression = false +ij_java_align_multiline_records = true +ij_java_align_multiline_resources = true +ij_java_align_multiline_ternary_operation = false +ij_java_align_multiline_text_blocks = false +ij_java_align_multiline_throws_list = false +ij_java_align_subsequent_simple_methods = false +ij_java_align_throws_keyword = false +ij_java_align_types_in_multi_catch = true +ij_java_annotation_parameter_wrap = off +ij_java_array_initializer_new_line_after_left_brace = false +ij_java_array_initializer_right_brace_on_new_line = false +ij_java_array_initializer_wrap = off +ij_java_assert_statement_colon_on_next_line = false +ij_java_assert_statement_wrap = off +ij_java_assignment_wrap = off +ij_java_binary_operation_sign_on_next_line = false +ij_java_binary_operation_wrap = off +ij_java_blank_lines_after_anonymous_class_header = 0 +ij_java_blank_lines_after_class_header = 0 +ij_java_blank_lines_after_imports = 1 +ij_java_blank_lines_after_package = 1 +ij_java_blank_lines_around_class = 1 +ij_java_blank_lines_around_field = 0 +ij_java_blank_lines_around_field_in_interface = 0 +ij_java_blank_lines_around_initializer = 1 +ij_java_blank_lines_around_method = 1 +ij_java_blank_lines_around_method_in_interface = 1 +ij_java_blank_lines_before_class_end = 0 +ij_java_blank_lines_before_imports = 1 +ij_java_blank_lines_before_method_body = 0 +ij_java_blank_lines_before_package = 0 +ij_java_block_brace_style = end_of_line +ij_java_block_comment_add_space = false +ij_java_block_comment_at_first_column = true +ij_java_builder_methods = none +ij_java_call_parameters_new_line_after_left_paren = false +ij_java_call_parameters_right_paren_on_new_line = false +ij_java_call_parameters_wrap = off +ij_java_case_statement_on_separate_line = true +ij_java_catch_on_new_line = false +ij_java_class_annotation_wrap = split_into_lines +ij_java_class_brace_style = end_of_line +ij_java_class_count_to_use_import_on_demand = 5 +ij_java_class_names_in_javadoc = 1 +ij_java_deconstruction_list_wrap = normal +ij_java_do_not_indent_top_level_class_members = false +ij_java_do_not_wrap_after_single_annotation = false +ij_java_do_not_wrap_after_single_annotation_in_parameter = false +ij_java_do_while_brace_force = never +ij_java_doc_add_blank_line_after_description = true +ij_java_doc_add_blank_line_after_param_comments = false +ij_java_doc_add_blank_line_after_return = false +ij_java_doc_add_p_tag_on_empty_lines = true +ij_java_doc_align_exception_comments = true +ij_java_doc_align_param_comments = true +ij_java_doc_do_not_wrap_if_one_line = false +ij_java_doc_enable_formatting = true +ij_java_doc_enable_leading_asterisks = true +ij_java_doc_indent_on_continuation = false +ij_java_doc_keep_empty_lines = true +ij_java_doc_keep_empty_parameter_tag = true +ij_java_doc_keep_empty_return_tag = true +ij_java_doc_keep_empty_throws_tag = true +ij_java_doc_keep_invalid_tags = true +ij_java_doc_param_description_on_new_line = false +ij_java_doc_preserve_line_breaks = false +ij_java_doc_use_throws_not_exception_tag = true +ij_java_else_on_new_line = false +ij_java_entity_dd_suffix = EJB +ij_java_entity_eb_suffix = Bean +ij_java_entity_hi_suffix = Home +ij_java_entity_lhi_prefix = Local +ij_java_entity_lhi_suffix = Home +ij_java_entity_li_prefix = Local +ij_java_entity_pk_class = java.lang.String +ij_java_entity_vo_suffix = VO +ij_java_enum_constants_wrap = off +ij_java_extends_keyword_wrap = off +ij_java_extends_list_wrap = off +ij_java_field_annotation_wrap = split_into_lines +ij_java_finally_on_new_line = false +ij_java_for_brace_force = never +ij_java_for_statement_new_line_after_left_paren = false +ij_java_for_statement_right_paren_on_new_line = false +ij_java_for_statement_wrap = off +ij_java_generate_final_locals = false +ij_java_generate_final_parameters = false +ij_java_if_brace_force = never +ij_java_imports_layout = *,|,javax.**,java.**,|,$* +ij_java_indent_case_from_switch = true +ij_java_insert_inner_class_imports = false +ij_java_insert_override_annotation = true +ij_java_keep_blank_lines_before_right_brace = 2 +ij_java_keep_blank_lines_between_package_declaration_and_header = 2 +ij_java_keep_blank_lines_in_code = 2 +ij_java_keep_blank_lines_in_declarations = 2 +ij_java_keep_builder_methods_indents = false +ij_java_keep_control_statement_in_one_line = true +ij_java_keep_first_column_comment = true +ij_java_keep_indents_on_empty_lines = false +ij_java_keep_line_breaks = true +ij_java_keep_multiple_expressions_in_one_line = false +ij_java_keep_simple_blocks_in_one_line = false +ij_java_keep_simple_classes_in_one_line = false +ij_java_keep_simple_lambdas_in_one_line = false +ij_java_keep_simple_methods_in_one_line = false +ij_java_label_indent_absolute = false +ij_java_label_indent_size = 0 +ij_java_lambda_brace_style = end_of_line +ij_java_layout_static_imports_separately = true +ij_java_line_comment_add_space = false +ij_java_line_comment_add_space_on_reformat = false +ij_java_line_comment_at_first_column = true +ij_java_message_dd_suffix = EJB +ij_java_message_eb_suffix = Bean +ij_java_method_annotation_wrap = split_into_lines +ij_java_method_brace_style = end_of_line +ij_java_method_call_chain_wrap = off +ij_java_method_parameters_new_line_after_left_paren = false +ij_java_method_parameters_right_paren_on_new_line = false +ij_java_method_parameters_wrap = off +ij_java_modifier_list_wrap = false +ij_java_multi_catch_types_wrap = normal +ij_java_names_count_to_use_import_on_demand = 3 +ij_java_new_line_after_lparen_in_annotation = false +ij_java_new_line_after_lparen_in_deconstruction_pattern = true +ij_java_new_line_after_lparen_in_record_header = false +ij_java_packages_to_use_import_on_demand = java.awt.*,javax.swing.* +ij_java_parameter_annotation_wrap = off +ij_java_parentheses_expression_new_line_after_left_paren = false +ij_java_parentheses_expression_right_paren_on_new_line = false +ij_java_place_assignment_sign_on_next_line = false +ij_java_prefer_longer_names = true +ij_java_prefer_parameters_wrap = false +ij_java_record_components_wrap = normal +ij_java_repeat_synchronized = true +ij_java_replace_instanceof_and_cast = false +ij_java_replace_null_check = true +ij_java_replace_sum_lambda_with_method_ref = true +ij_java_resource_list_new_line_after_left_paren = false +ij_java_resource_list_right_paren_on_new_line = false +ij_java_resource_list_wrap = off +ij_java_rparen_on_new_line_in_annotation = false +ij_java_rparen_on_new_line_in_deconstruction_pattern = true +ij_java_rparen_on_new_line_in_record_header = false +ij_java_session_dd_suffix = EJB +ij_java_session_eb_suffix = Bean +ij_java_session_hi_suffix = Home +ij_java_session_lhi_prefix = Local +ij_java_session_lhi_suffix = Home +ij_java_session_li_prefix = Local +ij_java_session_si_suffix = Service +ij_java_space_after_closing_angle_bracket_in_type_argument = false +ij_java_space_after_colon = true +ij_java_space_after_comma = true +ij_java_space_after_comma_in_type_arguments = true +ij_java_space_after_for_semicolon = true +ij_java_space_after_quest = true +ij_java_space_after_type_cast = true +ij_java_space_before_annotation_array_initializer_left_brace = false +ij_java_space_before_annotation_parameter_list = false +ij_java_space_before_array_initializer_left_brace = false +ij_java_space_before_catch_keyword = true +ij_java_space_before_catch_left_brace = true +ij_java_space_before_catch_parentheses = true +ij_java_space_before_class_left_brace = true +ij_java_space_before_colon = true +ij_java_space_before_colon_in_foreach = true +ij_java_space_before_comma = false +ij_java_space_before_deconstruction_list = false +ij_java_space_before_do_left_brace = true +ij_java_space_before_else_keyword = true +ij_java_space_before_else_left_brace = true +ij_java_space_before_finally_keyword = true +ij_java_space_before_finally_left_brace = true +ij_java_space_before_for_left_brace = true +ij_java_space_before_for_parentheses = true +ij_java_space_before_for_semicolon = false +ij_java_space_before_if_left_brace = true +ij_java_space_before_if_parentheses = true +ij_java_space_before_method_call_parentheses = false +ij_java_space_before_method_left_brace = true +ij_java_space_before_method_parentheses = false +ij_java_space_before_opening_angle_bracket_in_type_parameter = false +ij_java_space_before_quest = true +ij_java_space_before_switch_left_brace = true +ij_java_space_before_switch_parentheses = true +ij_java_space_before_synchronized_left_brace = true +ij_java_space_before_synchronized_parentheses = true +ij_java_space_before_try_left_brace = true +ij_java_space_before_try_parentheses = true +ij_java_space_before_type_parameter_list = false +ij_java_space_before_while_keyword = true +ij_java_space_before_while_left_brace = true +ij_java_space_before_while_parentheses = true +ij_java_space_inside_one_line_enum_braces = false +ij_java_space_within_empty_array_initializer_braces = false +ij_java_space_within_empty_method_call_parentheses = false +ij_java_space_within_empty_method_parentheses = false +ij_java_spaces_around_additive_operators = true +ij_java_spaces_around_annotation_eq = true +ij_java_spaces_around_assignment_operators = true +ij_java_spaces_around_bitwise_operators = true +ij_java_spaces_around_equality_operators = true +ij_java_spaces_around_lambda_arrow = true +ij_java_spaces_around_logical_operators = true +ij_java_spaces_around_method_ref_dbl_colon = false +ij_java_spaces_around_multiplicative_operators = true +ij_java_spaces_around_relational_operators = true +ij_java_spaces_around_shift_operators = true +ij_java_spaces_around_type_bounds_in_type_parameters = true +ij_java_spaces_around_unary_operator = false +ij_java_spaces_within_angle_brackets = false +ij_java_spaces_within_annotation_parentheses = false +ij_java_spaces_within_array_initializer_braces = false +ij_java_spaces_within_braces = false +ij_java_spaces_within_brackets = false +ij_java_spaces_within_cast_parentheses = false +ij_java_spaces_within_catch_parentheses = false +ij_java_spaces_within_deconstruction_list = false +ij_java_spaces_within_for_parentheses = false +ij_java_spaces_within_if_parentheses = false +ij_java_spaces_within_method_call_parentheses = false +ij_java_spaces_within_method_parentheses = false +ij_java_spaces_within_parentheses = false +ij_java_spaces_within_record_header = false +ij_java_spaces_within_switch_parentheses = false +ij_java_spaces_within_synchronized_parentheses = false +ij_java_spaces_within_try_parentheses = false +ij_java_spaces_within_while_parentheses = false +ij_java_special_else_if_treatment = true +ij_java_subclass_name_suffix = Impl +ij_java_ternary_operation_signs_on_next_line = false +ij_java_ternary_operation_wrap = off +ij_java_test_name_suffix = Test +ij_java_throws_keyword_wrap = off +ij_java_throws_list_wrap = off +ij_java_use_external_annotations = false +ij_java_use_fq_class_names = false +ij_java_use_relative_indents = false +ij_java_use_single_class_imports = true +ij_java_variable_annotation_wrap = off +ij_java_visibility = public +ij_java_while_brace_force = never +ij_java_while_on_new_line = false +ij_java_wrap_comments = false +ij_java_wrap_first_method_in_call_chain = false +ij_java_wrap_long_lines = false + +[*.less] +indent_size = 2 +ij_less_align_closing_brace_with_properties = false +ij_less_blank_lines_around_nested_selector = 1 +ij_less_blank_lines_between_blocks = 1 +ij_less_block_comment_add_space = false +ij_less_brace_placement = 0 +ij_less_enforce_quotes_on_format = false +ij_less_hex_color_long_format = false +ij_less_hex_color_lower_case = false +ij_less_hex_color_short_format = false +ij_less_hex_color_upper_case = false +ij_less_keep_blank_lines_in_code = 2 +ij_less_keep_indents_on_empty_lines = false +ij_less_keep_single_line_blocks = false +ij_less_line_comment_add_space = false +ij_less_line_comment_at_first_column = false +ij_less_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_less_space_after_colon = true +ij_less_space_before_opening_brace = true +ij_less_use_double_quotes = true +ij_less_value_alignment = 0 + +[*.proto] +indent_size = 2 +tab_width = 2 +ij_continuation_indent_size = 4 +ij_protobuf_keep_blank_lines_in_code = 2 +ij_protobuf_keep_indents_on_empty_lines = false +ij_protobuf_keep_line_breaks = true +ij_protobuf_space_after_comma = true +ij_protobuf_space_before_comma = false +ij_protobuf_spaces_around_assignment_operators = true +ij_protobuf_spaces_within_braces = false +ij_protobuf_spaces_within_brackets = 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_line_comment_add_space = false +ij_sass_line_comment_at_first_column = 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 + +[*.scala] +indent_size = 2 +tab_width = 2 +ij_continuation_indent_size = 2 +ij_scala_align_composite_pattern = true +ij_scala_align_extends_with = 0 +ij_scala_align_group_field_declarations = false +ij_scala_align_if_else = false +ij_scala_align_in_columns_case_branch = false +ij_scala_align_multiline_binary_operation = false +ij_scala_align_multiline_chained_methods = false +ij_scala_align_multiline_for = true +ij_scala_align_multiline_parameters = true +ij_scala_align_multiline_parameters_in_calls = false +ij_scala_align_multiline_parenthesized_expression = false +ij_scala_align_parameter_types_in_multiline_declarations = 0 +ij_scala_align_tuple_elements = false +ij_scala_alternate_continuation_indent_for_params = 4 +ij_scala_binary_operation_wrap = off +ij_scala_blank_lines_after_anonymous_class_header = 0 +ij_scala_blank_lines_after_class_header = 0 +ij_scala_blank_lines_after_imports = 1 +ij_scala_blank_lines_after_package = 1 +ij_scala_blank_lines_around_class = 1 +ij_scala_blank_lines_around_class_in_inner_scopes = 0 +ij_scala_blank_lines_around_field = 0 +ij_scala_blank_lines_around_field_in_inner_scopes = 0 +ij_scala_blank_lines_around_field_in_interface = 0 +ij_scala_blank_lines_around_method = 1 +ij_scala_blank_lines_around_method_in_inner_scopes = 1 +ij_scala_blank_lines_around_method_in_interface = 1 +ij_scala_blank_lines_before_class_end = 0 +ij_scala_blank_lines_before_imports = 1 +ij_scala_blank_lines_before_method_body = 0 +ij_scala_blank_lines_before_package = 0 +ij_scala_block_brace_style = end_of_line +ij_scala_block_comment_add_space = false +ij_scala_block_comment_at_first_column = true +ij_scala_call_parameters_new_line_after_lparen = 0 +ij_scala_call_parameters_right_paren_on_new_line = false +ij_scala_call_parameters_wrap = off +ij_scala_case_clause_brace_force = never +ij_scala_catch_on_new_line = false +ij_scala_class_annotation_wrap = split_into_lines +ij_scala_class_brace_style = end_of_line +ij_scala_closure_brace_force = never +ij_scala_do_not_align_block_expr_params = true +ij_scala_do_not_indent_case_clause_body = false +ij_scala_do_not_indent_tuples_close_brace = true +ij_scala_do_while_brace_force = never +ij_scala_else_on_new_line = false +ij_scala_enable_scaladoc_formatting = true +ij_scala_enforce_functional_syntax_for_unit = true +ij_scala_extends_keyword_wrap = off +ij_scala_extends_list_wrap = off +ij_scala_field_annotation_wrap = split_into_lines +ij_scala_finally_brace_force = never +ij_scala_finally_on_new_line = false +ij_scala_for_brace_force = never +ij_scala_for_statement_wrap = off +ij_scala_formatter = 0 +ij_scala_if_brace_force = never +ij_scala_implicit_value_class_suffix = Ops +ij_scala_indent_braced_function_args = true +ij_scala_indent_case_from_switch = true +ij_scala_indent_first_parameter = true +ij_scala_indent_first_parameter_clause = false +ij_scala_indent_type_arguments = true +ij_scala_indent_type_parameters = true +ij_scala_indent_yield_after_one_line_enumerators = true +ij_scala_keep_blank_lines_before_right_brace = 2 +ij_scala_keep_blank_lines_in_code = 2 +ij_scala_keep_blank_lines_in_declarations = 2 +ij_scala_keep_comments_on_same_line = true +ij_scala_keep_first_column_comment = false +ij_scala_keep_indents_on_empty_lines = false +ij_scala_keep_line_breaks = true +ij_scala_keep_one_line_lambdas_in_arg_list = false +ij_scala_keep_simple_blocks_in_one_line = false +ij_scala_keep_simple_methods_in_one_line = false +ij_scala_keep_xml_formatting = false +ij_scala_line_comment_add_space = false +ij_scala_line_comment_at_first_column = true +ij_scala_method_annotation_wrap = split_into_lines +ij_scala_method_brace_force = never +ij_scala_method_brace_style = end_of_line +ij_scala_method_call_chain_wrap = off +ij_scala_method_parameters_new_line_after_left_paren = false +ij_scala_method_parameters_right_paren_on_new_line = false +ij_scala_method_parameters_wrap = off +ij_scala_modifier_list_wrap = false +ij_scala_multiline_string_align_dangling_closing_quotes = false +ij_scala_multiline_string_closing_quotes_on_new_line = true +ij_scala_multiline_string_insert_margin_on_enter = true +ij_scala_multiline_string_margin_char = | +ij_scala_multiline_string_margin_indent = 2 +ij_scala_multiline_string_opening_quotes_on_new_line = true +ij_scala_multiline_string_process_margin_on_copy_paste = true +ij_scala_new_line_after_case_clause_arrow_when_multiline_body = false +ij_scala_newline_after_annotations = false +ij_scala_not_continuation_indent_for_params = false +ij_scala_parameter_annotation_wrap = off +ij_scala_parentheses_expression_new_line_after_left_paren = false +ij_scala_parentheses_expression_right_paren_on_new_line = false +ij_scala_place_closure_parameters_on_new_line = false +ij_scala_place_self_type_on_new_line = true +ij_scala_prefer_parameters_wrap = false +ij_scala_preserve_space_after_method_declaration_name = false +ij_scala_reformat_on_compile = false +ij_scala_replace_case_arrow_with_unicode_char = false +ij_scala_replace_for_generator_arrow_with_unicode_char = false +ij_scala_replace_lambda_with_greek_letter = false +ij_scala_replace_map_arrow_with_unicode_char = false +ij_scala_scalafmt_fallback_to_default_settings = false +ij_scala_scalafmt_reformat_on_files_save = false +ij_scala_scalafmt_show_invalid_code_warnings = true +ij_scala_scalafmt_use_intellij_formatter_for_range_format = true +ij_scala_sd_align_exception_comments = true +ij_scala_sd_align_list_item_content = true +ij_scala_sd_align_other_tags_comments = true +ij_scala_sd_align_parameters_comments = true +ij_scala_sd_align_return_comments = true +ij_scala_sd_blank_line_after_parameters_comments = false +ij_scala_sd_blank_line_after_return_comments = false +ij_scala_sd_blank_line_before_parameters = false +ij_scala_sd_blank_line_before_tags = true +ij_scala_sd_blank_line_between_parameters = false +ij_scala_sd_keep_blank_lines_between_tags = false +ij_scala_sd_preserve_spaces_in_tags = false +ij_scala_space_after_comma = true +ij_scala_space_after_for_semicolon = true +ij_scala_space_after_modifiers_constructor = false +ij_scala_space_after_type_colon = true +ij_scala_space_before_brace_method_call = true +ij_scala_space_before_class_left_brace = true +ij_scala_space_before_for_parentheses = true +ij_scala_space_before_if_parentheses = true +ij_scala_space_before_infix_like_method_parentheses = false +ij_scala_space_before_infix_method_call_parentheses = false +ij_scala_space_before_infix_operator_like_method_call_parentheses = true +ij_scala_space_before_method_call_parentheses = false +ij_scala_space_before_method_left_brace = true +ij_scala_space_before_method_parentheses = false +ij_scala_space_before_type_colon = false +ij_scala_space_before_type_parameter_in_def_list = false +ij_scala_space_before_type_parameter_leading_context_bound_colon = false +ij_scala_space_before_type_parameter_leading_context_bound_colon_hk = true +ij_scala_space_before_type_parameter_list = false +ij_scala_space_before_type_parameter_rest_context_bound_colons = true +ij_scala_space_before_while_parentheses = true +ij_scala_space_inside_closure_braces = true +ij_scala_space_inside_self_type_braces = true +ij_scala_space_within_empty_method_call_parentheses = false +ij_scala_spaces_around_at_in_patterns = false +ij_scala_spaces_in_imports = false +ij_scala_spaces_in_one_line_blocks = false +ij_scala_spaces_within_brackets = false +ij_scala_spaces_within_for_parentheses = false +ij_scala_spaces_within_if_parentheses = false +ij_scala_spaces_within_method_call_parentheses = false +ij_scala_spaces_within_method_parentheses = false +ij_scala_spaces_within_parentheses = false +ij_scala_spaces_within_while_parentheses = false +ij_scala_special_else_if_treatment = true +ij_scala_trailing_comma_arg_list_enabled = true +ij_scala_trailing_comma_import_selector_enabled = false +ij_scala_trailing_comma_mode = trailing_comma_keep +ij_scala_trailing_comma_params_enabled = true +ij_scala_trailing_comma_pattern_arg_list_enabled = false +ij_scala_trailing_comma_tuple_enabled = false +ij_scala_trailing_comma_tuple_type_enabled = false +ij_scala_trailing_comma_type_params_enabled = false +ij_scala_try_brace_force = never +ij_scala_type_annotation_exclude_constant = true +ij_scala_type_annotation_exclude_in_dialect_sources = true +ij_scala_type_annotation_exclude_in_test_sources = false +ij_scala_type_annotation_exclude_member_of_anonymous_class = false +ij_scala_type_annotation_exclude_member_of_private_class = false +ij_scala_type_annotation_exclude_when_type_is_stable = true +ij_scala_type_annotation_function_parameter = false +ij_scala_type_annotation_implicit_modifier = true +ij_scala_type_annotation_local_definition = false +ij_scala_type_annotation_private_member = false +ij_scala_type_annotation_protected_member = true +ij_scala_type_annotation_public_member = true +ij_scala_type_annotation_structural_type = true +ij_scala_type_annotation_underscore_parameter = false +ij_scala_type_annotation_unit_type = true +ij_scala_use_alternate_continuation_indent_for_params = false +ij_scala_use_scala3_indentation_based_syntax = true +ij_scala_use_scaladoc2_formatting = false +ij_scala_variable_annotation_wrap = off +ij_scala_while_brace_force = never +ij_scala_while_on_new_line = false +ij_scala_wrap_before_with_keyword = false +ij_scala_wrap_first_method_in_call_chain = false +ij_scala_wrap_long_lines = false + +[*.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_block_comment_add_space = false +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_line_comment_add_space = false +ij_scss_line_comment_at_first_column = 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 + +[*.vue] +indent_size = 2 +tab_width = 2 +ij_continuation_indent_size = 4 +ij_vue_indent_children_of_top_level = template +ij_vue_interpolation_new_line_after_start_delimiter = true +ij_vue_interpolation_new_line_before_end_delimiter = true +ij_vue_interpolation_wrap = off +ij_vue_keep_indents_on_empty_lines = false +ij_vue_spaces_within_interpolation_expressions = true + +[.editorconfig] +ij_editorconfig_align_group_field_declarations = false +ij_editorconfig_space_after_colon = false +ij_editorconfig_space_after_comma = true +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,*.wadl,*.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_add_space = false +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 +ij_xml_use_custom_settings = false + +[{*.ats,*.cts,*.mts,*.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_block_comment_add_space = false +ij_typescript_block_comment_at_first_column = true +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_enum_constants_wrap = on_every_item +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_object_types_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 = auto +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 +ij_shell_binary_ops_start_line = false +ij_shell_keep_column_alignment_padding = false +ij_shell_minify_program = false +ij_shell_redirect_followed_by_space = false +ij_shell_switch_cases_indented = false +ij_shell_use_unix_line_separator = true + +[{*.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_block_comment_add_space = false +ij_javascript_block_comment_at_first_column = true +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_object_types_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 = auto +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 + +[{*.ft,*.vm,*.vsl}] +ij_vtl_keep_indents_on_empty_lines = false + +[{*.gant,*.groovy,*.gy}] +ij_groovy_align_group_field_declarations = false +ij_groovy_align_multiline_array_initializer_expression = false +ij_groovy_align_multiline_assignment = false +ij_groovy_align_multiline_binary_operation = false +ij_groovy_align_multiline_chained_methods = false +ij_groovy_align_multiline_extends_list = false +ij_groovy_align_multiline_for = true +ij_groovy_align_multiline_list_or_map = true +ij_groovy_align_multiline_method_parentheses = false +ij_groovy_align_multiline_parameters = true +ij_groovy_align_multiline_parameters_in_calls = false +ij_groovy_align_multiline_resources = true +ij_groovy_align_multiline_ternary_operation = false +ij_groovy_align_multiline_throws_list = false +ij_groovy_align_named_args_in_map = true +ij_groovy_align_throws_keyword = false +ij_groovy_array_initializer_new_line_after_left_brace = false +ij_groovy_array_initializer_right_brace_on_new_line = false +ij_groovy_array_initializer_wrap = off +ij_groovy_assert_statement_wrap = off +ij_groovy_assignment_wrap = off +ij_groovy_binary_operation_wrap = off +ij_groovy_blank_lines_after_class_header = 0 +ij_groovy_blank_lines_after_imports = 1 +ij_groovy_blank_lines_after_package = 1 +ij_groovy_blank_lines_around_class = 1 +ij_groovy_blank_lines_around_field = 0 +ij_groovy_blank_lines_around_field_in_interface = 0 +ij_groovy_blank_lines_around_method = 1 +ij_groovy_blank_lines_around_method_in_interface = 1 +ij_groovy_blank_lines_before_imports = 1 +ij_groovy_blank_lines_before_method_body = 0 +ij_groovy_blank_lines_before_package = 0 +ij_groovy_block_brace_style = end_of_line +ij_groovy_block_comment_add_space = false +ij_groovy_block_comment_at_first_column = true +ij_groovy_call_parameters_new_line_after_left_paren = false +ij_groovy_call_parameters_right_paren_on_new_line = false +ij_groovy_call_parameters_wrap = off +ij_groovy_catch_on_new_line = false +ij_groovy_class_annotation_wrap = split_into_lines +ij_groovy_class_brace_style = end_of_line +ij_groovy_class_count_to_use_import_on_demand = 5 +ij_groovy_do_while_brace_force = never +ij_groovy_else_on_new_line = false +ij_groovy_enable_groovydoc_formatting = true +ij_groovy_enum_constants_wrap = off +ij_groovy_extends_keyword_wrap = off +ij_groovy_extends_list_wrap = off +ij_groovy_field_annotation_wrap = split_into_lines +ij_groovy_finally_on_new_line = false +ij_groovy_for_brace_force = never +ij_groovy_for_statement_new_line_after_left_paren = false +ij_groovy_for_statement_right_paren_on_new_line = false +ij_groovy_for_statement_wrap = off +ij_groovy_ginq_general_clause_wrap_policy = 2 +ij_groovy_ginq_having_wrap_policy = 1 +ij_groovy_ginq_indent_having_clause = true +ij_groovy_ginq_indent_on_clause = true +ij_groovy_ginq_on_wrap_policy = 1 +ij_groovy_ginq_space_after_keyword = true +ij_groovy_if_brace_force = never +ij_groovy_import_annotation_wrap = 2 +ij_groovy_imports_layout = *,|,javax.**,java.**,|,$* +ij_groovy_indent_case_from_switch = true +ij_groovy_indent_label_blocks = true +ij_groovy_insert_inner_class_imports = false +ij_groovy_keep_blank_lines_before_right_brace = 2 +ij_groovy_keep_blank_lines_in_code = 2 +ij_groovy_keep_blank_lines_in_declarations = 2 +ij_groovy_keep_control_statement_in_one_line = true +ij_groovy_keep_first_column_comment = true +ij_groovy_keep_indents_on_empty_lines = false +ij_groovy_keep_line_breaks = true +ij_groovy_keep_multiple_expressions_in_one_line = false +ij_groovy_keep_simple_blocks_in_one_line = false +ij_groovy_keep_simple_classes_in_one_line = true +ij_groovy_keep_simple_lambdas_in_one_line = true +ij_groovy_keep_simple_methods_in_one_line = true +ij_groovy_label_indent_absolute = false +ij_groovy_label_indent_size = 0 +ij_groovy_lambda_brace_style = end_of_line +ij_groovy_layout_static_imports_separately = true +ij_groovy_line_comment_add_space = false +ij_groovy_line_comment_add_space_on_reformat = false +ij_groovy_line_comment_at_first_column = true +ij_groovy_method_annotation_wrap = split_into_lines +ij_groovy_method_brace_style = end_of_line +ij_groovy_method_call_chain_wrap = off +ij_groovy_method_parameters_new_line_after_left_paren = false +ij_groovy_method_parameters_right_paren_on_new_line = false +ij_groovy_method_parameters_wrap = off +ij_groovy_modifier_list_wrap = false +ij_groovy_names_count_to_use_import_on_demand = 3 +ij_groovy_packages_to_use_import_on_demand = java.awt.*,javax.swing.* +ij_groovy_parameter_annotation_wrap = off +ij_groovy_parentheses_expression_new_line_after_left_paren = false +ij_groovy_parentheses_expression_right_paren_on_new_line = false +ij_groovy_prefer_parameters_wrap = false +ij_groovy_resource_list_new_line_after_left_paren = false +ij_groovy_resource_list_right_paren_on_new_line = false +ij_groovy_resource_list_wrap = off +ij_groovy_space_after_assert_separator = true +ij_groovy_space_after_colon = true +ij_groovy_space_after_comma = true +ij_groovy_space_after_comma_in_type_arguments = true +ij_groovy_space_after_for_semicolon = true +ij_groovy_space_after_quest = true +ij_groovy_space_after_type_cast = true +ij_groovy_space_before_annotation_parameter_list = false +ij_groovy_space_before_array_initializer_left_brace = false +ij_groovy_space_before_assert_separator = false +ij_groovy_space_before_catch_keyword = true +ij_groovy_space_before_catch_left_brace = true +ij_groovy_space_before_catch_parentheses = true +ij_groovy_space_before_class_left_brace = true +ij_groovy_space_before_closure_left_brace = true +ij_groovy_space_before_colon = true +ij_groovy_space_before_comma = false +ij_groovy_space_before_do_left_brace = true +ij_groovy_space_before_else_keyword = true +ij_groovy_space_before_else_left_brace = true +ij_groovy_space_before_finally_keyword = true +ij_groovy_space_before_finally_left_brace = true +ij_groovy_space_before_for_left_brace = true +ij_groovy_space_before_for_parentheses = true +ij_groovy_space_before_for_semicolon = false +ij_groovy_space_before_if_left_brace = true +ij_groovy_space_before_if_parentheses = true +ij_groovy_space_before_method_call_parentheses = false +ij_groovy_space_before_method_left_brace = true +ij_groovy_space_before_method_parentheses = false +ij_groovy_space_before_quest = true +ij_groovy_space_before_record_parentheses = false +ij_groovy_space_before_switch_left_brace = true +ij_groovy_space_before_switch_parentheses = true +ij_groovy_space_before_synchronized_left_brace = true +ij_groovy_space_before_synchronized_parentheses = true +ij_groovy_space_before_try_left_brace = true +ij_groovy_space_before_try_parentheses = true +ij_groovy_space_before_while_keyword = true +ij_groovy_space_before_while_left_brace = true +ij_groovy_space_before_while_parentheses = true +ij_groovy_space_in_named_argument = true +ij_groovy_space_in_named_argument_before_colon = false +ij_groovy_space_within_empty_array_initializer_braces = false +ij_groovy_space_within_empty_method_call_parentheses = false +ij_groovy_spaces_around_additive_operators = true +ij_groovy_spaces_around_assignment_operators = true +ij_groovy_spaces_around_bitwise_operators = true +ij_groovy_spaces_around_equality_operators = true +ij_groovy_spaces_around_lambda_arrow = true +ij_groovy_spaces_around_logical_operators = true +ij_groovy_spaces_around_multiplicative_operators = true +ij_groovy_spaces_around_regex_operators = true +ij_groovy_spaces_around_relational_operators = true +ij_groovy_spaces_around_shift_operators = true +ij_groovy_spaces_within_annotation_parentheses = false +ij_groovy_spaces_within_array_initializer_braces = false +ij_groovy_spaces_within_braces = true +ij_groovy_spaces_within_brackets = false +ij_groovy_spaces_within_cast_parentheses = false +ij_groovy_spaces_within_catch_parentheses = false +ij_groovy_spaces_within_for_parentheses = false +ij_groovy_spaces_within_gstring_injection_braces = false +ij_groovy_spaces_within_if_parentheses = false +ij_groovy_spaces_within_list_or_map = false +ij_groovy_spaces_within_method_call_parentheses = false +ij_groovy_spaces_within_method_parentheses = false +ij_groovy_spaces_within_parentheses = false +ij_groovy_spaces_within_switch_parentheses = false +ij_groovy_spaces_within_synchronized_parentheses = false +ij_groovy_spaces_within_try_parentheses = false +ij_groovy_spaces_within_tuple_expression = false +ij_groovy_spaces_within_while_parentheses = false +ij_groovy_special_else_if_treatment = true +ij_groovy_ternary_operation_wrap = off +ij_groovy_throws_keyword_wrap = off +ij_groovy_throws_list_wrap = off +ij_groovy_use_flying_geese_braces = false +ij_groovy_use_fq_class_names = false +ij_groovy_use_fq_class_names_in_javadoc = true +ij_groovy_use_relative_indents = false +ij_groovy_use_single_class_imports = true +ij_groovy_variable_annotation_wrap = off +ij_groovy_while_brace_force = never +ij_groovy_while_on_new_line = false +ij_groovy_wrap_chain_calls_after_dot = false +ij_groovy_wrap_long_lines = false + +[{*.gradle.kts,*.kt,*.kts,*.main.kts}] +ij_kotlin_align_in_columns_case_branch = false +ij_kotlin_align_multiline_binary_operation = false +ij_kotlin_align_multiline_extends_list = false +ij_kotlin_align_multiline_method_parentheses = false +ij_kotlin_align_multiline_parameters = true +ij_kotlin_align_multiline_parameters_in_calls = false +ij_kotlin_allow_trailing_comma = false +ij_kotlin_allow_trailing_comma_on_call_site = false +ij_kotlin_assignment_wrap = off +ij_kotlin_blank_lines_after_class_header = 0 +ij_kotlin_blank_lines_around_block_when_branches = 0 +ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1 +ij_kotlin_block_comment_add_space = false +ij_kotlin_block_comment_at_first_column = true +ij_kotlin_call_parameters_new_line_after_left_paren = false +ij_kotlin_call_parameters_right_paren_on_new_line = false +ij_kotlin_call_parameters_wrap = off +ij_kotlin_catch_on_new_line = false +ij_kotlin_class_annotation_wrap = split_into_lines +ij_kotlin_continuation_indent_for_chained_calls = true +ij_kotlin_continuation_indent_for_expression_bodies = true +ij_kotlin_continuation_indent_in_argument_lists = true +ij_kotlin_continuation_indent_in_elvis = true +ij_kotlin_continuation_indent_in_if_conditions = true +ij_kotlin_continuation_indent_in_parameter_lists = true +ij_kotlin_continuation_indent_in_supertype_lists = true +ij_kotlin_else_on_new_line = false +ij_kotlin_enum_constants_wrap = off +ij_kotlin_extends_list_wrap = off +ij_kotlin_field_annotation_wrap = split_into_lines +ij_kotlin_finally_on_new_line = false +ij_kotlin_if_rparen_on_new_line = false +ij_kotlin_import_nested_classes = false +ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^ +ij_kotlin_insert_whitespaces_in_simple_one_line_method = true +ij_kotlin_keep_blank_lines_before_right_brace = 2 +ij_kotlin_keep_blank_lines_in_code = 2 +ij_kotlin_keep_blank_lines_in_declarations = 2 +ij_kotlin_keep_first_column_comment = true +ij_kotlin_keep_indents_on_empty_lines = false +ij_kotlin_keep_line_breaks = true +ij_kotlin_lbrace_on_next_line = false +ij_kotlin_line_break_after_multiline_when_entry = true +ij_kotlin_line_comment_add_space = false +ij_kotlin_line_comment_add_space_on_reformat = false +ij_kotlin_line_comment_at_first_column = true +ij_kotlin_method_annotation_wrap = split_into_lines +ij_kotlin_method_call_chain_wrap = off +ij_kotlin_method_parameters_new_line_after_left_paren = false +ij_kotlin_method_parameters_right_paren_on_new_line = false +ij_kotlin_method_parameters_wrap = off +ij_kotlin_name_count_to_use_star_import = 5 +ij_kotlin_name_count_to_use_star_import_for_members = 3 +ij_kotlin_packages_to_use_import_on_demand = java.util.*,kotlinx.android.synthetic.**,io.ktor.** +ij_kotlin_parameter_annotation_wrap = off +ij_kotlin_space_after_comma = true +ij_kotlin_space_after_extend_colon = true +ij_kotlin_space_after_type_colon = true +ij_kotlin_space_before_catch_parentheses = true +ij_kotlin_space_before_comma = false +ij_kotlin_space_before_extend_colon = true +ij_kotlin_space_before_for_parentheses = true +ij_kotlin_space_before_if_parentheses = true +ij_kotlin_space_before_lambda_arrow = true +ij_kotlin_space_before_type_colon = false +ij_kotlin_space_before_when_parentheses = true +ij_kotlin_space_before_while_parentheses = true +ij_kotlin_spaces_around_additive_operators = true +ij_kotlin_spaces_around_assignment_operators = true +ij_kotlin_spaces_around_equality_operators = true +ij_kotlin_spaces_around_function_type_arrow = true +ij_kotlin_spaces_around_logical_operators = true +ij_kotlin_spaces_around_multiplicative_operators = true +ij_kotlin_spaces_around_range = false +ij_kotlin_spaces_around_relational_operators = true +ij_kotlin_spaces_around_unary_operator = false +ij_kotlin_spaces_around_when_arrow = true +ij_kotlin_variable_annotation_wrap = off +ij_kotlin_while_on_new_line = false +ij_kotlin_wrap_elvis_expressions = 1 +ij_kotlin_wrap_expression_body_functions = 0 +ij_kotlin_wrap_first_method_in_call_chain = false + +[{*.har,*.jsb2,*.jsb3,*.json,*.png.mcmeta,.babelrc,.eslintrc,.prettierrc,.stylelintrc,bowerrc,jest.config,mcmod.info,pack.mcmeta}] +indent_size = 2 +ij_json_array_wrapping = split_into_lines +ij_json_keep_blank_lines_in_code = 0 +ij_json_keep_indents_on_empty_lines = false +ij_json_keep_line_breaks = true +ij_json_keep_trailing_comma = false +ij_json_object_wrapping = split_into_lines +ij_json_property_alignment = do_not_align +ij_json_space_after_colon = true +ij_json_space_after_comma = true +ij_json_space_before_colon = false +ij_json_space_before_comma = false +ij_json_spaces_within_braces = false +ij_json_spaces_within_brackets = false +ij_json_wrap_long_lines = false + +[{*.htm,*.html,*.ng,*.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_add_space = false +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 + +[{*.http,*.rest}] +indent_size = 0 +ij_continuation_indent_size = 4 +ij_http request_call_parameters_wrap = normal + +[{*.jsf,*.jsp,*.jspf,*.tag,*.tagf,*.xjsp}] +ij_jsp_jsp_prefer_comma_separated_import_list = false +ij_jsp_keep_indents_on_empty_lines = false + +[{*.jspx,*.tagx}] +ij_jspx_keep_indents_on_empty_lines = false + +[{*.markdown,*.md}] +ij_markdown_force_one_space_after_blockquote_symbol = true +ij_markdown_force_one_space_after_header_symbol = true +ij_markdown_force_one_space_after_list_bullet = true +ij_markdown_force_one_space_between_words = true +ij_markdown_format_tables = true +ij_markdown_insert_quote_arrows_on_wrap = true +ij_markdown_keep_indents_on_empty_lines = false +ij_markdown_keep_line_breaks_inside_text_blocks = true +ij_markdown_max_lines_around_block_elements = 1 +ij_markdown_max_lines_around_header = 1 +ij_markdown_max_lines_between_paragraphs = 1 +ij_markdown_min_lines_around_block_elements = 1 +ij_markdown_min_lines_around_header = 1 +ij_markdown_min_lines_between_paragraphs = 1 +ij_markdown_wrap_text_if_long = true +ij_markdown_wrap_text_inside_blockquotes = true + +[{*.pb,*.textproto}] +indent_size = 2 +tab_width = 2 +ij_continuation_indent_size = 4 +ij_prototext_keep_blank_lines_in_code = 2 +ij_prototext_keep_indents_on_empty_lines = false +ij_prototext_keep_line_breaks = true +ij_prototext_space_after_colon = true +ij_prototext_space_after_comma = true +ij_prototext_space_before_colon = false +ij_prototext_space_before_comma = false +ij_prototext_spaces_within_braces = true +ij_prototext_spaces_within_brackets = false + +[{*.properties,spring.handlers,spring.schemas}] +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 + +[{*.ps1,*.psd1,*.psm1}] +max_line_length = 115 +ij_powershell_align_multiline_binary_operation = false +ij_powershell_align_multiline_chained_methods = false +ij_powershell_align_multiline_for = true +ij_powershell_align_multiline_parameters = true +ij_powershell_align_multiline_parameters_in_calls = false +ij_powershell_binary_operation_wrap = off +ij_powershell_block_brace_style = next_line +ij_powershell_call_parameters_new_line_after_left_paren = false +ij_powershell_call_parameters_right_paren_on_new_line = false +ij_powershell_call_parameters_wrap = off +ij_powershell_catch_on_new_line = true +ij_powershell_class_annotation_wrap = split_into_lines +ij_powershell_class_brace_style = next_line +ij_powershell_else_on_new_line = true +ij_powershell_field_annotation_wrap = off +ij_powershell_finally_on_new_line = true +ij_powershell_for_statement_new_line_after_left_paren = false +ij_powershell_for_statement_right_paren_on_new_line = false +ij_powershell_for_statement_wrap = off +ij_powershell_keep_blank_lines_in_code = 2 +ij_powershell_keep_first_column_comment = true +ij_powershell_keep_line_breaks = true +ij_powershell_keep_simple_blocks_in_one_line = false +ij_powershell_keep_simple_classes_in_one_line = false +ij_powershell_keep_simple_lambdas_in_one_line = true +ij_powershell_keep_simple_methods_in_one_line = false +ij_powershell_method_annotation_wrap = split_into_lines +ij_powershell_method_brace_style = next_line +ij_powershell_method_call_chain_wrap = off +ij_powershell_method_parameters_new_line_after_left_paren = false +ij_powershell_method_parameters_right_paren_on_new_line = false +ij_powershell_method_parameters_wrap = off +ij_powershell_parameter_annotation_wrap = off +ij_powershell_parentheses_expression_new_line_after_left_paren = false +ij_powershell_parentheses_expression_right_paren_on_new_line = false +ij_powershell_space_after_colon = true +ij_powershell_space_after_comma = true +ij_powershell_space_after_for_semicolon = true +ij_powershell_space_after_type_cast = false +ij_powershell_space_before_annotation_parameter_list = false +ij_powershell_space_before_array_initializer_left_brace = true +ij_powershell_space_before_catch_keyword = true +ij_powershell_space_before_catch_left_brace = true +ij_powershell_space_before_class_left_brace = true +ij_powershell_space_before_colon = true +ij_powershell_space_before_comma = false +ij_powershell_space_before_do_left_brace = true +ij_powershell_space_before_else_keyword = true +ij_powershell_space_before_else_left_brace = true +ij_powershell_space_before_finally_keyword = true +ij_powershell_space_before_finally_left_brace = true +ij_powershell_space_before_for_left_brace = true +ij_powershell_space_before_for_parentheses = true +ij_powershell_space_before_for_semicolon = false +ij_powershell_space_before_if_left_brace = true +ij_powershell_space_before_if_parentheses = true +ij_powershell_space_before_method_call_parentheses = false +ij_powershell_space_before_method_left_brace = true +ij_powershell_space_before_method_parentheses = false +ij_powershell_space_before_switch_left_brace = true +ij_powershell_space_before_switch_parentheses = true +ij_powershell_space_before_try_left_brace = true +ij_powershell_space_before_while_keyword = true +ij_powershell_space_before_while_left_brace = true +ij_powershell_space_before_while_parentheses = true +ij_powershell_space_within_empty_method_call_parentheses = false +ij_powershell_space_within_empty_method_parentheses = false +ij_powershell_spaces_around_additive_operators = true +ij_powershell_spaces_around_assignment_operators = true +ij_powershell_spaces_around_bitwise_operators = true +ij_powershell_spaces_around_logical_operators = true +ij_powershell_spaces_around_method_ref_dbl_colon = false +ij_powershell_spaces_around_multiplicative_operators = true +ij_powershell_spaces_around_relational_operators = true +ij_powershell_spaces_around_unary_operator = false +ij_powershell_spaces_within_annotation_parentheses = false +ij_powershell_spaces_within_braces = true +ij_powershell_spaces_within_brackets = false +ij_powershell_spaces_within_cast_parentheses = false +ij_powershell_spaces_within_for_parentheses = false +ij_powershell_spaces_within_if_parentheses = false +ij_powershell_spaces_within_method_call_parentheses = false +ij_powershell_spaces_within_method_parentheses = false +ij_powershell_spaces_within_parentheses = false +ij_powershell_spaces_within_switch_parentheses = false +ij_powershell_spaces_within_while_parentheses = false +ij_powershell_special_else_if_treatment = true +ij_powershell_while_on_new_line = false +ij_powershell_wrap_first_method_in_call_chain = false +ij_powershell_wrap_long_lines = false + +[{*.qute.htm,*.qute.html,*.qute.json,*.qute.txt,*.qute.yaml,*.qute.yml}] +ij_qute_keep_indents_on_empty_lines = false + +[{*.toml,Cargo.lock,Cargo.toml.orig,Gopkg.lock,Pipfile,poetry.lock}] +ij_toml_keep_indents_on_empty_lines = false + +[{*.yaml,*.yml}] +indent_size = 2 +ij_yaml_align_values_properties = do_not_align +ij_yaml_autoinsert_sequence_marker = true +ij_yaml_block_mapping_on_new_line = false +ij_yaml_indent_sequence_value = true +ij_yaml_keep_indents_on_empty_lines = false +ij_yaml_keep_line_breaks = true +ij_yaml_sequence_on_new_line = false +ij_yaml_space_before_colon = false +ij_yaml_spaces_within_braces = true +ij_yaml_spaces_within_brackets = true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 77cbd6cf..5a5f679a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ on: push: paths: - 'src/**' - - '.github/workflows/**' + # - '.github/workflows/**' workflow_dispatch: @@ -17,36 +17,36 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - branch: [1.7.10-forge, 1.10.2-forge, 1.11.2-forge, 1.12.2-forge, 1.14.4-forge, 1.15.2-forge, 1.16.5-forge] + branch: [ 1.7.10-forge, 1.10.2-forge, 1.11.2-forge, 1.12.2-forge, 1.14.4-forge, 1.15.2-forge, 1.16.5-forge ] steps: - - uses: actions/checkout@v3 - - name: Set up JDK 1.8 - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '8' - - name: Install deps - run: sudo apt install -y pngquant findutils xvfb - - name: Hack Forge Gradle - run: mkdir -p ~/.gradle/caches/minecraft/; wget 'https://teamopenindustry.cc/maven/hack/ForgeGradleVersion.json' -O ~/.gradle/caches/minecraft/ForgeGradleVersion.json - - name: Setup Universal Mod Core (and helpers) - env: - BRANCH: ${{ matrix.branch }} - run: ./gradlew umc -D umc.loader=${BRANCH} -D ssh.http=true - - name: Hack Forge Gradle Part Two - env: - BRANCH: ${{ matrix.branch }} - run: git apply --ignore-space-change --ignore-whitespace ${BRANCH}.patch || true - - name: Gradle compile - run: ./gradlew classes - - name: Process images - run: find src/main/resources/assets/landofsignals/ | grep png | xargs -I foo pngquant -s1 -f --ext .png foo - - name: Run Data (optionalish) - run: xvfb-run --auto-servernum ./gradlew runData || xvfb-run --auto-servernum ./gradlew runData || true - - name: Gradle build - run: ./gradlew build - - uses: actions/upload-artifact@v3 - with: - name: LandOfSignals ${{matrix.branch}} - path: build/libs/LandOfSignals-${{matrix.branch}}-* + - uses: actions/checkout@v3 + - name: Set up JDK 1.8 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '8' + - name: Install deps + run: sudo apt install -y pngquant findutils xvfb + - name: Hack Forge Gradle + run: mkdir -p ~/.gradle/caches/minecraft/; wget 'https://teamopenindustry.cc/maven/hack/ForgeGradleVersion.json' -O ~/.gradle/caches/minecraft/ForgeGradleVersion.json + - name: Setup Universal Mod Core (and helpers) + env: + BRANCH: ${{ matrix.branch }} + run: ./gradlew umc -D umc.loader=${BRANCH} -D ssh.http=true + - name: Hack Forge Gradle Part Two + env: + BRANCH: ${{ matrix.branch }} + run: git apply --ignore-space-change --ignore-whitespace ${BRANCH}.patch || true + - name: Gradle compile + run: ./gradlew classes + - name: Process images + run: find src/main/resources/assets/landofsignals/ | grep png | xargs -I foo pngquant -s1 -f --ext .png foo + - name: Run Data (optionalish) + run: xvfb-run --auto-servernum ./gradlew runData || xvfb-run --auto-servernum ./gradlew runData || true + - name: Gradle build + run: ./gradlew build + - uses: actions/upload-artifact@v3 + with: + name: LandOfSignals ${{matrix.branch}} + path: build/libs/LandOfSignals-${{matrix.branch}}-* diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..8a5464d2 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,187 @@ +name: LandOfSignals Publish Pipeline + +on: + workflow_dispatch: + inputs: + type: + description: 'Type of release' + required: true + default: 'release' + type: choice + options: + - alpha + - beta + - release + +jobs: + versioncommit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.PAT }} + + - name: Read VERSION file + id: getversion + run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT + - name: Read SUFFIX file + id: getsuffix + run: echo "suffix=$(cat SUFFIX)" >> $GITHUB_OUTPUT + - name: Replace version number with new version + run: | + sed -i 's/public static final String VERSION.*/public static final String VERSION = "${{ steps.getversion.outputs.version }}";/' src/main/java/net/landofrails/landofsignals/LandOfSignals.java + sed -i "s/String version =.*/String version = '${{ steps.getversion.outputs.version }}'/" ./build.gradle + sed -i 's/"version":.*/"version": "${{ steps.getversion.outputs.version }}",/' src/main/resources/mcmod.info + - name: Commit and push changes + run: | + git config --global user.name "MarkenJaden" + git config --global user.email "jjsch1410@gmail.com" + git add -A + git diff-index --quiet HEAD || git commit -m "Updated mod version" + git push + + build: + runs-on: ubuntu-latest + needs: [ versioncommit ] + strategy: + max-parallel: 1 + matrix: + branch: [ 1.7.10-forge, 1.10.2-forge, 1.11.2-forge, 1.12.2-forge, 1.14.4-forge, 1.15.2-forge, 1.16.5-forge ] + include: + - branch: 1.7.10-forge + version: 1.7.10 + - branch: 1.10.2-forge + version: 1.10.2 + - branch: 1.11.2-forge + version: 1.11.2 + - branch: 1.12.2-forge + version: 1.12.2 + - branch: 1.14.4-forge + version: 1.14.4 + - branch: 1.15.2-forge + version: 1.15.2 + - branch: 1.16.5-forge + version: 1.16.5 + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 1.8 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '8' + - name: Install deps + run: sudo apt install -y pngquant findutils xvfb + - name: Hack Forge Gradle + run: mkdir -p ~/.gradle/caches/minecraft/; wget 'https://teamopenindustry.cc/maven/hack/ForgeGradleVersion.json' -O ~/.gradle/caches/minecraft/ForgeGradleVersion.json + - name: Setup Universal Mod Core (and helpers) + env: + BRANCH: ${{ matrix.branch }} + run: ./gradlew umc -D umc.loader=${BRANCH} -D ssh.http=true -Dtarget=release + - name: Hack Forge Gradle Part Two + env: + BRANCH: ${{ matrix.branch }} + run: git apply --ignore-space-change --ignore-whitespace ${BRANCH}.patch || true + - name: Gradle compile + run: ./gradlew classes + - name: Process images + run: find src/main/resources/assets/landofsignals/ | grep png | xargs -I foo pngquant -s1 -f --ext .png foo + - name: Run Data (optionalish) + run: xvfb-run --auto-servernum ./gradlew runData || xvfb-run --auto-servernum ./gradlew runData || true + - name: Gradle build + run: ./gradlew build -Dtarget=release + - name: Read CHANGELOG.md file + id: getchangelog + uses: juliangruber/read-file-action@v1.1.6 + with: + path: ./CHANGELOG.md + - name: Read VERSION file + id: getversion + run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT + - name: Read SUFFIX file + id: getsuffix + run: echo "suffix=$(cat SUFFIX)" >> $GITHUB_OUTPUT + - name: Rename with suffix + run: mv -n build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}.jar build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }}.jar + - uses: actions/upload-artifact@v3 + with: + name: LandOfSignals ${{matrix.branch}} + path: build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }}.jar + - name: Upload ${{matrix.branch}} + uses: Kir-Antipov/mc-publish@master + with: + # Modrinth + modrinth-id: r7aBIx6Q + modrinth-featured: true + modrinth-unfeature-mode: subset + modrinth-token: ${{ secrets.MODRINTH_TOKEN }} + + # CurseForge + curseforge-id: 434307 + curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} + curseforge-dependencies: | + universal-mod-core | depends | * + + files: build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }}.jar + + version: ${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }} + version-type: ${{ inputs.type }} + changelog-file: ./CHANGELOG.md + + loaders: | + forge + game-versions: | + ${{ matrix.version }} + java: | + 8 + + retry-attempts: 2 + retry-delay: 10000 + fail-mode: fail + + package: + runs-on: ubuntu-latest + needs: [ build ] + steps: + - uses: actions/checkout@v3 + - name: Read VERSION file + id: getversion + run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT + - name: Read SUFFIX file + id: getsuffix + run: echo "suffix=$(cat SUFFIX)" >> $GITHUB_OUTPUT + - uses: actions/download-artifact@v3 + - run: mkdir upload + - run: cp **/LandOfSignals-*.jar upload + - name: Upload to GitHub + uses: Kir-Antipov/mc-publish@master + with: + # GitHub + github-tag: v${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }} + github-generate-changelog: true + github-draft: false + github-prerelease: false + github-discussion: Announcements + github-token: ${{ secrets.GITHUB_TOKEN }} + + files: upload/LandOfSignals-*.jar + + version: ${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }} + version-type: ${{ inputs.type }} + changelog-file: ./CHANGELOG.md + + loaders: | + forge + game-versions: | + 1.7.10 + 1.10.2 + 1.11.2 + 1.12.2 + 1.14.4 + 1.15.2 + 1.16.5 + java: | + 8 + + retry-attempts: 2 + retry-delay: 10000 + fail-mode: fail diff --git a/.github/workflows/release-alpha.yml b/.github/workflows/release-alpha.yml deleted file mode 100644 index 50353e6d..00000000 --- a/.github/workflows/release-alpha.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: LandOfSignals Release Alpha Pipeline - -on: [ workflow_dispatch ] - -jobs: - versioncommit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.PAT }} - - - name: Read VERSION file - id: getversion - run: echo "::set-output name=version::$(cat VERSION)" - - name: Read SUFFIX file - id: getsuffix - run: echo "::set-output name=suffix::$(cat SUFFIX)" - - name: Replace version number with new version - run: | - sed -i 's/public static final String VERSION.*/public static final String VERSION = "${{ steps.getversion.outputs.version }}";/' src/main/java/net/landofrails/landofsignals/LandOfSignals.java - sed -i "s/String version =.*/String version = '${{ steps.getversion.outputs.version }}'/" ./build.gradle - - name: Commit and push changes - run: | - git config --global user.name "MarkenJaden" - git config --global user.email "jjsch1410@gmail.com" - git add -A - git commit -m "Updated mod version" - git push - - build: - runs-on: ubuntu-latest - strategy: - max-parallel: 1 - matrix: - branch: [ 1.7.10-forge, 1.10.2-forge, 1.11.2-forge, 1.12.2-forge, 1.14.4-forge, 1.15.2-forge, 1.16.5-forge ] - include: - - branch: 1.7.10-forge - version: 1.7.10 - - branch: 1.10.2-forge - version: 1.10.2 - - branch: 1.11.2-forge - version: 1.11.2 - - branch: 1.12.2-forge - version: 1.12.2 - - branch: 1.14.4-forge - version: 1.14.4 - - branch: 1.15.2-forge - version: 1.15.2 - - branch: 1.16.5-forge - version: 1.16.5 - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: '1.8' # The JDK version to make available on the path. - java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk - architecture: x64 # (x64 or x86) - defaults to x64 - - name: Install deps - run: sudo apt install -y pngquant findutils xvfb - - name: Hack Forge Gradle - run: mkdir -p ~/.gradle/caches/minecraft/; wget 'https://teamopenindustry.cc/maven/hack/ForgeGradleVersion.json' -O ~/.gradle/caches/minecraft/ForgeGradleVersion.json - - name: Setup Universal Mod Core (and helpers) - env: - BRANCH: ${{ matrix.branch }} - run: ./gradlew umc -D umc.loader=${BRANCH} -D ssh.http=true -Dtarget=release - - name: Hack Forge Gradle Part Two - env: - BRANCH: ${{ matrix.branch }} - run: git apply ${BRANCH}.patch || true - - name: Gradle compile - run: ./gradlew classes - - name: Process images - run: find src/main/resources/assets/landofsignals/ | grep png | xargs -I foo pngquant -s1 -f --ext .png foo - - name: Run Data (optionalish) - run: xvfb-run --auto-servernum ./gradlew runData || xvfb-run --auto-servernum ./gradlew runData || true - - name: Gradle build - run: ./gradlew build -Dtarget=release - - uses: actions/upload-artifact@v3 - with: - name: LandOfSignals ${{matrix.branch}} - path: build/libs/LandOfSignals-${{matrix.branch}}-* - - name: Read CHANGELOG.md file - id: getchangelog - uses: juliangruber/read-file-action@v1.1.4 - with: - path: ./CHANGELOG.md - - name: Read VERSION file - id: getversion - run: echo "::set-output name=version::$(cat VERSION)" - - name: Read SUFFIX file - id: getsuffix - run: echo "::set-output name=suffix::$(cat SUFFIX)" - - name: Rename with suffix - run: mv -n build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}.jar build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }}.jar - - name: Upload to CurseForge ${{matrix.branch}} - uses: MarkenJaden/curseforge-upload@master - with: - token: ${{ secrets.LANDOFSIGNALS_UPLOAD }} - project_id: 434307 - game_endpoint: minecraft - file_path: build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }}.jar - changelog: ${{ steps.getchangelog.outputs.content }} - changelog_type: markdown - game_versions: ${{ matrix.version }} - release_type: alpha - relations: universal-mod-core:requiredDependency diff --git a/.github/workflows/release-beta.yml b/.github/workflows/release-beta.yml deleted file mode 100644 index 70257d85..00000000 --- a/.github/workflows/release-beta.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: LandOfSignals Release-Beta Pipeline - -on: [ workflow_dispatch ] - -jobs: - versioncommit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.PAT }} - - - name: Read VERSION file - id: getversion - run: echo "::set-output name=version::$(cat VERSION)" - - name: Read SUFFIX file - id: getsuffix - run: echo "::set-output name=suffix::$(cat SUFFIX)" - - name: Replace version number with new version - run: | - sed -i 's/public static final String VERSION.*/public static final String VERSION = "${{ steps.getversion.outputs.version }}";/' src/main/java/net/landofrails/landofsignals/LandOfSignals.java - sed -i "s/String version =.*/String version = '${{ steps.getversion.outputs.version }}'/" ./build.gradle - - name: Commit and push changes - run: | - git config --global user.name "MarkenJaden" - git config --global user.email "jjsch1410@gmail.com" - git add -A - git commit -m "Updated mod version" - git push - - build: - runs-on: ubuntu-latest - strategy: - max-parallel: 1 - matrix: - branch: [ 1.7.10-forge, 1.10.2-forge, 1.11.2-forge, 1.12.2-forge, 1.14.4-forge, 1.15.2-forge, 1.16.5-forge ] - include: - - branch: 1.7.10-forge - version: 1.7.10 - - branch: 1.10.2-forge - version: 1.10.2 - - branch: 1.11.2-forge - version: 1.11.2 - - branch: 1.12.2-forge - version: 1.12.2 - - branch: 1.14.4-forge - version: 1.14.4 - - branch: 1.15.2-forge - version: 1.15.2 - - branch: 1.16.5-forge - version: 1.16.5 - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: '1.8' # The JDK version to make available on the path. - java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk - architecture: x64 # (x64 or x86) - defaults to x64 - - name: Install deps - run: sudo apt install -y pngquant findutils xvfb - - name: Hack Forge Gradle - run: mkdir -p ~/.gradle/caches/minecraft/; wget 'https://teamopenindustry.cc/maven/hack/ForgeGradleVersion.json' -O ~/.gradle/caches/minecraft/ForgeGradleVersion.json - - name: Setup Universal Mod Core (and helpers) - env: - BRANCH: ${{ matrix.branch }} - run: ./gradlew umc -D umc.loader=${BRANCH} -D ssh.http=true -Dtarget=release - - name: Hack Forge Gradle Part Two - env: - BRANCH: ${{ matrix.branch }} - run: git apply --ignore-space-change --ignore-whitespace ${BRANCH}.patch || true - - name: Gradle compile - run: ./gradlew classes - - name: Process images - run: find src/main/resources/assets/landofsignals/ | grep png | xargs -I foo pngquant -s1 -f --ext .png foo - - name: Run Data (optionalish) - run: xvfb-run --auto-servernum ./gradlew runData || xvfb-run --auto-servernum ./gradlew runData || true - - name: Gradle build - run: ./gradlew build -Dtarget=release - - uses: actions/upload-artifact@v3 - with: - name: LandOfSignals ${{matrix.branch}} - path: build/libs/LandOfSignals-${{matrix.branch}}-* - - name: Read CHANGELOG.md file - id: getchangelog - uses: juliangruber/read-file-action@v1.1.4 - with: - path: ./CHANGELOG.md - - name: Read VERSION file - id: getversion - run: echo "::set-output name=version::$(cat VERSION)" - - name: Read SUFFIX file - id: getsuffix - run: echo "::set-output name=suffix::$(cat SUFFIX)" - - name: Rename with suffix - run: mv -n build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}.jar build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }}.jar - - name: Upload to CurseForge ${{matrix.branch}} - uses: MarkenJaden/curseforge-upload@master - with: - token: ${{ secrets.LANDOFSIGNALS_UPLOAD }} - project_id: 434307 - game_endpoint: minecraft - file_path: build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }}.jar - changelog: ${{ steps.getchangelog.outputs.content }} - changelog_type: markdown - game_versions: ${{ matrix.version }} - release_type: beta - relations: universal-mod-core:requiredDependency diff --git a/.github/workflows/release-release.yml b/.github/workflows/release-release.yml deleted file mode 100644 index 5bcdcbd2..00000000 --- a/.github/workflows/release-release.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: LandOfSignals Release Pipeline - -on: [ workflow_dispatch ] - -jobs: - versioncommit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.PAT }} - - - name: Read VERSION file - id: getversion - run: echo "::set-output name=version::$(cat VERSION)" - - name: Read SUFFIX file - id: getsuffix - run: echo "::set-output name=suffix::$(cat SUFFIX)" - - name: Replace version number with new version - run: | - sed -i 's/public static final String VERSION.*/public static final String VERSION = "${{ steps.getversion.outputs.version }}";/' src/main/java/net/landofrails/landofsignals/LandOfSignals.java - sed -i "s/String version =.*/String version = '${{ steps.getversion.outputs.version }}'/" ./build.gradle - - name: Commit and push changes - run: | - git config --global user.name "MarkenJaden" - git config --global user.email "jjsch1410@gmail.com" - git add -A - git commit -m "Updated mod version" - git push - - build: - runs-on: ubuntu-latest - strategy: - max-parallel: 1 - matrix: - branch: [ 1.7.10-forge, 1.10.2-forge, 1.11.2-forge, 1.12.2-forge, 1.14.4-forge, 1.15.2-forge, 1.16.5-forge ] - include: - - branch: 1.7.10-forge - version: 1.7.10 - - branch: 1.10.2-forge - version: 1.10.2 - - branch: 1.11.2-forge - version: 1.11.2 - - branch: 1.12.2-forge - version: 1.12.2 - - branch: 1.14.4-forge - version: 1.14.4 - - branch: 1.15.2-forge - version: 1.15.2 - - branch: 1.16.5-forge - version: 1.16.5 - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: '1.8' # The JDK version to make available on the path. - java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk - architecture: x64 # (x64 or x86) - defaults to x64 - - name: Install deps - run: sudo apt install -y pngquant findutils xvfb - - name: Hack Forge Gradle - run: mkdir -p ~/.gradle/caches/minecraft/; wget 'https://teamopenindustry.cc/maven/hack/ForgeGradleVersion.json' -O ~/.gradle/caches/minecraft/ForgeGradleVersion.json - - name: Setup Universal Mod Core (and helpers) - env: - BRANCH: ${{ matrix.branch }} - run: ./gradlew umc -D umc.loader=${BRANCH} -D ssh.http=true -Dtarget=release - - name: Hack Forge Gradle Part Two - env: - BRANCH: ${{ matrix.branch }} - run: git apply --ignore-space-change --ignore-whitespace ${BRANCH}.patch || true - - name: Gradle compile - run: ./gradlew classes - - name: Process images - run: find src/main/resources/assets/landofsignals/ | grep png | xargs -I foo pngquant -s1 -f --ext .png foo - - name: Run Data (optionalish) - run: xvfb-run --auto-servernum ./gradlew runData || xvfb-run --auto-servernum ./gradlew runData || true - - name: Gradle build - run: ./gradlew build -Dtarget=release - - uses: actions/upload-artifact@v3 - with: - name: LandOfSignals ${{matrix.branch}} - path: build/libs/LandOfSignals-${{matrix.branch}}-* - - name: Read CHANGELOG.md file - id: getchangelog - uses: juliangruber/read-file-action@v1.1.4 - with: - path: ./CHANGELOG.md - - name: Read VERSION file - id: getversion - run: echo "::set-output name=version::$(cat VERSION)" - - name: Read SUFFIX file - id: getsuffix - run: echo "::set-output name=suffix::$(cat SUFFIX)" - - name: Rename with suffix - run: mv -n build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}.jar build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }}.jar - - name: Upload to CurseForge ${{matrix.branch}} - uses: MarkenJaden/curseforge-upload@master - with: - token: ${{ secrets.LANDOFSIGNALS_UPLOAD }} - project_id: 434307 - game_endpoint: minecraft - file_path: build/libs/LandOfSignals-${{matrix.branch}}-${{ steps.getversion.outputs.version }}${{ steps.getsuffix.outputs.suffix }}.jar - changelog: ${{ steps.getchangelog.outputs.content }} - changelog_type: markdown - game_versions: ${{ matrix.version }} - release_type: release - relations: universal-mod-core:requiredDependency diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index cb14a7e1..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Test Pipeline - -on: [ workflow_dispatch ] - -jobs: - versioncommit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.PAT }} - - - name: Read VERSION file - id: getversion - run: echo "::set-output name=version::$(cat VERSION)" - - name: Read SUFFIX file - id: getsuffix - run: echo "::set-output name=suffix::$(cat SUFFIX)" - - name: Replace version number with new version - run: | - sed -i 's/public static final String VERSION.*/public static final String VERSION = "${{ steps.getversion.outputs.version }}";/' src/main/java/net/landofrails/landofsignals/LandOfSignals.java - sed -i "s/String version =.*/String version = '${{ steps.getversion.outputs.version }}'/" ./build.gradle - - name: Commit and push changes - run: | - git config --global user.name "MarkenJaden" - git config --global user.email "jjsch1410@gmail.com" - git add -A - git commit -m "Updated mod version" - git push diff --git a/CHANGELOG.md b/CHANGELOG.md index 17e870e1..e15263f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +#### Release 1.1.0 + +Fixed #109 : ContentPackComplexSignal can now be added to a contentpackset + +Improved #88 : Removed redundant cache + +Added #91 : 90 degree variants for stellwand blocks\ +Added #98 : Preloading option for models (see config)\ +Added #103 : Reimplemented ItemManipulator\ +Added #106 : Reimplemented MagnifyingGlass\ +Added #108 : Implemented dynamic scaling (see config) + +#### Release 1.0.4 + +Fixed missing logging parameter in ContentPackHandlerV2#load + #### Release 1.0.3 Fixed #82 | 1.7.10 - 1.16.5:\ diff --git a/VERSION b/VERSION index 21e8796a..9084fa2f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.3 +1.1.0 diff --git a/build.gradle b/build.gradle index fa87bfed..11fa833d 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { apply plugin: 'cam72cam.universalmodcore' apply plugin: 'maven' -String version = '1.0.3' +String version = '1.0.4' universalmodcore { modPackage = 'net.landofrails.landofsignals' diff --git a/src/main/java/net/landofrails/api/contentpacks/v2/complexsignal/ContentPackComplexSignal.java b/src/main/java/net/landofrails/api/contentpacks/v2/complexsignal/ContentPackComplexSignal.java index 1bb6b552..50f9210f 100644 --- a/src/main/java/net/landofrails/api/contentpacks/v2/complexsignal/ContentPackComplexSignal.java +++ b/src/main/java/net/landofrails/api/contentpacks/v2/complexsignal/ContentPackComplexSignal.java @@ -152,8 +152,6 @@ public void validate(Consumer invalid, ContentPack contentPack) { Consumer referencesConsumer = text -> invalid.accept("references" + ": [" + text + "]"); references.validate(referencesConsumer); - defaultMissing(); - StringJoiner joiner = new StringJoiner(",", "[", "]"); if (name == null) joiner.add("name"); @@ -167,6 +165,8 @@ public void validate(Consumer invalid, ContentPack contentPack) { invalid.accept(joiner.toString()); } else { + defaultMissing(); + if (!"MISSING".equalsIgnoreCase(id)) { uniqueId = contentPack.getId() + ":" + id; } else { diff --git a/src/main/java/net/landofrails/landofsignals/LOSBlocks.java b/src/main/java/net/landofrails/landofsignals/LOSBlocks.java index 8ca684d7..59636329 100644 --- a/src/main/java/net/landofrails/landofsignals/LOSBlocks.java +++ b/src/main/java/net/landofrails/landofsignals/LOSBlocks.java @@ -154,7 +154,8 @@ public static void register() { Static.MISSING_NAME, Static.MISSING_OBJ, keyValueLinkedMap("default", null), - null + null, + false ); registerSingleGroupStellwandContent( @@ -162,7 +163,17 @@ public static void register() { "Signal Straight Track", "models/block/stellwand/blocksignal/blocktrackstraight/blocksignal.obj", keyValueLinkedMap("Off", "off", "White", "white", "Red", "red"), - "white" + "white", + false + ); + + registerSingleGroupStellwandContent( + "block_signal_straight_track_90deg", + "Signal Straight Track (90deg)", + "models/block/stellwand/blocksignal/blocktrackstraight/blocksignal.obj", + keyValueLinkedMap("Off", "off", "White", "white", "Red", "red"), + "white", + true ); registerSingleGroupStellwandContent( @@ -170,7 +181,17 @@ public static void register() { "Signal Straight Unisolated", "models/block/stellwand/blocksignal/blocktrackunisolated/unisolated.obj", keyValueLinkedMap("Off", "off", "White", "white"), - "white" + "white", + false + ); + + registerSingleGroupStellwandContent( + "block_signal_straight_unisolated_90deg", + "Signal Straight Unisolated (90deg)", + "models/block/stellwand/blocksignal/blocktrackunisolated/unisolated.obj", + keyValueLinkedMap("Off", "off", "White", "white"), + "white", + true ); registerSingleGroupStellwandContent( @@ -178,7 +199,8 @@ public static void register() { "Signal Diagonal Track DL", "models/block/stellwand/blocksignal/trackdiag/downleft/trackdiagdownleft.obj", keyValueLinkedMap("Off", "off", "White", "white", "Red", "red"), - "white" + "white", + false ); registerSingleGroupStellwandContent( @@ -186,7 +208,8 @@ public static void register() { "Signal Diagonal Track DR", "models/block/stellwand/blocksignal/trackdiag/downright/trackdiagdownright.obj", keyValueLinkedMap("Off", "off", "White", "white", "Red", "red"), - "white" + "white", + false ); registerSingleGroupStellwandContent( @@ -194,7 +217,8 @@ public static void register() { "Signal Diagonal Track UL", "models/block/stellwand/blocksignal/trackdiag/upleft/trackdiagupleft.obj", keyValueLinkedMap("Off", "off", "White", "white", "Red", "red"), - "white" + "white", + false ); registerSingleGroupStellwandContent( @@ -202,7 +226,8 @@ public static void register() { "Signal Diagonal Track UR", "models/block/stellwand/blocksignal/trackdiag/upright/trackdiagupright.obj", keyValueLinkedMap("Off", "off", "White", "white", "Red", "red"), - "white" + "white", + false ); registerSingleGroupStellwandContent( @@ -210,7 +235,17 @@ public static void register() { "Signal HSig Left", "models/block/stellwand/blocksignal/trackmainsignal/left/hsigleft.obj", keyValueLinkedMap("Off", "off", "Green", "green", "Orange", "orange", "Red", "red"), - "green" + "green", + false + ); + + registerSingleGroupStellwandContent( + "block_signal_hsig_left_90deg", + "Signal HSig Left (90deg)", + "models/block/stellwand/blocksignal/trackmainsignal/left/hsigleft.obj", + keyValueLinkedMap("Off", "off", "Green", "green", "Orange", "orange", "Red", "red"), + "green", + true ); registerSingleGroupStellwandContent( @@ -218,7 +253,17 @@ public static void register() { "Signal HSig Right", "models/block/stellwand/blocksignal/trackmainsignal/right/hsigright.obj", keyValueLinkedMap("Off", "off", "Green", "green", "Orange", "orange", "Red", "red"), - "green" + "green", + false + ); + + registerSingleGroupStellwandContent( + "block_signal_hsig_right_90deg", + "Signal HSig Right (90deg)", + "models/block/stellwand/blocksignal/trackmainsignal/right/hsigright.obj", + keyValueLinkedMap("Off", "off", "Green", "green", "Orange", "orange", "Red", "red"), + "green", + true ); registerSingleGroupStellwandContent( @@ -226,7 +271,17 @@ public static void register() { "Dwarfsignal bottom", "models/block/stellwand/blocksignal/blockdwarfsignal/blockdwarfsignalbottom.obj", keyValueLinkedMap("Off", "off", "Green", "green"), - "green" + "green", + false + ); + + registerSingleGroupStellwandContent( + "block_signal_dwarf_left", + "Dwarfsignal left", + "models/block/stellwand/blocksignal/blockdwarfsignal/blockdwarfsignalbottom.obj", + keyValueLinkedMap("Off", "off", "Green", "green"), + "green", + true ); registerSingleGroupStellwandContent( @@ -234,7 +289,17 @@ public static void register() { "Dwarfsignal top", "models/block/stellwand/blocksignal/blockdwarfsignal/blockdwarfsignaltop.obj", keyValueLinkedMap("Off", "off", "Green", "green"), - "green" + "green", + false + ); + + registerSingleGroupStellwandContent( + "block_signal_dwarf_right", + "Dwarfsignal right", + "models/block/stellwand/blocksignal/blockdwarfsignal/blockdwarfsignaltop.obj", + keyValueLinkedMap("Off", "off", "Green", "green"), + "green", + true ); registerSingleGroupStellwandContent( @@ -243,7 +308,18 @@ public static void register() { "models/block/stellwand/blocksignal/trackswitch/lrd/trackswitch.obj", keyValueLinkedMap("Off", "off", "Main single white", "main_signalwhite", "Main double white", "main_doublewhite", "Branch white", "branch_white", "Main double red", "main_doublered", "Branch red", "branch_red"), - "branch_white" + "branch_white", + false + ); + + registerSingleGroupStellwandContent( + "block_signal_track_switch_uld", + "Track switch (Up -> Left, Down)", + "models/block/stellwand/blocksignal/trackswitch/lrd/trackswitch.obj", + keyValueLinkedMap("Off", "off", "Main single white", "main_signalwhite", "Main double white", "main_doublewhite", + "Branch white", "branch_white", "Main double red", "main_doublered", "Branch red", "branch_red"), + "branch_white", + true ); registerSingleGroupStellwandContent( @@ -252,7 +328,18 @@ public static void register() { "models/block/stellwand/blocksignal/trackswitch/lru/trackswitch.obj", keyValueLinkedMap("Off", "off", "Main single white", "main_signalwhite", "Main double white", "main_doublewhite", "Branch white", "branch_white", "Main double red", "main_doublered", "Branch red", "branch_red"), - "branch_white" + "branch_white", + false + ); + + registerSingleGroupStellwandContent( + "block_signal_track_switch_urd", + "Track switch (Up -> Right, Down)", + "models/block/stellwand/blocksignal/trackswitch/lru/trackswitch.obj", + keyValueLinkedMap("Off", "off", "Main single white", "main_signalwhite", "Main double white", "main_doublewhite", "Branch white", + "branch_white", "Main double red", "main_doublered", "Branch red", "branch_red"), + "branch_white", + true ); registerSingleGroupStellwandContent( @@ -261,7 +348,18 @@ public static void register() { "models/block/stellwand/blocksignal/trackswitch/rld/trackswitch.obj", keyValueLinkedMap("Off", "off", "Main single white", "main_signalwhite", "Main double white", "main_doublewhite", "Branch white", "branch_white", "Main double red", "main_doublered", "Branch red", "branch_red"), - "branch_white" + "branch_white", + false + ); + + registerSingleGroupStellwandContent( + "block_signal_track_switch_dlu", + "Track switch (Down -> Left, Up)", + "models/block/stellwand/blocksignal/trackswitch/rld/trackswitch.obj", + keyValueLinkedMap("Off", "off", "Main single white", "main_signalwhite", "Main double white", "main_doublewhite", "Branch white", + "branch_white", "Main double red", "main_doublered", "Branch red", "branch_red"), + "branch_white", + true ); registerSingleGroupStellwandContent( @@ -270,7 +368,18 @@ public static void register() { "models/block/stellwand/blocksignal/trackswitch/rlu/trackswitch.obj", keyValueLinkedMap("Off", "off", "Main single white", "main_signalwhite", "Main double white", "main_doublewhite", "Branch white", "branch_white", "Main double red", "main_doublered", "Branch red", "branch_red"), - "branch_white" + "branch_white", + false + ); + + registerSingleGroupStellwandContent( + "block_signal_track_switch_dru", + "Track switch (Down -> Right, Up)", + "models/block/stellwand/blocksignal/trackswitch/rlu/trackswitch.obj", + keyValueLinkedMap("Off", "off", "Main single white", "main_signalwhite", "Main double white", "main_doublewhite", "Branch white", + "branch_white", "Main double red", "main_doublered", "Branch red", "branch_red"), + "branch_white", + true ); registerStreckenblock(); @@ -291,6 +400,8 @@ public static void register() { registerDecoContentPackStellwand("deco_filler", "Block Filler", models("models/block/stellwand/blockfiller/blockfiller/blockfiller.obj", new ContentPackModel[]{new ContentPackModel(new float[]{0.5f, 0f, 0.5f}, new float[]{0.5f, 0, 0.5f}, new float[]{1f, 1f, 1f}, new float[]{1f, 1f, 1f})})); registerDecoContentPackStellwand("deco_straight_track", "Straight track", models("models/block/stellwand/blockfiller/trackstraight/trackstraight.obj", new ContentPackModel[]{new ContentPackModel(new float[]{0.5f, 0.5f, 0.5f}, new float[]{0.5f, 0.5f, 0.5f}, new float[]{1f, 1f, 1f}, new float[]{1f, 1f, 1f}, new float[]{0f, 180f, 0f})})); + registerDecoContentPackStellwand("deco_straight_track_90deg", "Straight track (90deg)", models("models/block/stellwand/blockfiller/trackstraight/trackstraight.obj", new ContentPackModel[]{new ContentPackModel(new float[]{0.5f, 0.5f, 0.5f}, new float[]{0.5f, 0.5f, 0.5f}, new float[]{1f, 1f, 1f}, new float[]{1f, 1f, 1f}, new float[]{0f, 180, 90f})})); + registerDecoContentPackStellwand("deco_trackdiag_down_left", "Diagonal track (down - left)", models("models/block/stellwand/blockfiller/trackdiag/dl/trackdiag.obj", new ContentPackModel[]{new ContentPackModel(new float[]{0.5f, 0.5f, 0.5f}, new float[]{0.5f, 0.5f, 0.5f}, new float[]{1f, 1f, 1f}, new float[]{1f, 1f, 1f}, new float[]{0f, 180f, 0f})})); registerDecoContentPackStellwand("deco_trackdiag_down_right", "Diagonal track (down - right)", models("models/block/stellwand/blockfiller/trackdiag/dr/trackdiag.obj", new ContentPackModel[]{new ContentPackModel(new float[]{0.5f, 0.5f, 0.5f}, new float[]{0.5f, 0.5f, 0.5f}, new float[]{1f, 1f, 1f}, new float[]{1f, 1f, 1f}, new float[]{0f, 180f, 0f})})); registerDecoContentPackStellwand("deco_trackdiag_up_left", "Diagonal track (up - left)", models("models/block/stellwand/blockfiller/trackdiag/ul/trackdiag.obj", new ContentPackModel[]{new ContentPackModel(new float[]{0.5f, 0.5f, 0.5f}, new float[]{0.5f, 0.5f, 0.5f}, new float[]{1f, 1f, 1f}, new float[]{1f, 1f, 1f}, new float[]{0f, 180f, 0f})})); @@ -299,6 +410,8 @@ public static void register() { } private static void registerStreckenblock() { + String name = "Streckenblock"; + String id = "block_signal_streckenblock"; String objPath = "models/block/stellwand/blockstreckenblock/streckenblock.obj"; Map groups = new HashMap<>(); @@ -321,14 +434,14 @@ private static void registerStreckenblock() { for (String[] state : preparedStates) { String stateId = groupId + state[0]; String stateName = groupName + " " + state[1]; - states.put(stateId, new net.landofrails.api.contentpacks.v2.complexsignal.ContentPackSignalState(stateName, signalModels(objPath, stateId, new float[]{.5f, 0f, .5f}, new float[]{.5f, 0f, .5f}))); + states.put(stateId, new net.landofrails.api.contentpacks.v2.complexsignal.ContentPackSignalState(stateName, signalModels(objPath, stateId, new float[]{0.5f, 0f, 0.5f}, new float[]{.5f, 0f, .5f}))); } groups.put(groupName, new net.landofrails.api.contentpacks.v2.complexsignal.ContentPackSignalGroup(groupName, states)); } ContentPackComplexSignal stellwandMultisignal = new ContentPackComplexSignal( - "Streckenblock", - "block_signal_streckenblock", + name, + id, 90f, LOSTabs.SIGNALS_TAB, signalModels(objPath, "general", new float[]{.5f, 0f, .5f}, new float[]{.5f, 0f, .5f}), @@ -389,12 +502,12 @@ private static void registerDecoContentPackStellwand(String id, String name, Map BLOCK_DECO.add(contentPackDeco); } - private static void registerSingleGroupStellwandContent(String id, String name, String objPath, Map signalNameAndId, String itemGroup) { + private static void registerSingleGroupStellwandContent(String id, String name, String objPath, Map signalNameAndId, String itemGroup, boolean ninetyDegree) { String groupIdName = "default"; LinkedHashMap states = new LinkedHashMap<>(); signalNameAndId.forEach((signalName, signalId) -> - states.put(signalId, new net.landofrails.api.contentpacks.v2.complexsignal.ContentPackSignalState(signalName, signalModels(objPath, signalId))) + states.put(signalId, new net.landofrails.api.contentpacks.v2.complexsignal.ContentPackSignalState(signalName, signalModels(objPath, signalId, ninetyDegree))) ); Map group = Collections.singletonMap(groupIdName, new net.landofrails.api.contentpacks.v2.complexsignal.ContentPackSignalGroup("default", states)); Map itemGroupStates = null; @@ -408,7 +521,7 @@ private static void registerSingleGroupStellwandContent(String id, String name, id, 90f, LOSTabs.SIGNALS_TAB, - signalModels(objPath, "general"), + signalModels(objPath, "general", ninetyDegree), group, itemGroupStates, null, @@ -458,7 +571,7 @@ private static Map keyValueLinkedMap(String... data) { return map; } - private static Map signalModels(String objPath, String objGroup) { + private static Map signalModels(String objPath, String objGroup, boolean rotateNinetyDegrees) { return models( objPath, new ContentPackModel[]{ @@ -467,7 +580,7 @@ private static Map signalModels(String objPath, Stri new float[]{0.5f, 0.5f, 0.5f}, new float[]{1f, 1f, 1f}, new float[]{1f, 1f, 1f}, - new float[]{0f, 180f, 0f}, + new float[]{0f, 180f, rotateNinetyDegrees ? 90f : 0f}, new String[]{objGroup} ) } diff --git a/src/main/java/net/landofrails/landofsignals/LOSGuis.java b/src/main/java/net/landofrails/landofsignals/LOSGuis.java index f8bf6066..d9422d17 100644 --- a/src/main/java/net/landofrails/landofsignals/LOSGuis.java +++ b/src/main/java/net/landofrails/landofsignals/LOSGuis.java @@ -13,12 +13,14 @@ private LOSGuis() { } + @SuppressWarnings("unused") public static final GuiRegistry.GUI TICKET_MACHINE_DB = GuiRegistry.register(new Identifier(LandOfSignals.MODID, "TICKET_MACHINE_DB"), GuiTicketMachine::new); // INFO: Replace GuiRegistry.BlockGUI with GuiRegistry.GUI to be able to open both on the same block. public static final GuiRegistry.GUI SIGNAL_BOX_COMPLEX_SIGNAL = GuiRegistry.register(new Identifier(LandOfSignals.MODID, "SIGNAL_BOX_COMPLEX_SIGNAL"), GuiSignalBoxComplexSignal::new); public static final GuiRegistry.GUI SIGNAL_BOX_SIGNAL_PART = GuiRegistry.register(new Identifier(LandOfSignals.MODID, "SIGNAL_BOX_SIGNAL_PART"), GuiSignalBoxSignalPart::new); + @SuppressWarnings("unused") public static final GuiRegistry.BlockGUI SIGNAL_ANIMATED_BOX = null; - public static final GuiRegistry.BlockGUI MANIPULATOR = GuiRegistry.registerBlock(BlockEntity.class, GuiManipualtor::new); + public static final GuiRegistry.BlockGUI MANIPULATOR = GuiRegistry.registerBlock(BlockEntity.class, GuiManipulator::new); public static final GuiRegistry.GUI SIGN_TEXTEDITOR = GuiRegistry.register(new Identifier(LandOfSignals.MODID, "SIGN_TEXTEDTIOR"), GuiSignTextEditor::new); public static final GuiRegistry.GUI SIGNAL_PRIORITIZATION = GuiRegistry.register(new Identifier(LandOfSignals.MODID, "SIGNAL_PRIORITIZATION"), GuiSignalPrioritization::new); @@ -27,5 +29,4 @@ private LOSGuis() { public static void register() { // loads static classes and ctrs } - } diff --git a/src/main/java/net/landofrails/landofsignals/LOSItems.java b/src/main/java/net/landofrails/landofsignals/LOSItems.java index c9183d33..49b434f7 100644 --- a/src/main/java/net/landofrails/landofsignals/LOSItems.java +++ b/src/main/java/net/landofrails/landofsignals/LOSItems.java @@ -13,7 +13,7 @@ private LOSItems() { public static final ItemSignalLever ITEM_SIGNAL_LEVER = new ItemSignalLever(LandOfSignals.MODID, "item_signal_lever"); public static final ItemConnector ITEM_CONNECTOR = new ItemConnector(LandOfSignals.MODID, "item_connector"); public static final ItemManipulator ITEM_MANIPULATOR = new ItemManipulator(LandOfSignals.MODID, "item_manipulator"); - + public static final ItemMagnifyingGlass ITEM_MAGNIFYING_GLASS = new ItemMagnifyingGlass(LandOfSignals.MODID, "item_magnifying_glass"); public static final ItemSignalPart ITEM_SIGNAL_PART = new ItemSignalPart(LandOfSignals.MODID, "item_signal_part"); public static final CustomItem ITEM_COMPLEX_SIGNAL = new ItemComplexSignal(LandOfSignals.MODID, "item_complex_signal"); public static final ItemSignalPartAnimated ITEM_SIGNAL_PART_ANIMATED = new ItemSignalPartAnimated(LandOfSignals.MODID, "item_signal_part_animated"); diff --git a/src/main/java/net/landofrails/landofsignals/LandOfSignals.java b/src/main/java/net/landofrails/landofsignals/LandOfSignals.java index cfc48dba..2938846b 100644 --- a/src/main/java/net/landofrails/landofsignals/LandOfSignals.java +++ b/src/main/java/net/landofrails/landofsignals/LandOfSignals.java @@ -28,7 +28,8 @@ public class LandOfSignals extends ModCore.Mod { @SuppressWarnings({"java:S1845"}) public static final String MODID = "landofsignals"; // Current version - public static final String VERSION = "1.0.3"; + @SuppressWarnings("unused") + public static final String VERSION = "1.1.0"; @Override public String modID() { @@ -66,6 +67,7 @@ public void commonEvent(final ModEvent event) { Packet.register(ConfigGuiPacket::new, PacketDirection.ServerToClient); Packet.register(GuiSignalPrioritizationToClientPacket::new, PacketDirection.ServerToClient); Packet.register(GuiSignalPrioritizationToServerPacket::new, PacketDirection.ClientToServer); + Packet.register(GuiItemManipulatorToClient::new, PacketDirection.ServerToClient); } else if (event == ModEvent.INITIALIZE) { // LandOfSignals Config ConfigFile.sync(LandOfSignalsConfig.class); @@ -92,6 +94,7 @@ public void clientEvent(final ModEvent event) { ItemRender.register(LOSItems.ITEM_SIGNAL_LEVER, ObjItemRender.getModelFor(new Identifier(LandOfSignals.MODID, "models/block/landofsignals/signalslever/signalslever.obj"), new Vec3d(0.5, 0.6, 0.5), 1)); ItemRender.register(LOSItems.ITEM_CONNECTOR, new Identifier(LandOfSignals.MODID, "items/itemconnector1")); ItemRender.register(LOSItems.ITEM_MANIPULATOR, new Identifier(LandOfSignals.MODID, "items/manipulator")); + ItemRender.register(LOSItems.ITEM_MAGNIFYING_GLASS, new Identifier(LandOfSignals.MODID, "items/magnifyingglass")); //SignalPart : Block BlockRender.register(LOSBlocks.BLOCK_SIGNAL_PART, TileSignalPartRender::render, TileSignalPart.class); @@ -117,9 +120,12 @@ public void clientEvent(final ModEvent event) { break; case SETUP: GlobalRender.registerOverlay(pt -> new ManipualtorOverlay().draw()); + + if(LandOfSignalsConfig.preloadModels) { + ContentPackHandler.preloadModels(); + } + break; - case RELOAD: - case FINALIZE: default: break; } diff --git a/src/main/java/net/landofrails/landofsignals/configs/LandOfSignalsConfig.java b/src/main/java/net/landofrails/landofsignals/configs/LandOfSignalsConfig.java index 4befa92d..f8fd0972 100644 --- a/src/main/java/net/landofrails/landofsignals/configs/LandOfSignalsConfig.java +++ b/src/main/java/net/landofrails/landofsignals/configs/LandOfSignalsConfig.java @@ -8,4 +8,16 @@ @SuppressWarnings({"java:S1118", "java:S1444"}) public class LandOfSignalsConfig { + @ConfigFile.Comment("Enables preloading, slower startup, less lag spikes. If you want to use it, set it to \"true\". | Default: false") + public static boolean preloadModels = false; + + @ConfigFile.Name("experimental") + @ConfigFile.Comment("Experimental features - activate at own risk") + public static class Experimental { + + @ConfigFile.Comment("Rescale items to slot size - needs \"preloadModels\" to be activated | Default: false") + public static boolean rescaleItems = false; + + } + } diff --git a/src/main/java/net/landofrails/landofsignals/contentpacks/ContentPackHandler.java b/src/main/java/net/landofrails/landofsignals/contentpacks/ContentPackHandler.java index e0f0a1af..f38dfd00 100644 --- a/src/main/java/net/landofrails/landofsignals/contentpacks/ContentPackHandler.java +++ b/src/main/java/net/landofrails/landofsignals/contentpacks/ContentPackHandler.java @@ -1,15 +1,28 @@ package net.landofrails.landofsignals.contentpacks; +import cam72cam.mod.ModCore; +import cam72cam.mod.gui.Progress; +import cam72cam.mod.math.Vec3d; +import cam72cam.mod.model.obj.OBJModel; +import cam72cam.mod.render.obj.OBJRender; +import cam72cam.mod.resource.Identifier; import net.landofrails.api.contentpacks.GenericContentPack; +import net.landofrails.api.contentpacks.v2.complexsignal.ContentPackSignalGroup; +import net.landofrails.api.contentpacks.v2.parent.ContentPackModel; +import net.landofrails.api.contentpacks.v2.signal.ContentPackSignal; +import net.landofrails.landofsignals.LOSBlocks; import net.landofrails.landofsignals.LandOfSignals; +import net.landofrails.landofsignals.configs.LandOfSignalsConfig; +import net.landofrails.landofsignals.render.block.*; +import net.landofrails.landofsignals.render.item.*; +import net.landofrails.landofsignals.utils.Static; import net.landofrails.stellwand.utils.exceptions.ContentPackException; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import java.util.List; -import java.util.Optional; +import java.util.*; import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.zip.ZipEntry; @@ -17,6 +30,11 @@ public class ContentPackHandler { + private static final String GENERIC_ITEM_ERRMSG = "Couldn't preload item with id \"%s\". Cause:"; + private static final String GENERIC_BLOCK_ERRMSG = "Couldn't preload block with id \"%s\". Cause:"; + + private static final String BASE_IDENTIFIER = "/base/"; + private ContentPackHandler() { } @@ -121,6 +139,289 @@ private static void load(ZipFile zip, ZipEntry landofsignalsJson, boolean isUTF8 } } + public static void preloadModels() { + + LandOfSignals.info("Starting preloading models"); + + boolean rescaleItems = LandOfSignalsConfig.Experimental.rescaleItems; + Progress.Bar topProgressBar = Progress.push("LandOfSignals", rescaleItems ? 3 : 2); + topProgressBar.step("Preloading models"); + + // Signalpart + Progress.Bar progressBar = Progress.push("Signalpart", LOSBlocks.BLOCK_SIGNAL_PART.getContentpackSignals().size()); + for (String id : LOSBlocks.BLOCK_SIGNAL_PART.getContentpackSignals().keySet()) { + ModCore.info("Preloading signalpart %s", id); + progressBar.step(LOSBlocks.BLOCK_SIGNAL_PART.getContentpackSignals().get(id).getName()); + + final ContentPackSignal signal = LOSBlocks.BLOCK_SIGNAL_PART.getContentpackSignals().get(id); + final String[] states = LOSBlocks.BLOCK_SIGNAL_PART.getAllStates(id); + final String objPath = signal.getModel(); + + // Cache items + try { + ItemSignalPartRender.cache().put(objPath, new OBJRender(new OBJModel(new Identifier(LandOfSignals.MODID, objPath), 0, Arrays.asList(states)))); + } catch (Exception e) { + String errmsg = "Couldn't preload item with id \"%s\" (objPath: %s). Cause:"; + throw new ContentPackException(String.format(errmsg, id, objPath), e); + } + + // Cache blocks + try { + TileSignalPartRender.cache().put(objPath, new OBJRender(new OBJModel(new Identifier(LandOfSignals.MODID, objPath), 0, Arrays.asList(states)))); + } catch (Exception e) { + String errmsg = "Couldn't preload block with id \"%s\" (objPath: %s). Cause:"; + throw new ContentPackException(String.format(errmsg, id, objPath), e); + } + } + Progress.pop(progressBar); + + // Complexsignals + progressBar = Progress.push("Complexsignal", LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().size()); + for (String id : LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().keySet()) { + ModCore.info("Preloading complexsignal %s", id); + progressBar.step(LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(id).getName()); + + final Map signalGroups = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(id).getSignals(); + final Map base = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(id).getBase(); + + // Cache items + try { + ItemComplexSignalRender.checkCache(id, base, BASE_IDENTIFIER, false); + ItemComplexSignalRender.checkCache(id, signalGroups.values()); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_ITEM_ERRMSG, id), e); + } + + // Cache blocks + try { + TileComplexSignalRender.checkCache(id, base, BASE_IDENTIFIER, true); + TileComplexSignalRender.checkCache(id, signalGroups.values(), "/signals/"); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_BLOCK_ERRMSG, id), e); + } + + } + Progress.pop(progressBar); + + // Blockdeco + progressBar = Progress.push("Deco", LOSBlocks.BLOCK_DECO.getContentpackDeco().size()); + for (String id : LOSBlocks.BLOCK_DECO.getContentpackDeco().keySet()) { + ModCore.info("Preloading deco %s", id); + progressBar.step(LOSBlocks.BLOCK_DECO.getContentpackDeco().get(id).getName()); + + final Map models = LOSBlocks.BLOCK_DECO.getContentpackDeco().get(id).getBase(); + + // Cache items + try { + ItemDecoRender.checkCache(id, models); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_ITEM_ERRMSG, id), e); + } + + // Cache blocks + try { + TileDecoRender.checkCache(id, models); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_BLOCK_ERRMSG, id), e); + } + } + Progress.pop(progressBar); + + // Signparts + progressBar = Progress.push("Sign", LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().size()); + for (String id : LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().keySet()) { + ModCore.info("Preloading sign %s", id); + progressBar.step(LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().get(id).getName()); + + final Map base = LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().get(id).getBase(); + + // Cache items + try { + ItemSignPartRender.checkCache(id, base); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_ITEM_ERRMSG, id), e); + } + + // Cache blocks + try { + TileSignPartRender.checkCache(id, base); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_BLOCK_ERRMSG, id), e); + } + + } + Progress.pop(progressBar); + + // Signalboxes + progressBar = Progress.push("Signalbox", LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().size()); + for (String id : LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().keySet()) { + ModCore.info("Preloading signalbox %s", id); + progressBar.step(LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().get(id).getName()); + + final Map base = LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().get(id).getBase(); + + // Cache items + try { + ItemSignalBoxRender.checkCache(id, base); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_ITEM_ERRMSG, id), e); + } + + // Cache blocks + try { + TileSignalBoxRender.checkCache(id, base); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_BLOCK_ERRMSG, id), e); + } + + } + Progress.pop(progressBar); + + LandOfSignals.info("Finished preloading models"); + + if(rescaleItems) { + topProgressBar.step("Rescaling items"); + rescaleItemsToSlotSize(); + } + + + topProgressBar.step("Finishing"); + Progress.pop(topProgressBar); + } + + private static void rescaleItemsToSlotSize() { + + LandOfSignals.info("Starting item rescaling"); + + // Signalpart + Progress.Bar progressBar = Progress.push("Signalpart", LOSBlocks.BLOCK_SIGNAL_PART.getContentpackSignals().size()); + for (String id : LOSBlocks.BLOCK_SIGNAL_PART.getContentpackSignals().keySet()) { + ModCore.info("Rescaling signalpart %s", id); + progressBar.step(LOSBlocks.BLOCK_SIGNAL_PART.getContentpackSignals().get(id).getName()); + + final ContentPackSignal signal = LOSBlocks.BLOCK_SIGNAL_PART.getContentpackSignals().get(id); + final String[] states = LOSBlocks.BLOCK_SIGNAL_PART.getAllStates(id); + final String objPath = signal.getModel(); + + // Cache items + try { + OBJModel model = new OBJModel(new Identifier(LandOfSignals.MODID, objPath), 0, Arrays.asList(states)); + float[] scale = rescaleItem(model, signal.getItemScaling()); + float[] translation = retranslateItem(model, scale, signal.getItemScaling(), signal.getItemTranslation()); + signal.setItemScaling(scale); + signal.setItemTranslation(translation); + } catch (Exception e) { + String errmsg = "Couldn't rescale item with id \"%s\" (objPath: %s). Cause:"; + throw new ContentPackException(String.format(errmsg, id, objPath), e); + } + } + Progress.pop(progressBar); + + // Complexsignals + progressBar = Progress.push("Complexsignal", LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().size()); + for (String id : LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().keySet()) { + ModCore.info("Rescaling complexsignal %s", id); + progressBar.step(LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(id).getName()); + + final Map signalGroups = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(id).getSignals(); + final Map base = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(id).getBase(); + + // Cache items + try { + ItemComplexSignalRender.checkCache(id, base, BASE_IDENTIFIER, false); + ItemComplexSignalRender.checkCache(id, signalGroups.values()); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_ITEM_ERRMSG, id), e); + } + } + Progress.pop(progressBar); + + // Blockdeco + progressBar = Progress.push("Deco", LOSBlocks.BLOCK_DECO.getContentpackDeco().size()); + for (String id : LOSBlocks.BLOCK_DECO.getContentpackDeco().keySet()) { + ModCore.info("Rescaling deco %s", id); + progressBar.step(LOSBlocks.BLOCK_DECO.getContentpackDeco().get(id).getName()); + + final Map models = LOSBlocks.BLOCK_DECO.getContentpackDeco().get(id).getBase(); + + // Cache items + try { + ItemDecoRender.checkCache(id, models); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_ITEM_ERRMSG, id), e); + } + } + Progress.pop(progressBar); + + // Signparts + progressBar = Progress.push("Sign", LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().size()); + for (String id : LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().keySet()) { + ModCore.info("Rescaling sign %s", id); + progressBar.step(LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().get(id).getName()); + + final Map base = LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().get(id).getBase(); + + // Cache items + try { + ItemSignPartRender.checkCache(id, base); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_ITEM_ERRMSG, id), e); + } + } + Progress.pop(progressBar); + + // Signalboxes + progressBar = Progress.push("Signalbox", LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().size()); + for (String id : LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().keySet()) { + ModCore.info("Rescaling signalbox %s", id); + progressBar.step(LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().get(id).getName()); + + final Map base = LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().get(id).getBase(); + + // Cache items + try { + ItemSignalBoxRender.checkCache(id, base); + } catch (Exception e) { + throw new ContentPackException(String.format(GENERIC_ITEM_ERRMSG, id), e); + } + } + Progress.pop(progressBar); + + LandOfSignals.info("Finished rescaling items"); + + } + + private static float[] rescaleItem(OBJModel model, float[] itemScaling) { + double height = model.heightOfGroups(model.groups()); + + if (itemScaling[0] != itemScaling[1] || itemScaling[1] != itemScaling[2]) { + return itemScaling; + } + + float rescale = (float) Static.round(1 / height, 4); + + if (rescale > 4) { + return new float[]{0.5f, 0.5f, 0.5f}; + } + + return new float[]{rescale, rescale, rescale}; + } + + private static float[] retranslateItem(OBJModel model, float[] newScale, float[] oldScale, float[] itemTranslation) { + Vec3d center = model.centerOfGroups(model.groups()); + double height = model.heightOfGroups(model.groups()); + float[] newTranslation = Arrays.copyOf(itemTranslation, itemTranslation.length); + + if (Objects.deepEquals(newScale, oldScale)) { + return itemTranslation; + } + + newTranslation[0] = 0.5f; + newTranslation[1] = (float) Static.round(((height / 2) - center.y) * newScale[1], 4); + newTranslation[2] = 0.5f; + + return newTranslation; + } // For method references private static Predicate not(Predicate t) { diff --git a/src/main/java/net/landofrails/landofsignals/contentpacks/ContentPackHandlerV2.java b/src/main/java/net/landofrails/landofsignals/contentpacks/ContentPackHandlerV2.java index 89798363..51eaab2a 100644 --- a/src/main/java/net/landofrails/landofsignals/contentpacks/ContentPackHandlerV2.java +++ b/src/main/java/net/landofrails/landofsignals/contentpacks/ContentPackHandlerV2.java @@ -63,7 +63,7 @@ public static void load(ZipFile zip, String name, boolean isUTF8) throws IOExcep contentPack.getContentSets().forEach(path -> loadSet(zip, path, contentPack, isUTF8)); } if (!hasContent && !hasContentSets) { - ModCore.warn("ContentPack %s does not contain any blocks"); + ModCore.warn("ContentPack %s does not contain any blocks", contentPack.getId()); } } @@ -207,7 +207,7 @@ private static void loadSet(ZipFile zip, String path, ContentPack contentPack, b loadSignal(zip, entryPath, contentPack, isUTF8); break; case BLOCKCOMPLEXSIGNAL: - loadComplexSignal(zip, path, contentPack, isUTF8); + loadComplexSignal(zip, entryPath, contentPack, isUTF8); break; case BLOCKSIGN: loadSign(zip, entryPath, contentPack, isUTF8); diff --git a/src/main/java/net/landofrails/landofsignals/gui/GuiManipualtor.java b/src/main/java/net/landofrails/landofsignals/gui/GuiManipualtor.java deleted file mode 100644 index 6be625b7..00000000 --- a/src/main/java/net/landofrails/landofsignals/gui/GuiManipualtor.java +++ /dev/null @@ -1,199 +0,0 @@ -package net.landofrails.landofsignals.gui; - -import cam72cam.mod.MinecraftClient; -import cam72cam.mod.block.BlockEntity; -import cam72cam.mod.entity.Player; -import cam72cam.mod.gui.screen.*; -import cam72cam.mod.math.Vec3d; -import cam72cam.mod.math.Vec3i; -import net.landofrails.landofsignals.LOSItems; -import net.landofrails.landofsignals.items.ItemManipulator; -import net.landofrails.landofsignals.packet.ManipulatorToClientPacket; -import net.landofrails.landofsignals.utils.IManipulate; -import net.landofrails.landofsignals.utils.Static; - -import java.util.function.Predicate; - -public class GuiManipualtor implements IScreen { - - private CheckBox positionBox; - private CheckBox heightBox; - private CheckBox rotationBox; - private CheckBox hitboxBox; - - private Button ingameButton; - - private Slider rotationSlider; - - private TextField positionXField; - private TextField positionZField; - private TextField heightYField; - - private String textXBefore; - private String textYBefore; - private String textZBefore; - - private final Vec3d offset; - private int rotation; - private final Vec3i blockPos; - - private final Predicate doubleFilter = inputString -> { - if (inputString == null || inputString.length() == 0) { - return true; - } - try { - Double.parseDouble(inputString); - } catch (NumberFormatException e) { - return false; - } - return true; - }; - - public GuiManipualtor(final BlockEntity be) { - final IManipulate manipulate = (IManipulate) be; - offset = manipulate.getOffset(); - rotation = manipulate.getRotation(); - blockPos = be.getPos(); - } - - @Override - public void init(final IScreenBuilder screen) { - positionBox = new CheckBox(screen, screen.getWidth() / 2 - screen.getWidth() + 50, 90, GuiText.LABEL_EDITPOSITION + " (X, Z)", true) { - @Override - public void onClick(final Player.Hand hand) { - uncheckOtherBoxes(this); - setAllInvisible(); - positionXField.setVisible(true); - positionZField.setVisible(true); - ingameButton.setVisible(true); - ItemManipulator.editHeight = false; - } - }; - heightBox = new CheckBox(screen, screen.getWidth() / 2 - screen.getWidth() + 50, 110, GuiText.LABEL_EDITPOSITION + " (Y)", false) { - @Override - public void onClick(final Player.Hand hand) { - uncheckOtherBoxes(this); - setAllInvisible(); - ingameButton.setVisible(true); - heightYField.setVisible(true); - ItemManipulator.editHeight = true; - } - }; - rotationBox = new CheckBox(screen, screen.getWidth() / 2 - screen.getWidth() + 50, 130, GuiText.LABEL_EDITROTATION.toString(), false) { - @Override - public void onClick(final Player.Hand hand) { - uncheckOtherBoxes(this); - setAllInvisible(); - rotationSlider.setVisible(true); - } - }; - hitboxBox = new CheckBox(screen, screen.getWidth() / 2 - screen.getWidth() + 50, 150, GuiText.LABEL_EDITHITBOX.toString(), false) { - @Override - public void onClick(final Player.Hand hand) { - uncheckOtherBoxes(this); - setAllInvisible(); - } - }; - - ingameButton = new Button(screen, screen.getWidth() / 2 - 120, 90, 100, 20, GuiText.LABEL_EDITINGAME.toString()) { - @Override - public void onClick(final Player.Hand hand) { - ItemManipulator.editIngame = true; - LOSItems.ITEM_MANIPULATOR.setPlayerMainPos(MinecraftClient.getPlayer().getPosition()); - screen.close(); - } - }; - - rotationSlider = new Slider(screen, screen.getWidth() / 2 - 170, 90, GuiText.LABEL_ROTATIONSLIDER + " : " + rotation, 0, 360, rotation, false) { - @Override - public void onSlider() { - rotation = rotationSlider.getValueInt(); - rotationSlider.setText(GuiText.LABEL_ROTATIONSLIDER + " : " + rotation); - send(); - } - }; - - positionXField = new TextField(screen, screen.getWidth() / 2 - 120, screen.getHeight() / 2 - 120, 100, 20); - positionZField = new TextField(screen, screen.getWidth() / 2 - 120, screen.getHeight() / 2 - 100, 100, 20); - heightYField = new TextField(screen, screen.getWidth() / 2 - 120, screen.getHeight() / 2 - 120, 100, 20); - - positionXField.setValidator(doubleFilter); - positionZField.setValidator(doubleFilter); - heightYField.setValidator(doubleFilter); - - setAllInvisible(); - positionXField.setVisible(true); - positionZField.setVisible(true); - ingameButton.setVisible(true); - - positionXField.setText(String.valueOf(offset.x)); - positionZField.setText(String.valueOf(offset.z)); - heightYField.setText(String.valueOf(offset.y)); - - ItemManipulator.editHeight = false; - - } - - @Override - public void onEnterKey(final IScreenBuilder builder) { - LOSItems.ITEM_MANIPULATOR.clearBlock(); - builder.close(); - } - - @SuppressWarnings("java:S125") - @Override - public void onClose() { - send(); - //Server -// ManipulatorToServerPacket serverPacket = new ManipulatorToServerPacket(new Vec3d(Double.parseDouble(positionXField.getText()), Double.parseDouble(heightYField.getText()), Double.parseDouble(positionZField.getText())), rotation, blockPos); -// serverPacket.sendToServer(); - } - - @Override - public void draw(final IScreenBuilder builder) { - - final String tempX = positionXField.getText(); - final String tempY = heightYField.getText(); - final String tempZ = positionZField.getText(); - if (!positionXField.getText().isEmpty() && !tempX.equals(textXBefore)) { - positionXField.setText(String.valueOf(Static.round(Double.parseDouble(tempX), 3))); - textXBefore = tempX; - send(); - } - - if (!heightYField.getText().isEmpty() && !tempY.equals(textYBefore)) { - heightYField.setText(String.valueOf(Static.round(Double.parseDouble(tempY), 3))); - textYBefore = tempY; - send(); - } - - if (!positionZField.getText().isEmpty() && !tempZ.equals(textZBefore)) { - positionZField.setText(String.valueOf(Static.round(Double.parseDouble(tempZ), 3))); - textZBefore = tempZ; - send(); - } - - } - - private void send() { - //Client - final ManipulatorToClientPacket clientPacket = new ManipulatorToClientPacket(new Vec3d(Double.parseDouble(positionXField.getText()), Double.parseDouble(heightYField.getText()), Double.parseDouble(positionZField.getText())), rotation, blockPos, ItemManipulator.sneak); - clientPacket.sendToAll(); - } - - private void setAllInvisible() { - positionXField.setVisible(false); - positionZField.setVisible(false); - heightYField.setVisible(false); - ingameButton.setVisible(false); - rotationSlider.setVisible(false); - } - - private void uncheckOtherBoxes(final CheckBox box) { - positionBox.setChecked(false); - heightBox.setChecked(false); - rotationBox.setChecked(false); - hitboxBox.setChecked(false); - box.setChecked(true); - } -} diff --git a/src/main/java/net/landofrails/landofsignals/gui/GuiManipulator.java b/src/main/java/net/landofrails/landofsignals/gui/GuiManipulator.java new file mode 100644 index 00000000..7de1691e --- /dev/null +++ b/src/main/java/net/landofrails/landofsignals/gui/GuiManipulator.java @@ -0,0 +1,455 @@ +package net.landofrails.landofsignals.gui; + +import cam72cam.mod.block.BlockEntity; +import cam72cam.mod.entity.Player; +import cam72cam.mod.gui.helpers.GUIHelpers; +import cam72cam.mod.gui.screen.*; +import cam72cam.mod.math.Vec3d; +import cam72cam.mod.math.Vec3i; +import net.landofrails.landofsignals.packet.ManipulatorToClientPacket; +import net.landofrails.landofsignals.packet.ManipulatorToServerPacket; +import net.landofrails.landofsignals.utils.IManipulate; +import net.landofrails.landofsignals.utils.Static; + +import java.util.function.Predicate; + +public class GuiManipulator implements IScreen { + + private CheckBox cascadeBox; + private CheckBox positionBox; + private CheckBox heightBox; + private CheckBox rotationBox; + private CheckBox scalingBox; + + private Slider rotationSlider; + private Button rotationAddition; + private Button rotationSubtraction; + + private TextField positionXField; + private Button positionXAddition; + private Button positionXSubtraction; + private TextField positionZField; + private Button positionZAddition; + private Button positionZSubtraction; + private TextField heightYField; + private Button heightYAddition; + private Button heightYSubtraction; + private TextField scalingXField; + private Button scalingXAddition; + private Button scalingXSubtraction; + private TextField scalingYField; + private Button scalingYAddition; + private Button scalingYSubtraction; + private TextField scalingZField; + private Button scalingZAddition; + private Button scalingZSubtraction; + private String textXBefore; + private String textYBefore; + private String textZBefore; + private String scalingXBefore; + private String scalingYBefore; + private String scalingZBefore; + + private final Vec3d offset; + private Vec3d scaling; + private int rotation; + private final Vec3i blockPos; + + private final Predicate doubleFilter = inputString -> { + if (inputString == null || inputString.length() == 0) { + return true; + } + try { + Double.parseDouble(inputString); + } catch (NumberFormatException e) { + return false; + } + return true; + }; + + public GuiManipulator(final BlockEntity be) { + final IManipulate manipulate = (IManipulate) be; + offset = manipulate.getOffset(); + scaling = manipulate.getScaling(); + rotation = manipulate.getRotation() % 360; + if (rotation < 0) + rotation += 360; + blockPos = be.getPos(); + } + + @Override + public void init(final IScreenBuilder screen) { + + cascadeBox = new CheckBox(screen, screen.getWidth() / 2 - screen.getWidth() + 50, 0, GuiText.LABEL_CASCADE.toString(), true) { + @Override + public void onClick(Player.Hand hand) { + // Nothing to do + } + }; + cascadeBox.setChecked(false); + + positionBox = new CheckBox(screen, screen.getWidth() / 2 - screen.getWidth() + 50, 90, GuiText.LABEL_EDITPOSITION + " (X, Z)", true) { + @Override + public void onClick(final Player.Hand hand) { + uncheckOtherBoxes(this); + setAllInvisible(); + positionXField.setVisible(true); + positionXAddition.setVisible(true); + positionXSubtraction.setVisible(true); + positionZField.setVisible(true); + positionZAddition.setVisible(true); + positionZSubtraction.setVisible(true); + } + }; + heightBox = new CheckBox(screen, screen.getWidth() / 2 - screen.getWidth() + 50, 110, GuiText.LABEL_EDITPOSITION + " (Y)", false) { + @Override + public void onClick(final Player.Hand hand) { + uncheckOtherBoxes(this); + setAllInvisible(); + heightYField.setVisible(true); + heightYAddition.setVisible(true); + heightYSubtraction.setVisible(true); + } + }; + rotationBox = new CheckBox(screen, screen.getWidth() / 2 - screen.getWidth() + 50, 130, GuiText.LABEL_EDITROTATION.toString(), false) { + @Override + public void onClick(final Player.Hand hand) { + uncheckOtherBoxes(this); + setAllInvisible(); + rotationSlider.setVisible(true); + rotationAddition.setVisible(true); + rotationSubtraction.setVisible(true); + } + }; + scalingBox = new CheckBox(screen, screen.getWidth() / 2 - screen.getWidth() + 50, 150, GuiText.LABEL_EDITSCALING.toString(), false) { + @Override + public void onClick(final Player.Hand hand) { + uncheckOtherBoxes(this); + setAllInvisible(); + scalingXField.setVisible(true); + scalingXAddition.setVisible(true); + scalingXSubtraction.setVisible(true); + scalingYField.setVisible(true); + scalingYAddition.setVisible(true); + scalingYSubtraction.setVisible(true); + scalingZField.setVisible(true); + scalingZAddition.setVisible(true); + scalingZSubtraction.setVisible(true); + } + }; + + new Button(screen, screen.getWidth() / 2 - screen.getWidth() + 50, -30, 60, 20, "Reset all") { + @Override + public void onClick(Player.Hand hand) { + resetAll(screen); + } + }; + + renewSlider(screen); + rotationSubtraction = new Button(screen,screen.getWidth() / 2 - 220, 100, 20, 20, "-") { + @Override + public void onClick(Player.Hand hand) { + rotation--; + renewSlider(screen); + send(); + } + }; + rotationAddition = new Button(screen, screen.getWidth() / 2 - 50, 100, 20, 20, "+") { + @Override + public void onClick(Player.Hand hand) { + rotation++; + renewSlider(screen); + send(); + } + }; + + positionXField = new TextField(screen, screen.getWidth() / 2 - 120, screen.getHeight() / 2 - 120, 40, 20); + positionXAddition = new Button(screen, screen.getWidth() / 2 - 79, screen.getHeight() / 2 - 120, 20, 20, "+") { + @Override + public void onClick(Player.Hand hand) { + double positionX = Static.round(Double.parseDouble(positionXField.getText()), 3); + positionX += getModifier(hand); + positionXField.setText(String.valueOf(positionX)); + } + }; + positionXSubtraction = new Button(screen, screen.getWidth() / 2 - 141, screen.getHeight() / 2 - 120, 20, 20, "-") { + @Override + public void onClick(Player.Hand hand) { + double positionX = Static.round(Double.parseDouble(positionXField.getText()), 3); + positionX -= getModifier(hand); + positionXField.setText(String.valueOf(positionX)); + } + }; + + positionZField = new TextField(screen, screen.getWidth() / 2 - 120, screen.getHeight() / 2 - 100, 40, 20); + positionZAddition = new Button(screen, screen.getWidth() / 2 - 79, screen.getHeight() / 2 - 100, 20, 20, "+") { + @Override + public void onClick(Player.Hand hand) { + double positionZ = Static.round(Double.parseDouble(positionZField.getText()), 3); + positionZ += getModifier(hand); + positionZField.setText(String.valueOf(positionZ)); + } + }; + positionZSubtraction = new Button(screen, screen.getWidth() / 2 - 141, screen.getHeight() / 2 - 100, 20, 20, "-") { + @Override + public void onClick(Player.Hand hand) { + double positionZ = Static.round(Double.parseDouble(positionZField.getText()), 3); + positionZ -= getModifier(hand); + positionZField.setText(String.valueOf(positionZ)); + } + }; + + heightYField = new TextField(screen, screen.getWidth() / 2 - 120, screen.getHeight() / 2 - 120, 40, 20); + heightYAddition = new Button(screen, screen.getWidth() / 2 - 79, screen.getHeight() / 2 - 120, 20, 20, "+") { + @Override + public void onClick(Player.Hand hand) { + double heightY = Static.round(Double.parseDouble(heightYField.getText()), 3); + heightY += getModifier(hand); + heightYField.setText(String.valueOf(heightY)); + } + }; + heightYSubtraction = new Button(screen, screen.getWidth() / 2 - 141, screen.getHeight() / 2 - 120, 20, 20, "-") { + @Override + public void onClick(Player.Hand hand) { + double heightY = Static.round(Double.parseDouble(heightYField.getText()), 3); + heightY -= getModifier(hand); + heightYField.setText(String.valueOf(heightY)); + } + }; + + scalingXField = new TextField(screen, screen.getWidth() / 2 - 120, screen.getHeight() / 2 - 120, 40, 20); + scalingXAddition = new Button(screen, screen.getWidth() / 2 - 79, screen.getHeight() / 2 - 120, 20, 20, "+") { + @Override + public void onClick(Player.Hand hand) { + double scalingX = Static.round(Double.parseDouble(scalingXField.getText()), 3); + scalingX += getModifier(hand); + scalingXField.setText(String.valueOf(scalingX)); + } + }; + scalingXSubtraction = new Button(screen, screen.getWidth() / 2 - 141, screen.getHeight() / 2 - 120, 20, 20, "-") { + @Override + public void onClick(Player.Hand hand) { + double scalingX = Static.round(Double.parseDouble(scalingXField.getText()), 3); + scalingX -= getModifier(hand); + scalingXField.setText(String.valueOf(scalingX)); + } + }; + scalingYField = new TextField(screen, screen.getWidth() / 2 - 120, screen.getHeight() / 2 - 100, 40, 20); + scalingYAddition = new Button(screen, screen.getWidth() / 2 - 79, screen.getHeight() / 2 - 100, 20, 20, "+") { + @Override + public void onClick(Player.Hand hand) { + double scalingY = Static.round(Double.parseDouble(scalingYField.getText()), 3); + scalingY += getModifier(hand); + scalingYField.setText(String.valueOf(scalingY)); + } + }; + scalingYSubtraction = new Button(screen, screen.getWidth() / 2 - 141, screen.getHeight() / 2 - 100, 20, 20, "-") { + @Override + public void onClick(Player.Hand hand) { + double scalingY = Static.round(Double.parseDouble(scalingYField.getText()), 3); + scalingY -= getModifier(hand); + scalingYField.setText(String.valueOf(scalingY)); + } + }; + scalingZField = new TextField(screen, screen.getWidth() / 2 - 120, screen.getHeight() / 2 - 80, 40, 20); + scalingZAddition = new Button(screen, screen.getWidth() / 2 - 79, screen.getHeight() / 2 - 80, 20, 20, "+") { + @Override + public void onClick(Player.Hand hand) { + double scalingZ = Static.round(Double.parseDouble(scalingZField.getText()), 3); + scalingZ += getModifier(hand); + scalingZField.setText(String.valueOf(scalingZ)); + } + }; + scalingZSubtraction = new Button(screen, screen.getWidth() / 2 - 141, screen.getHeight() / 2 - 80, 20, 20, "-") { + @Override + public void onClick(Player.Hand hand) { + double scalingZ = Static.round(Double.parseDouble(scalingZField.getText()), 3); + scalingZ -= getModifier(hand); + scalingZField.setText(String.valueOf(scalingZ)); + } + }; + + positionXField.setValidator(doubleFilter); + positionZField.setValidator(doubleFilter); + heightYField.setValidator(doubleFilter); + scalingXField.setValidator(doubleFilter); + scalingYField.setValidator(doubleFilter); + scalingZField.setValidator(doubleFilter); + + setAllInvisible(); + positionXField.setVisible(true); + positionXAddition.setVisible(true); + positionXSubtraction.setVisible(true); + positionZField.setVisible(true); + positionZAddition.setVisible(true); + positionZSubtraction.setVisible(true); + + positionXField.setText(String.valueOf(offset.x)); + positionZField.setText(String.valueOf(offset.z)); + heightYField.setText(String.valueOf(offset.y)); + scalingXField.setText(String.valueOf(scaling.x)); + scalingYField.setText(String.valueOf(scaling.y)); + scalingZField.setText(String.valueOf(scaling.z)); + + } + + @Override + public void onEnterKey(final IScreenBuilder builder) { + builder.close(); + } + + @SuppressWarnings("java:S125") + @Override + public void onClose() { + scaling = new Vec3d( + Double.parseDouble(scalingXField.getText()), + Double.parseDouble(scalingYField.getText()), + Double.parseDouble(scalingZField.getText()) + ); + send(); + //Server + ManipulatorToServerPacket serverPacket = new ManipulatorToServerPacket( + new Vec3d(Double.parseDouble(positionXField.getText()), Double.parseDouble(heightYField.getText()), Double.parseDouble(positionZField.getText())), + rotation, + scaling, + blockPos, + cascadeBox.isChecked() + ); + serverPacket.sendToServer(); + } + + @Override + public void draw(final IScreenBuilder builder) { + final String tempX = positionXField.getText(); + final String tempY = heightYField.getText(); + final String tempZ = positionZField.getText(); + final String tempScalingX = scalingXField.getText(); + final String tempScalingY = scalingYField.getText(); + final String tempScalingZ = scalingZField.getText(); + + if (!positionXField.getText().isEmpty() && !tempX.equals(textXBefore)) { + positionXField.setText(String.valueOf(Static.round(Double.parseDouble(tempX), 3))); + textXBefore = tempX; + send(); + } + + if (!heightYField.getText().isEmpty() && !tempY.equals(textYBefore)) { + heightYField.setText(String.valueOf(Static.round(Double.parseDouble(tempY), 3))); + textYBefore = tempY; + send(); + } + + if (!positionZField.getText().isEmpty() && !tempZ.equals(textZBefore)) { + positionZField.setText(String.valueOf(Static.round(Double.parseDouble(tempZ), 3))); + textZBefore = tempZ; + send(); + } + + if(!scalingXField.getText().isEmpty() && !tempScalingX.equals(scalingXBefore)){ + scalingXField.setText(String.valueOf(Static.round(Double.parseDouble(tempScalingX), 3))); + scalingXBefore = tempScalingX; + send(); + } + + if(!scalingYField.getText().isEmpty() && !tempScalingY.equals(scalingYBefore)){ + scalingYField.setText(String.valueOf(Static.round(Double.parseDouble(tempScalingY), 3))); + scalingYBefore = tempScalingY; + send(); + } + + if(!scalingZField.getText().isEmpty() && !tempScalingZ.equals(scalingZBefore)){ + scalingZField.setText(String.valueOf(Static.round(Double.parseDouble(tempScalingZ), 3))); + scalingZBefore = tempScalingZ; + send(); + } + + if(!rotationBox.isChecked()){ + GUIHelpers.drawCenteredString(GuiText.LABEL_LEFTCLICK.toString(), builder.getWidth() / 2 + 155, builder.getHeight() / 2 - 80, 0xFFFFFF); + GUIHelpers.drawCenteredString(GuiText.LABEL_RIGHTCLICK.toString(), builder.getWidth() / 2 + 155, builder.getHeight() / 2 - 70, 0xFFFFFF); + } + } + + private void send() { + //Client + scaling = new Vec3d( + Double.parseDouble(scalingXField.getText()), + Double.parseDouble(scalingYField.getText()), + Double.parseDouble(scalingZField.getText()) + ); + + final ManipulatorToClientPacket clientPacket = new ManipulatorToClientPacket( + new Vec3d( + Double.parseDouble(positionXField.getText()), + Double.parseDouble(heightYField.getText()), + Double.parseDouble(positionZField.getText())), + rotation, + blockPos, + scaling, + cascadeBox.isChecked() + ); + clientPacket.sendToAll(); + } + + private void setAllInvisible() { + positionXField.setVisible(false); + positionXAddition.setVisible(false); + positionXSubtraction.setVisible(false); + positionZField.setVisible(false); + positionZAddition.setVisible(false); + positionZSubtraction.setVisible(false); + heightYField.setVisible(false); + heightYAddition.setVisible(false); + heightYSubtraction.setVisible(false); + rotationSlider.setVisible(false); + rotationAddition.setVisible(false); + rotationSubtraction.setVisible(false); + scalingXField.setVisible(false); + scalingXAddition.setVisible(false); + scalingXSubtraction.setVisible(false); + scalingYField.setVisible(false); + scalingYAddition.setVisible(false); + scalingYSubtraction.setVisible(false); + scalingZField.setVisible(false); + scalingZAddition.setVisible(false); + scalingZSubtraction.setVisible(false); + } + + private void uncheckOtherBoxes(final CheckBox box) { + positionBox.setChecked(false); + heightBox.setChecked(false); + rotationBox.setChecked(false); + scalingBox.setChecked(false); + box.setChecked(true); + } + + private void renewSlider(IScreenBuilder screen){ + if(rotationSlider != null){ + rotationSlider.setVisible(false); + rotationSlider = null; + } + rotationSlider = new Slider(screen, screen.getWidth() / 2 - 200, 100, GuiText.LABEL_ROTATIONSLIDER + ": ", 0, 360, rotation, false) { + @Override + public void onSlider() { + rotation = rotationSlider.getValueInt(); + send(); + } + }; + } + private double getModifier(Player.Hand hand){ + return hand == Player.Hand.PRIMARY ? 1.0 : 0.1; + } + + private void resetAll(IScreenBuilder screen){ + + scalingXField.setText("1"); + scalingYField.setText("1"); + scalingZField.setText("1"); + + positionXField.setText("0"); + heightYField.setText("0"); + positionZField.setText("0"); + + screen.close(); + } + +} diff --git a/src/main/java/net/landofrails/landofsignals/gui/GuiText.java b/src/main/java/net/landofrails/landofsignals/gui/GuiText.java index c57c5712..d757bc94 100644 --- a/src/main/java/net/landofrails/landofsignals/gui/GuiText.java +++ b/src/main/java/net/landofrails/landofsignals/gui/GuiText.java @@ -21,9 +21,12 @@ public enum GuiText { LABEL_UNATTACH("manipulator.unattach"), LABEL_EDITINGAME("manipulator.editingame"), LABEL_EDITROTATION("manipulator.editrotation"), - LABEL_EDITHITBOX("manipulator.edithitbox"), LABEL_ROTATIONSLIDER("manipulator.rotationslider"), - LABEL_EDITPOSITION("manipulator.editposition"); + LABEL_EDITPOSITION("manipulator.editposition"), + LABEL_EDITSCALING("manipulator.editscaling"), + LABEL_CASCADE("manipulator.cascade"), + LABEL_LEFTCLICK("manipulator.leftclick"), + LABEL_RIGHTCLICK("manipulator.rightclick"); private final String value; diff --git a/src/main/java/net/landofrails/landofsignals/gui/overlay/ManipualtorOverlay.java b/src/main/java/net/landofrails/landofsignals/gui/overlay/ManipualtorOverlay.java index f8ebbc04..ea6c9439 100644 --- a/src/main/java/net/landofrails/landofsignals/gui/overlay/ManipualtorOverlay.java +++ b/src/main/java/net/landofrails/landofsignals/gui/overlay/ManipualtorOverlay.java @@ -1,65 +1,9 @@ package net.landofrails.landofsignals.gui.overlay; -import cam72cam.mod.MinecraftClient; -import cam72cam.mod.block.BlockEntity; -import cam72cam.mod.entity.Player; -import cam72cam.mod.gui.helpers.GUIHelpers; -import cam72cam.mod.item.ItemStack; -import cam72cam.mod.math.Vec3d; -import net.landofrails.landofsignals.LOSGuis; -import net.landofrails.landofsignals.LOSItems; -import net.landofrails.landofsignals.gui.GuiText; -import net.landofrails.landofsignals.items.ItemManipulator; -import net.landofrails.landofsignals.packet.ManipulatorToClientPacket; -import net.landofrails.landofsignals.utils.IManipulate; -import net.landofrails.landofsignals.utils.Static; - public class ManipualtorOverlay { - private final int screenWidth; - private final int screenHeight; - - public ManipualtorOverlay() { - screenWidth = GUIHelpers.getScreenWidth(); - screenHeight = GUIHelpers.getScreenHeight(); - } - - Vec3d offset; - public void draw() { - final ItemStack item = MinecraftClient.getPlayer().getHeldItem(Player.Hand.PRIMARY); - if (!item.is(LOSItems.ITEM_MANIPULATOR) || !ItemManipulator.editIngame) return; - final BlockEntity block = LOSItems.ITEM_MANIPULATOR.getBlock(); - if (block instanceof IManipulate) { - final Player player = MinecraftClient.getPlayer(); - if (player.isCrouching()) { - LOSGuis.MANIPULATOR.open(player, block.getPos()); - ItemManipulator.editIngame = false; - return; - } - if (!ItemManipulator.editHeight) { - final Vec3d fastMovement = player.getMovementInput(); - final Vec3d movement = new Vec3d(Static.round(fastMovement.x / 10, 3), 0, Static.round(fastMovement.z / 10, 3)); - handlePacket(block, player, movement); - GUIHelpers.drawCenteredString("X: " + Static.round(offset.x, 3), screenWidth - 50, screenHeight - 50, 0xffffff); - GUIHelpers.drawCenteredString("Z: " + Static.round(offset.z, 3), screenWidth - 50, screenHeight - 70, 0xffffff); - } else { - final Vec3d fastMovement = player.getVelocity(); - final Vec3d movement = new Vec3d(0, Static.round(fastMovement.x / 10, 3), 0); - handlePacket(block, player, movement); - GUIHelpers.drawCenteredString("Y: " + Static.round(offset.y, 3), screenWidth - 50, screenHeight - 50, 0xffffff); - } - } + // Removed - unclear if still needed or not } - private void handlePacket(final BlockEntity block, final Player player, final Vec3d movement) { - final ManipulatorToClientPacket packet = new ManipulatorToClientPacket(LOSItems.ITEM_MANIPULATOR.getPlayerMainPos(), movement, block.getPos(), ItemManipulator.sneak); - packet.sendToAll(); - player.setPosition(LOSItems.ITEM_MANIPULATOR.getPlayerMainPos()); - final IManipulate manipulate = (IManipulate) block; - manipulate.setOffset(manipulate.getOffset().add(movement)); - - GUIHelpers.drawCenteredString(GuiText.LABEL_UNATTACH.toString(), screenWidth - 100, screenHeight - 30, 0xffffff); - offset = manipulate.getOffset(); - } } diff --git a/src/main/java/net/landofrails/landofsignals/items/ItemMagnifyingGlass.java b/src/main/java/net/landofrails/landofsignals/items/ItemMagnifyingGlass.java new file mode 100644 index 00000000..01adedd3 --- /dev/null +++ b/src/main/java/net/landofrails/landofsignals/items/ItemMagnifyingGlass.java @@ -0,0 +1,82 @@ +package net.landofrails.landofsignals.items; + +import cam72cam.mod.entity.Player; +import cam72cam.mod.item.ClickResult; +import cam72cam.mod.item.CreativeTab; +import cam72cam.mod.item.CustomItem; +import cam72cam.mod.math.Vec3d; +import cam72cam.mod.math.Vec3i; +import cam72cam.mod.util.Facing; +import cam72cam.mod.world.World; +import net.landofrails.landofsignals.LOSBlocks; +import net.landofrails.landofsignals.LOSTabs; +import net.landofrails.landofsignals.tile.TileSignalBox; +import net.landofrails.landofsignals.utils.HighlightingUtil; + +import java.util.List; + +public class ItemMagnifyingGlass extends CustomItem { + + public ItemMagnifyingGlass(final String modID, final String name) { + super(modID, name); + } + + @Override + public List getCreativeTabs() { + return LOSTabs.getAsList(LOSTabs.ASSETS_TAB); + } + + @Override + @SuppressWarnings({"java:S2696", "java:S1134"}) + public ClickResult onClickBlock(final Player player, final World world, final Vec3i pos, final Player.Hand hand, final Facing facing, final Vec3d inBlockPos) { + HighlightingUtil.renderHighlighting(); + if (!world.isClient) { + return ClickResult.REJECTED; + } + if (hand.equals(Player.Hand.SECONDARY)) { + return ClickResult.PASS; + } + if (world.isBlock(pos, LOSBlocks.BLOCK_SIGNAL_PART) || world.isBlock(pos, LOSBlocks.BLOCK_COMPLEX_SIGNAL)) { + onClickSignal(world, pos); + return ClickResult.ACCEPTED; + } + if (!world.isBlock(pos, LOSBlocks.BLOCK_SIGNAL_BOX)) { + return ClickResult.PASS; + } + + disableHighlighting(world); + + TileSignalBox signalBox = world.getBlockEntity(pos, TileSignalBox.class); + toggleHighlighting(signalBox); + + return ClickResult.ACCEPTED; + } + + private void onClickSignal(World world, Vec3i pos) { + + disableHighlighting(world); + + final List signalBoxes = world.getBlockEntities(TileSignalBox.class); + signalBoxes.stream() + .filter(box -> box.getTileSignalPartPos() != null) + .filter(box -> box.getTileSignalPartPos().equals(pos)) + .forEach(this::toggleHighlighting); + + } + + @Override + public void onClickAir(final Player player, final World world, final Player.Hand hand) { + if (!world.isClient || hand.equals(Player.Hand.SECONDARY)) return; + disableHighlighting(world); + } + + private void disableHighlighting(final World world) { + final List signalBoxes = world.getBlockEntities(TileSignalBox.class); + signalBoxes.stream().filter(TileSignalBox::isHighlighting).forEach(TileSignalBox::toggleHighlighting); + } + + private void toggleHighlighting(final TileSignalBox signalBox) { + signalBox.toggleHighlighting(); + } + +} diff --git a/src/main/java/net/landofrails/landofsignals/items/ItemManipulator.java b/src/main/java/net/landofrails/landofsignals/items/ItemManipulator.java index a1a38f92..859355dd 100644 --- a/src/main/java/net/landofrails/landofsignals/items/ItemManipulator.java +++ b/src/main/java/net/landofrails/landofsignals/items/ItemManipulator.java @@ -1,6 +1,5 @@ package net.landofrails.landofsignals.items; -import cam72cam.mod.MinecraftClient; import cam72cam.mod.block.BlockEntity; import cam72cam.mod.entity.Player; import cam72cam.mod.item.ClickResult; @@ -8,12 +7,10 @@ import cam72cam.mod.item.CustomItem; import cam72cam.mod.math.Vec3d; import cam72cam.mod.math.Vec3i; -import cam72cam.mod.text.PlayerMessage; import cam72cam.mod.util.Facing; import cam72cam.mod.world.World; -import net.landofrails.landofsignals.LOSGuis; import net.landofrails.landofsignals.LOSTabs; -import net.landofrails.landofsignals.LandOfSignals; +import net.landofrails.landofsignals.packet.GuiItemManipulatorToClient; import net.landofrails.landofsignals.utils.IManipulate; import java.util.List; @@ -21,64 +18,25 @@ @SuppressWarnings("java:S1117") public class ItemManipulator extends CustomItem { - private static final boolean DISABLED = true; - - private BlockEntity block; - private Vec3d playerMainPos; - @SuppressWarnings({"java:S1444", "java:S1104"}) - public static boolean editIngame; - @SuppressWarnings({"java:S1444", "java:S1104"}) - public static boolean editHeight; - @SuppressWarnings({"java:S1444", "java:S1104"}) - public static boolean sneak; - public ItemManipulator(final String modID, final String name) { super(modID, name); } @Override public List getCreativeTabs() { - return LOSTabs.getAsList(LOSTabs.SIGNALS_TAB); + return LOSTabs.getAsList(LOSTabs.ASSETS_TAB); } @Override @SuppressWarnings({"java:S2696", "java:S1134"}) public ClickResult onClickBlock(final Player player, final World world, final Vec3i pos, final Player.Hand hand, final Facing facing, final Vec3d inBlockPos) { - sneak = player.isCrouching(); BlockEntity block = world.getBlockEntity(pos, BlockEntity.class); - // CHECK: Implementation for signals and signs - // AFTERWARDS: Enable tool after check - if (DISABLED) { - if (world.isClient) - player.sendMessage(PlayerMessage.translate("message." + LandOfSignals.MODID + ":item.manipulator.disabled")); - block = null; - } - if (block instanceof IManipulate) { - this.block = block; - playerMainPos = MinecraftClient.getPlayer().getPosition(); - if (world.isClient) { - LOSGuis.MANIPULATOR.open(player, block.getPos()); - return ClickResult.ACCEPTED; - } + if (block instanceof IManipulate && world.isServer) { + new GuiItemManipulatorToClient(block).sendToPlayer(player); + return ClickResult.ACCEPTED; } return ClickResult.REJECTED; } - public BlockEntity getBlock() { - return block; - } - - public Vec3d getPlayerMainPos() { - return playerMainPos; - } - - public void setPlayerMainPos(final Vec3d playerMainPos) { - this.playerMainPos = playerMainPos; - } - - public void clearBlock() { - block = null; - playerMainPos = null; - } } diff --git a/src/main/java/net/landofrails/landofsignals/packet/GuiItemManipulatorToClient.java b/src/main/java/net/landofrails/landofsignals/packet/GuiItemManipulatorToClient.java new file mode 100644 index 00000000..34564378 --- /dev/null +++ b/src/main/java/net/landofrails/landofsignals/packet/GuiItemManipulatorToClient.java @@ -0,0 +1,25 @@ +package net.landofrails.landofsignals.packet; + +import cam72cam.mod.block.BlockEntity; +import cam72cam.mod.net.Packet; +import cam72cam.mod.serialization.TagField; +import net.landofrails.landofsignals.LOSGuis; + +public class GuiItemManipulatorToClient extends Packet { + + @TagField + private BlockEntity block; + + public GuiItemManipulatorToClient(){ + } + + public GuiItemManipulatorToClient(BlockEntity block){ + this.block = block; + } + + @Override + protected void handle() { + LOSGuis.MANIPULATOR.open(getPlayer(), block.getPos()); + } + +} diff --git a/src/main/java/net/landofrails/landofsignals/packet/ManipulatorToClientPacket.java b/src/main/java/net/landofrails/landofsignals/packet/ManipulatorToClientPacket.java index a151941b..c607da59 100644 --- a/src/main/java/net/landofrails/landofsignals/packet/ManipulatorToClientPacket.java +++ b/src/main/java/net/landofrails/landofsignals/packet/ManipulatorToClientPacket.java @@ -13,42 +13,32 @@ public class ManipulatorToClientPacket extends Packet { @TagField("movement") private Vec3d movement; - @TagField("mainPos") - private Vec3d mainPos; @TagField("blockPos") private Vec3i blockPos; - @TagField("gui") - private boolean gui; @TagField("rotation") private int rotation; - @TagField("sneak") - private boolean sneak; + @TagField("scaling") + private Vec3d scaling; + @TagField("cascade") + private Boolean cascade; public ManipulatorToClientPacket() { } - public ManipulatorToClientPacket(final Vec3d mainPos, final Vec3d movement, final Vec3i blockPos, final boolean sneak) { - this.mainPos = mainPos; - this.movement = movement; - this.blockPos = blockPos; - gui = false; - this.sneak = sneak; - } - - public ManipulatorToClientPacket(final Vec3d offset, final int rotation, final Vec3i blockPos, final boolean sneak) { + public ManipulatorToClientPacket(final Vec3d offset, final int rotation, final Vec3i blockPos, final Vec3d scaling, final boolean cascade) { movement = offset; this.blockPos = blockPos; this.rotation = rotation; - gui = true; - this.sneak = sneak; + this.scaling = scaling; + this.cascade = cascade; } @Override protected void handle() { final ArrayList blockPosList = new ArrayList<>(); - if (!sneak) { + if (Boolean.TRUE.equals(cascade)) { //UP int i = 0; while (getWorld().getBlockEntity(blockPos.up(i), BlockEntity.class) instanceof IManipulate) { @@ -61,26 +51,19 @@ protected void handle() { blockPosList.add(blockPos.down(j)); j++; } - } else blockPosList.add(blockPos); - - if (!gui) { - getPlayer().setPosition(mainPos); - for (final Vec3i bp : blockPosList) { - final BlockEntity block = getWorld().getBlockEntity(bp, BlockEntity.class); - if (block instanceof IManipulate) { - final IManipulate manipulate = (IManipulate) block; - manipulate.setOffset(manipulate.getOffset().add(movement)); - } - } } else { - for (final Vec3i bp : blockPosList) { - final BlockEntity block = getWorld().getBlockEntity(bp, BlockEntity.class); - if (block instanceof IManipulate) { - final IManipulate manipulate = (IManipulate) block; - manipulate.setOffset(movement); - manipulate.setRotation(rotation); - } + blockPosList.add(blockPos); + } + + for (final Vec3i bp : blockPosList) { + final BlockEntity block = getWorld().getBlockEntity(bp, BlockEntity.class); + if (block instanceof IManipulate) { + final IManipulate manipulate = (IManipulate) block; + manipulate.setOffset(movement); + manipulate.setRotation(rotation); + manipulate.setScaling(scaling); } } + } } diff --git a/src/main/java/net/landofrails/landofsignals/packet/ManipulatorToServerPacket.java b/src/main/java/net/landofrails/landofsignals/packet/ManipulatorToServerPacket.java index 8c5646de..c69dd82f 100644 --- a/src/main/java/net/landofrails/landofsignals/packet/ManipulatorToServerPacket.java +++ b/src/main/java/net/landofrails/landofsignals/packet/ManipulatorToServerPacket.java @@ -7,6 +7,8 @@ import cam72cam.mod.serialization.TagField; import net.landofrails.landofsignals.utils.IManipulate; +import java.util.ArrayList; + public class ManipulatorToServerPacket extends Packet { @TagField("offset") @@ -15,24 +17,51 @@ public class ManipulatorToServerPacket extends Packet { private Vec3i blockPos; @TagField("rotation") private int rotation; + @TagField("scaling") + private Vec3d scaling; + @TagField("cascade") + private Boolean cascade; public ManipulatorToServerPacket() { } - public ManipulatorToServerPacket(final Vec3d offset, final int rotation, final Vec3i blockPos) { + public ManipulatorToServerPacket(final Vec3d offset, final int rotation, final Vec3d scaling, final Vec3i blockPos, boolean cascade) { this.offset = offset; this.rotation = rotation; + this.scaling = scaling; this.blockPos = blockPos; + this.cascade = cascade; } @Override protected void handle() { - final BlockEntity block = getWorld().getBlockEntity(blockPos, BlockEntity.class); - if (block instanceof IManipulate) { - final IManipulate manipulate = (IManipulate) block; - manipulate.setOffset(manipulate.getOffset().add(offset)); - manipulate.setRotation(rotation); + final ArrayList blockPosList = new ArrayList<>(); + if (Boolean.TRUE.equals(cascade)) { + //UP + int i = 0; + while (getWorld().getBlockEntity(blockPos.up(i), BlockEntity.class) instanceof IManipulate) { + blockPosList.add(blockPos.up(i)); + i++; + } + //DOWN + int j = 0; + while (getWorld().getBlockEntity(blockPos.down(j), BlockEntity.class) instanceof IManipulate) { + blockPosList.add(blockPos.down(j)); + j++; + } + } else { + blockPosList.add(blockPos); + } + + for (final Vec3i bp : blockPosList) { + final BlockEntity block = getWorld().getBlockEntity(bp, BlockEntity.class); + if (block instanceof IManipulate) { + final IManipulate manipulate = (IManipulate) block; + manipulate.setOffset(offset); + manipulate.setRotation(rotation); + manipulate.setScaling(scaling); + } } } } diff --git a/src/main/java/net/landofrails/landofsignals/render/block/TileComplexSignalRender.java b/src/main/java/net/landofrails/landofsignals/render/block/TileComplexSignalRender.java index fd8e893f..e05e2a8c 100644 --- a/src/main/java/net/landofrails/landofsignals/render/block/TileComplexSignalRender.java +++ b/src/main/java/net/landofrails/landofsignals/render/block/TileComplexSignalRender.java @@ -14,6 +14,7 @@ import net.landofrails.landofsignals.LOSBlocks; import net.landofrails.landofsignals.LandOfSignals; import net.landofrails.landofsignals.tile.TileComplexSignal; +import net.landofrails.landofsignals.utils.HighlightingUtil; import net.landofrails.landofsignals.utils.Static; import org.lwjgl.opengl.GL11; @@ -30,7 +31,7 @@ private TileComplexSignalRender() { private static final Map cache = new HashMap<>(); private static final Map> groupCache = new HashMap<>(); - private static void checkCache(String blockId, Collection groups, String identifier) { + public static void checkCache(String blockId, Collection groups, String identifier) { // Get first group, get first state, get first model Optional firstPath = groups.iterator().next().getStates().values().iterator().next().getModels().keySet().stream().findFirst(); @@ -50,7 +51,7 @@ private static void checkCache(String blockId, Collection models, String identifier, boolean checkIfAlreadyExisting) { + public static void checkCache(String blockId, Map models, String identifier, boolean checkIfAlreadyExisting) { if (checkIfAlreadyExisting) { Optional firstPath = models.keySet().stream().findFirst(); if (!firstPath.isPresent()) @@ -74,7 +75,7 @@ private static void checkCache(String blockId, Map m for (ContentPackModel signalModel : modelEntry.getValue()) { String[] groups = signalModel.getObj_groups(); if (groups.length > 0) { - Predicate targetGroup = renderOBJGroup -> Arrays.stream(groups).anyMatch(renderOBJGroup::startsWith); + Predicate targetGroup = renderOBJGroup -> Arrays.stream(groups).filter(Objects::nonNull).anyMatch(renderOBJGroup::startsWith); List modes = renderer.model.groups().stream().filter(targetGroup) .collect(Collectors.toCollection(ArrayList::new)); String groupCacheId = objId + "@" + String.join("+", groups); @@ -104,12 +105,17 @@ private static void renderStuff(final TileComplexSignal tsp) { renderBase(id, tsp); renderSignals(id, tsp); + if(tsp.isHighlighting()){ + HighlightingUtil.renderHighlighting(); + } + } @SuppressWarnings("java:S1134") private static void renderBase(String blockId, TileComplexSignal tile) { final Vec3d offset = tile.getOffset(); + final Vec3d customScaling = tile.getScaling(); checkCache(blockId, LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(blockId).getBase(), "/base/", true); @@ -124,7 +130,7 @@ private static void renderBase(String blockId, TileComplexSignal tile) { for (ContentPackModel baseModel : baseModels.getValue()) { final ContentPackBlock block = baseModel.getBlock(); final Vec3d translate = block.getAsVec3d(block::getTranslation).add(offset); - final Vec3d scale = block.getAsVec3d(block::getScaling); + final Vec3d scale = Static.multiply(block.getAsVec3d(block::getScaling), customScaling); final Vec3d rotation = block.getAsVec3d(block::getRotation); try (OpenGL.With ignored1 = OpenGL.matrix(); OpenGL.With ignored2 = renderer.bindTexture(baseModel.getTextures())) { @@ -157,6 +163,7 @@ private static void renderBase(String blockId, TileComplexSignal tile) { private static void renderSignals(final String blockId, final TileComplexSignal tile) { final Vec3d offset = tile.getOffset(); + final Vec3d customScaling = tile.getScaling(); final Map signalGroups = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(blockId).getSignals(); @@ -183,7 +190,7 @@ private static void renderSignals(final String blockId, final TileComplexSignal for (ContentPackModel signalModel : signalModels.getValue()) { ContentPackBlock block = signalModel.getBlock(); final Vec3d translate = block.getAsVec3d(block::getTranslation).add(offset); - final Vec3d scale = block.getAsVec3d(block::getScaling); + final Vec3d scale = Static.multiply(block.getAsVec3d(block::getScaling), customScaling); final Vec3d rotation = block.getAsVec3d(block::getRotation); try (OpenGL.With ignored1 = OpenGL.matrix(); OpenGL.With ignored2 = renderer.bindTexture(signalModel.getTextures())) { diff --git a/src/main/java/net/landofrails/landofsignals/render/block/TileDecoRender.java b/src/main/java/net/landofrails/landofsignals/render/block/TileDecoRender.java index d0d0caba..9b5962a6 100644 --- a/src/main/java/net/landofrails/landofsignals/render/block/TileDecoRender.java +++ b/src/main/java/net/landofrails/landofsignals/render/block/TileDecoRender.java @@ -29,7 +29,7 @@ private TileDecoRender() { private static final Map cache = new HashMap<>(); private static final Map> groupCache = new HashMap<>(); - private static void checkCache(String blockId, Map models) { + public static void checkCache(String blockId, Map models) { Optional firstPath = models.keySet().stream().findFirst(); if (!firstPath.isPresent()) return; @@ -82,6 +82,8 @@ private static void renderStuff(TileDeco tsp) { } private static void renderBase(String blockId, TileDeco tile) { + Vec3d offset = tile.getOffset(); + Vec3d customScaling = tile.getScaling(); ContentPackDeco contentPackDeco = LOSBlocks.BLOCK_DECO.getContentpackDeco().get(blockId); @@ -98,8 +100,8 @@ private static void renderBase(String blockId, TileDeco tile) { for (ContentPackModel baseModel : baseModels.getValue()) { ContentPackBlock block = baseModel.getBlock(); - Vec3d translate = block.getAsVec3d(block::getTranslation); - Vec3d scale = block.getAsVec3d(block::getScaling); + Vec3d translate = block.getAsVec3d(block::getTranslation).add(offset); + final Vec3d scale = Static.multiply(block.getAsVec3d(block::getScaling), customScaling); Vec3d rotation = block.getAsVec3d(block::getRotation); try (OpenGL.With ignored1 = OpenGL.matrix(); OpenGL.With ignored2 = renderer.bindTexture(baseModel.getTextures())) { diff --git a/src/main/java/net/landofrails/landofsignals/render/block/TileSignPartRender.java b/src/main/java/net/landofrails/landofsignals/render/block/TileSignPartRender.java index be59d5ca..603d9577 100644 --- a/src/main/java/net/landofrails/landofsignals/render/block/TileSignPartRender.java +++ b/src/main/java/net/landofrails/landofsignals/render/block/TileSignPartRender.java @@ -29,7 +29,7 @@ private TileSignPartRender() { private static final Map cache = new HashMap<>(); private static final Map> groupCache = new HashMap<>(); - private static void checkCache(String blockId, Map models) { + public static void checkCache(String blockId, Map models) { Optional firstPath = models.keySet().stream().findFirst(); if (!firstPath.isPresent()) return; @@ -83,6 +83,8 @@ private static void renderStuff(TileSignPart tsp) { private static void renderBase(String blockId, TileSignPart tile) { + Vec3d offset = tile.getOffset(); + Vec3d customScaling = tile.getScaling(); ContentPackSign contentPackSign = LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().get(blockId); if(contentPackSign == null) contentPackSign = LOSBlocks.BLOCK_SIGN_PART.getContentpackSigns().get(Static.MISSING); @@ -97,8 +99,8 @@ private static void renderBase(String blockId, TileSignPart tile) { for (ContentPackModel baseModel : baseModels.getValue()) { ContentPackBlock block = baseModel.getBlock(); - Vec3d translate = block.getAsVec3d(block::getTranslation); - Vec3d scale = block.getAsVec3d(block::getScaling); + Vec3d translate = block.getAsVec3d(block::getTranslation).add(offset); + Vec3d scale = Static.multiply(block.getAsVec3d(block::getScaling), customScaling); Vec3d rotation = block.getAsVec3d(block::getRotation); try (OpenGL.With ignored1 = OpenGL.matrix(); OpenGL.With ignored2 = renderer.bindTexture(baseModel.getTextures())) { diff --git a/src/main/java/net/landofrails/landofsignals/render/block/TileSignalBoxRender.java b/src/main/java/net/landofrails/landofsignals/render/block/TileSignalBoxRender.java index 07e32278..2db2d9b0 100644 --- a/src/main/java/net/landofrails/landofsignals/render/block/TileSignalBoxRender.java +++ b/src/main/java/net/landofrails/landofsignals/render/block/TileSignalBoxRender.java @@ -13,6 +13,7 @@ import net.landofrails.landofsignals.LOSBlocks; import net.landofrails.landofsignals.LandOfSignals; import net.landofrails.landofsignals.tile.TileSignalBox; +import net.landofrails.landofsignals.utils.HighlightingUtil; import net.landofrails.landofsignals.utils.Static; import org.lwjgl.opengl.GL11; @@ -29,7 +30,7 @@ private TileSignalBoxRender() { private static final Map cache = new HashMap<>(); private static final Map> groupCache = new HashMap<>(); - private static void checkCache(String blockId, Map models) { + public static void checkCache(String blockId, Map models) { Optional firstPath = models.keySet().stream().findFirst(); if (!firstPath.isPresent()) return; @@ -79,10 +80,15 @@ private static void renderStuff(final TileSignalBox tsp) { renderBase(id, tsp); + if(tsp.isHighlighting()){ + HighlightingUtil.renderHighlighting(); + } } private static void renderBase(final String blockId, final TileSignalBox tile) { + final Vec3d offset = tile.getOffset(); + final Vec3d customScaling = tile.getScaling(); ContentPackSignalbox contentPackSignalboxes = LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().get(blockId); if(contentPackSignalboxes == null) contentPackSignalboxes = LOSBlocks.BLOCK_SIGNAL_BOX.getContentpackSignalboxes().get(Static.MISSING); @@ -97,8 +103,8 @@ private static void renderBase(final String blockId, final TileSignalBox tile) { for (ContentPackModel baseModel : baseModels.getValue()) { final ContentPackBlock block = baseModel.getBlock(); - final Vec3d translate = block.getAsVec3d(block::getTranslation); - final Vec3d scale = block.getAsVec3d(block::getScaling); + final Vec3d translate = block.getAsVec3d(block::getTranslation).add(offset); + final Vec3d scale = Static.multiply(block.getAsVec3d(block::getScaling), customScaling); final Vec3d rotation = block.getAsVec3d(block::getRotation); try (OpenGL.With ignored1 = OpenGL.matrix(); OpenGL.With ignored2 = renderer.bindTexture(baseModel.getTextures())) { diff --git a/src/main/java/net/landofrails/landofsignals/render/block/TileSignalPartRender.java b/src/main/java/net/landofrails/landofsignals/render/block/TileSignalPartRender.java index ec8efbf6..c15385de 100644 --- a/src/main/java/net/landofrails/landofsignals/render/block/TileSignalPartRender.java +++ b/src/main/java/net/landofrails/landofsignals/render/block/TileSignalPartRender.java @@ -12,6 +12,7 @@ import net.landofrails.landofsignals.LandOfSignals; import net.landofrails.landofsignals.render.item.ItemRenderException; import net.landofrails.landofsignals.tile.TileSignalPart; +import net.landofrails.landofsignals.utils.HighlightingUtil; import net.landofrails.landofsignals.utils.Static; import org.lwjgl.opengl.GL11; @@ -26,7 +27,6 @@ private TileSignalPartRender() { } private static final Map cache = new HashMap<>(); - protected static final Map cacheInfoOldContentPack = new HashMap<>(); public static StandardModel render(final TileSignalPart tsp) { return new StandardModel().addCustom(() -> renderStuff(tsp)); @@ -52,12 +52,17 @@ private static void renderStuff(final TileSignalPart tsp) { } renderSignals(id, signal, tsp); + if(tsp.isHighlighting()){ + HighlightingUtil.renderHighlighting(); + } + } @SuppressWarnings("java:S1134") private static void renderBase(String blockId, ContentPackSignal signal, TileSignalPart tile) { final Vec3d offset = tile.getOffset(); + final Vec3d customScaling = tile.getScaling(); final String base = signal.getBase(); final String objPath = signal.getModel(); @@ -65,7 +70,6 @@ private static void renderBase(String blockId, ContentPackSignal signal, TileSig try { String[] states = LOSBlocks.BLOCK_SIGNAL_PART.getAllStates(blockId); cache.put(objPath, new OBJRender(new OBJModel(new Identifier(LandOfSignals.MODID, objPath), 0, Arrays.asList(states)))); - cacheInfoOldContentPack.putIfAbsent(blockId, LOSBlocks.BLOCK_SIGNAL_PART.isOldContentPack(blockId)); } catch (Exception e) { throw new ItemRenderException("Error loading item model/renderer...", e); } @@ -74,7 +78,10 @@ private static void renderBase(String blockId, ContentPackSignal signal, TileSig final float[] originalTranslate = signal.getTranslation(); final Vec3d translate = new Vec3d(originalTranslate[0], originalTranslate[1], originalTranslate[2]).add(offset); - final float[] scale = signal.getScaling(); + final float[] scale = signal.getScaling().clone(); + scale[0] *= customScaling.x; + scale[1] *= customScaling.y; + scale[2] *= customScaling.z; try (OpenGL.With ignored1 = OpenGL.matrix(); OpenGL.With ignored2 = renderer.bindTexture(base)) { @@ -98,6 +105,7 @@ private static void renderBase(String blockId, ContentPackSignal signal, TileSig private static void renderSignals(String blockId, ContentPackSignal signal, TileSignalPart tile) { final Vec3d offset = tile.getOffset(); + final Vec3d customScaling = tile.getScaling(); final String signalState = tile.getState(); final String objPath = signal.getModel(); @@ -105,7 +113,6 @@ private static void renderSignals(String blockId, ContentPackSignal signal, Tile try { String[] states = LOSBlocks.BLOCK_SIGNAL_PART.getAllStates(blockId); cache.put(objPath, new OBJRender(new OBJModel(new Identifier(LandOfSignals.MODID, objPath), 0, Arrays.asList(states)))); - cacheInfoOldContentPack.putIfAbsent(blockId, LOSBlocks.BLOCK_SIGNAL_PART.isOldContentPack(blockId)); } catch (Exception e) { throw new ItemRenderException("Error loading item model/renderer...", e); } @@ -114,7 +121,10 @@ private static void renderSignals(String blockId, ContentPackSignal signal, Tile final float[] originalTranslate = signal.getTranslation(); final Vec3d translate = new Vec3d(originalTranslate[0], originalTranslate[1], originalTranslate[2]).add(offset); - final float[] scale = signal.getScaling(); + final float[] scale = signal.getScaling().clone(); + scale[0] *= customScaling.x; + scale[1] *= customScaling.y; + scale[2] *= customScaling.z; try (OpenGL.With ignored1 = OpenGL.matrix(); OpenGL.With ignored2 = renderer.bindTexture(signalState)) { @@ -132,4 +142,8 @@ private static void renderSignals(String blockId, ContentPackSignal signal, Tile } } + public static Map cache(){ + return cache; + } + } \ No newline at end of file diff --git a/src/main/java/net/landofrails/landofsignals/render/item/ItemComplexSignalRender.java b/src/main/java/net/landofrails/landofsignals/render/item/ItemComplexSignalRender.java index 608516e4..914173a7 100644 --- a/src/main/java/net/landofrails/landofsignals/render/item/ItemComplexSignalRender.java +++ b/src/main/java/net/landofrails/landofsignals/render/item/ItemComplexSignalRender.java @@ -30,27 +30,29 @@ public class ItemComplexSignalRender implements ItemRender.IItemModel { protected static final Map cache = new HashMap<>(); protected static final Map> groupCache = new HashMap<>(); - private static void checkCache(String itemId, Collection groups, String identifier) { + private static final String SIGNAL_IDENTIFIER = "/signals/"; + + public static void checkCache(String itemId, Collection groups) { // Get first group, get first state, get first model Optional firstPath = groups.iterator().next().getStates().values().iterator().next().getModels().keySet().stream().findFirst(); if (!firstPath.isPresent()) return; - final String firstObjId = itemId + identifier + firstPath.get(); + final String firstObjId = itemId + SIGNAL_IDENTIFIER + firstPath.get(); if (cache.containsKey(firstObjId)) { return; } for (ContentPackSignalGroup group : groups) { for (ContentPackSignalState state : group.getStates().values()) { - checkCache(itemId, state.getModels(), identifier, false); + checkCache(itemId, state.getModels(), SIGNAL_IDENTIFIER, false); } } } - private static void checkCache(String itemId, Map models, String identifier, boolean checkIfAlreadyExisting) { + public static void checkCache(String itemId, Map models, String identifier, boolean checkIfAlreadyExisting) { if (checkIfAlreadyExisting) { Optional firstPath = models.keySet().stream().findFirst(); if (!firstPath.isPresent()) @@ -74,7 +76,7 @@ private static void checkCache(String itemId, Map mo for (ContentPackModel signalModel : modelEntry.getValue()) { String[] groups = signalModel.getObj_groups(); if (groups.length > 0) { - Predicate targetGroup = renderOBJGroup -> Arrays.stream(groups).anyMatch(renderOBJGroup::startsWith); + Predicate targetGroup = renderOBJGroup -> Arrays.stream(groups).filter(Objects::nonNull).anyMatch(renderOBJGroup::startsWith); List modes = renderer.model.groups().stream().filter(targetGroup) .collect(Collectors.toCollection(ArrayList::new)); String groupCacheId = objId + "@" + String.join("+", groups); @@ -130,13 +132,6 @@ private static void renderBase(String itemId) { final String path = baseModels.getKey(); final String objId = itemId + "/base/" + path; - if (!cache.containsKey(objId)) { - try { - cache.put(objId, new OBJRender(new OBJModel(new Identifier(LandOfSignals.MODID, path), 0))); - } catch (Exception e) { - throw new ItemRenderException("Error loading item model/renderer...", e); - } - } final OBJRender renderer = cache.get(objId); for (ContentPackModel baseModel : baseModels.getValue()) { @@ -173,7 +168,7 @@ private static void renderBase(String itemId) { private static void renderSignals(String itemId, Map itemGroupStates) { final Map signalGroups = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(itemId).getSignals(); - checkCache(itemId, signalGroups.values(), "/signals/"); + checkCache(itemId, signalGroups.values()); for (Map.Entry signalGroup : signalGroups.entrySet()) { @@ -183,15 +178,7 @@ private static void renderSignals(String itemId, Map itemGroupSt final String path = signalModels.getKey(); - final String objId = itemId + "/signals/" + path; - if (!cache.containsKey(objId)) { - try { - final Set objTextures = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getContentpackComplexSignals().get(itemId).getObjTextures().get(path); - cache.put(objId, new OBJRender(new OBJModel(new Identifier(LandOfSignals.MODID, path), 0, objTextures))); - } catch (final Exception e) { - throw new ItemRenderException("Error loading item model/renderer...", e); - } - } + final String objId = itemId + SIGNAL_IDENTIFIER + path; final OBJRender renderer = cache.get(objId); for (ContentPackModel signalModel : signalModels.getValue()) { diff --git a/src/main/java/net/landofrails/landofsignals/render/item/ItemDecoRender.java b/src/main/java/net/landofrails/landofsignals/render/item/ItemDecoRender.java index d350a868..2bdedc15 100644 --- a/src/main/java/net/landofrails/landofsignals/render/item/ItemDecoRender.java +++ b/src/main/java/net/landofrails/landofsignals/render/item/ItemDecoRender.java @@ -27,7 +27,7 @@ public class ItemDecoRender implements ItemRender.IItemModel { protected static final Map cache = new HashMap<>(); private static final Map> groupCache = new HashMap<>(); - private static void checkCache(String itemId, Map models) { + public static void checkCache(String itemId, Map models) { Optional firstPath = models.keySet().stream().findFirst(); if (!firstPath.isPresent()) return; diff --git a/src/main/java/net/landofrails/landofsignals/render/item/ItemSignPartRender.java b/src/main/java/net/landofrails/landofsignals/render/item/ItemSignPartRender.java index 48e21eb8..52618a10 100644 --- a/src/main/java/net/landofrails/landofsignals/render/item/ItemSignPartRender.java +++ b/src/main/java/net/landofrails/landofsignals/render/item/ItemSignPartRender.java @@ -27,7 +27,7 @@ public class ItemSignPartRender implements ItemRender.IItemModel { protected static final Map cache = new HashMap<>(); private static final Map> groupCache = new HashMap<>(); - private static void checkCache(String itemId, Map models) { + public static void checkCache(String itemId, Map models) { Optional firstPath = models.keySet().stream().findFirst(); if (!firstPath.isPresent()) return; diff --git a/src/main/java/net/landofrails/landofsignals/render/item/ItemSignalBoxRender.java b/src/main/java/net/landofrails/landofsignals/render/item/ItemSignalBoxRender.java index 0faa42b1..44e15ead 100644 --- a/src/main/java/net/landofrails/landofsignals/render/item/ItemSignalBoxRender.java +++ b/src/main/java/net/landofrails/landofsignals/render/item/ItemSignalBoxRender.java @@ -27,7 +27,7 @@ public class ItemSignalBoxRender implements ItemRender.IItemModel { protected static final Map cache = new HashMap<>(); private static final Map> groupCache = new HashMap<>(); - private static void checkCache(String itemId, Map models) { + public static void checkCache(String itemId, Map models) { Optional firstPath = models.keySet().stream().findFirst(); if (!firstPath.isPresent()) return; diff --git a/src/main/java/net/landofrails/landofsignals/render/item/ItemSignalPartRender.java b/src/main/java/net/landofrails/landofsignals/render/item/ItemSignalPartRender.java index a0eec55d..02573f14 100644 --- a/src/main/java/net/landofrails/landofsignals/render/item/ItemSignalPartRender.java +++ b/src/main/java/net/landofrails/landofsignals/render/item/ItemSignalPartRender.java @@ -21,8 +21,7 @@ @SuppressWarnings("java:S3252") public class ItemSignalPartRender implements ItemRender.IItemModel { - protected static final Map cache = new HashMap<>(); - protected static final Map cacheInfoOldContentPack = new HashMap<>(); + private static final Map cache = new HashMap<>(); @Override public StandardModel getModel(World world, ItemStack stack) { @@ -61,7 +60,6 @@ private static void renderBase(ContentPackSignal signal, String itemId) { try { String[] states = LOSBlocks.BLOCK_SIGNAL_PART.getAllStates(itemId); cache.put(objPath, new OBJRender(new OBJModel(new Identifier(LandOfSignals.MODID, objPath), 0, Arrays.asList(states)))); - cacheInfoOldContentPack.putIfAbsent(itemId, LOSBlocks.BLOCK_SIGNAL_PART.isOldContentPack(itemId)); } catch (Exception e) { throw new ItemRenderException("Error loading item model/renderer...", e); } @@ -74,13 +72,8 @@ private static void renderBase(ContentPackSignal signal, String itemId) { try (OpenGL.With ignored1 = OpenGL.matrix(); OpenGL.With ignored2 = renderer.bindTexture(baseState)) { // Render - if (Boolean.FALSE.equals(cacheInfoOldContentPack.get(itemId))) { - GL11.glScaled(scale[0], scale[1], scale[2]); - GL11.glTranslated(translate[0], translate[1], translate[2]); - } else { - GL11.glTranslated(translate[0], translate[1], translate[2]); - GL11.glScaled(scale[0], scale[1], scale[2]); - } + GL11.glTranslated(translate[0], translate[1], translate[2]); + GL11.glScaled(scale[0], scale[1], scale[2]); renderer.draw(); } @@ -94,7 +87,6 @@ private static void renderSignals(ContentPackSignal signal, String itemId, Strin try { String[] states = LOSBlocks.BLOCK_SIGNAL_PART.getAllStates(itemId); cache.put(objPath, new OBJRender(new OBJModel(new Identifier(LandOfSignals.MODID, objPath), 0, Arrays.asList(states)))); - cacheInfoOldContentPack.putIfAbsent(itemId, LOSBlocks.BLOCK_SIGNAL_PART.isOldContentPack(itemId)); } catch (Exception e) { throw new ItemRenderException("Error loading item model/renderer...", e); } @@ -107,16 +99,15 @@ private static void renderSignals(ContentPackSignal signal, String itemId, Strin try (OpenGL.With ignored1 = OpenGL.matrix(); OpenGL.With ignored2 = renderer.bindTexture(itemState)) { // Render - if (Boolean.FALSE.equals(cacheInfoOldContentPack.get(itemId))) { - GL11.glScaled(scale[0], scale[1], scale[2]); - GL11.glTranslated(translate[0], translate[1], translate[2]); - } else { - GL11.glTranslated(translate[0], translate[1], translate[2]); - GL11.glScaled(scale[0], scale[1], scale[2]); - } + GL11.glTranslated(translate[0], translate[1], translate[2]); + GL11.glScaled(scale[0], scale[1], scale[2]); renderer.draw(); } } + public static Map cache(){ + return cache; + } + } diff --git a/src/main/java/net/landofrails/landofsignals/tile/TileComplexSignal.java b/src/main/java/net/landofrails/landofsignals/tile/TileComplexSignal.java index c7d51d00..bf59153f 100644 --- a/src/main/java/net/landofrails/landofsignals/tile/TileComplexSignal.java +++ b/src/main/java/net/landofrails/landofsignals/tile/TileComplexSignal.java @@ -42,6 +42,12 @@ public class TileComplexSignal extends BlockEntity implements IManipulate { @TagField("offset") private Vec3d offset = Vec3d.ZERO; + @TagField("scaling") + private Vec3d scaling = new Vec3d(1, 1, 1); + + // client-only + private boolean highlighting = false; + public TileComplexSignal(final String id, final int rot) { blockRotate = rot; this.id = id; @@ -50,7 +56,7 @@ public TileComplexSignal(final String id, final int rot) { @Override public boolean onClick(Player player, Player.Hand hand, Facing facing, Vec3d hit) { - if (player.isCrouching() || LandOfSignalsUtils.isLandOfSignalsItem(player.getHeldItem(hand))) { + if (player.isCrouching() || LandOfSignalsUtils.isLandOfSignalsItem(player.getHeldItem(Player.Hand.PRIMARY))) { return false; } if (!getWorld().isServer) { @@ -73,7 +79,7 @@ public ItemStack onPick() { @Override public IBoundingBox getBoundingBox() { - return IBoundingBox.BLOCK.offset(offset); + return IBoundingBox.BLOCK; } @Override @@ -119,6 +125,16 @@ public int getRotation() { return getBlockRotate(); } + @Override + public void setScaling(Vec3d scaling) { + this.scaling = scaling; + } + + @Override + public Vec3d getScaling() { + return scaling; + } + public Map getOrderedGroupStates() { if (this.orderedGroupStates == null) { Map allGroups = LOSBlocks.BLOCK_COMPLEX_SIGNAL.getAllGroupStates(id); @@ -227,4 +243,13 @@ public boolean compatible(TileSignalBox tileSignalBox) { return foundActiveState && foundInactiveState; } + + public void setHighlighting(boolean highlighting) { + this.highlighting = highlighting; + } + + public boolean isHighlighting(){ + return this.highlighting; + } + } diff --git a/src/main/java/net/landofrails/landofsignals/tile/TileDeco.java b/src/main/java/net/landofrails/landofsignals/tile/TileDeco.java index 246654fa..9b5c0d4e 100644 --- a/src/main/java/net/landofrails/landofsignals/tile/TileDeco.java +++ b/src/main/java/net/landofrails/landofsignals/tile/TileDeco.java @@ -17,6 +17,8 @@ public class TileDeco extends BlockEntity implements IManipulate { private String id; @TagField("offset") private Vec3d offset = Vec3d.ZERO; + @TagField("scaling") + private Vec3d scaling = new Vec3d(1,1,1); public TileDeco(String id, int rot) { this.blockRotate = rot; @@ -34,7 +36,7 @@ public ItemStack onPick() { @Override public IBoundingBox getBoundingBox() { - return IBoundingBox.BLOCK.offset(offset); + return IBoundingBox.BLOCK; } @Override @@ -57,7 +59,7 @@ public void setOffset(Vec3d vec) { try { save(new TagCompound().setVec3d("offset", vec)); } catch (Exception ignored) { - + // Can be ignored } } @@ -72,7 +74,7 @@ public void setRotation(int rotation) { try { save(new TagCompound().setInteger("blockRotation", rotation)); } catch (Exception ignored) { - + // Can be ignored } } @@ -80,5 +82,15 @@ public void setRotation(int rotation) { public int getRotation() { return getBlockRotate(); } - + + @Override + public void setScaling(Vec3d scaling) { + this.scaling = scaling; + } + + @Override + public Vec3d getScaling() { + return scaling; + } + } diff --git a/src/main/java/net/landofrails/landofsignals/tile/TileSignPart.java b/src/main/java/net/landofrails/landofsignals/tile/TileSignPart.java index 5d8a49c6..35a6b361 100644 --- a/src/main/java/net/landofrails/landofsignals/tile/TileSignPart.java +++ b/src/main/java/net/landofrails/landofsignals/tile/TileSignPart.java @@ -30,6 +30,8 @@ public class TileSignPart extends BlockEntity implements IManipulate { private String signText; @TagField("offset") private Vec3d offset = Vec3d.ZERO; + @TagField("scaling") + private Vec3d scaling = new Vec3d(1,1,1); public TileSignPart(String id, int rot) { this.blockRotate = rot; @@ -58,7 +60,7 @@ public ItemStack onPick() { @Override public IBoundingBox getBoundingBox() { - return IBoundingBox.BLOCK.offset(offset); + return IBoundingBox.BLOCK; } @Override @@ -81,7 +83,7 @@ public void setOffset(Vec3d vec) { try { save(new TagCompound().setVec3d("offset", vec)); } catch (Exception ignored) { - + // Can be ignored } } @@ -96,7 +98,7 @@ public void setRotation(int rotation) { try { save(new TagCompound().setInteger("blockRotation", rotation)); } catch (Exception ignored) { - + // Can be ignored } } @@ -105,12 +107,22 @@ public int getRotation() { return getBlockRotate(); } + @Override + public void setScaling(Vec3d scaling) { + this.scaling = scaling; + } + + @Override + public Vec3d getScaling() { + return scaling; + } + public void setText(String signText) { this.signText = signText; try { save(getData()); } catch (Exception ignored) { - + // Can be ignored } } diff --git a/src/main/java/net/landofrails/landofsignals/tile/TileSignalBox.java b/src/main/java/net/landofrails/landofsignals/tile/TileSignalBox.java index d28eb0e8..986e80fc 100644 --- a/src/main/java/net/landofrails/landofsignals/tile/TileSignalBox.java +++ b/src/main/java/net/landofrails/landofsignals/tile/TileSignalBox.java @@ -13,6 +13,8 @@ import net.landofrails.landofsignals.LOSBlocks; import net.landofrails.landofsignals.LOSItems; import net.landofrails.landofsignals.packet.SignalBoxTileSignalPartPacket; +import net.landofrails.landofsignals.utils.IManipulate; +import net.landofrails.landofsignals.utils.LandOfSignalsUtils; import net.landofrails.landofsignals.utils.Static; import javax.annotation.Nullable; @@ -20,7 +22,7 @@ import java.util.stream.Collectors; @SuppressWarnings({"java:S116", "java:S1134", "java:S1133"}) -public class TileSignalBox extends BlockEntity { +public class TileSignalBox extends BlockEntity implements IManipulate { @TagField("id") private String id; @@ -32,6 +34,12 @@ public class TileSignalBox extends BlockEntity { @Nullable private Vec3i tileSignalPartPos = Vec3i.ZERO; + @TagField("offset") + private Vec3d offset = Vec3d.ZERO; + + @TagField("scaling") + private Vec3d scaling = new Vec3d(1,1,1); + @TagField("signalType") @Nullable private Byte signalType; // null = none, 0 = simple (old), 1 = complex @@ -58,6 +66,9 @@ public class TileSignalBox extends BlockEntity { private TileSignalPart tileSignalPart; private TileComplexSignal tileComplexSignal; + // client-only + private boolean highlighting = false; + public TileSignalBox(String id, int rot) { this.id = id; this.blockRotate = rot; @@ -77,9 +88,14 @@ public IBoundingBox getBoundingBox() { return IBoundingBox.BLOCK; } + @Override + public IBoundingBox getRenderBoundingBox() { + return IBoundingBox.BLOCK.offset(getOffset()); + } + @Override public boolean onClick(Player player, Player.Hand hand, Facing facing, Vec3d hit) { - if (!player.getHeldItem(hand).is(LOSItems.ITEM_CONNECTOR) && !player.isCrouching() && player.getWorld().isServer) { + if (!LandOfSignalsUtils.isLandOfSignalsItem(player.getHeldItem(Player.Hand.PRIMARY)) && !player.isCrouching() && player.getWorld().isServer) { if(signalType == null) { refreshOldRedstoneVariables(); @@ -221,6 +237,11 @@ public Byte getSignalType() { return this.signalType; } + @Nullable + public Vec3i getTileSignalPartPos() { + return this.tileSignalPartPos; + } + /** * @return old textureIndex for active redstone signal * @deprecated (1.0.0, Only here for backwards compatability) @@ -393,4 +414,52 @@ private void refreshOldRedstoneVariables() { noRedstone = null; } + @Override + public void setOffset(Vec3d offset) { + this.offset = offset; + } + + @Override + public Vec3d getOffset() { + return offset; + } + + @Override + public void setRotation(int rotation) { + this.blockRotate = rotation; + } + + @Override + public int getRotation() { + return getBlockRotate(); + } + + @Override + public void setScaling(Vec3d scaling) { + this.scaling = scaling; + } + + @Override + public Vec3d getScaling() { + return scaling; + } + + public void toggleHighlighting() { + this.highlighting = !this.highlighting; + if(signalType != null && 0 == signalType){ + TileSignalPart signal = getWorld().getBlockEntity(tileSignalPartPos, TileSignalPart.class); + if(signal != null){ + signal.setHighlighting(this.highlighting); + } + }else if(signalType != null && 1 == signalType){ + TileComplexSignal signal = getWorld().getBlockEntity(tileSignalPartPos, TileComplexSignal.class); + if(signal != null){ + signal.setHighlighting(this.highlighting); + } + } + } + + public boolean isHighlighting(){ + return this.highlighting; + } } diff --git a/src/main/java/net/landofrails/landofsignals/tile/TileSignalPart.java b/src/main/java/net/landofrails/landofsignals/tile/TileSignalPart.java index fc5157bd..6a0ddf5b 100644 --- a/src/main/java/net/landofrails/landofsignals/tile/TileSignalPart.java +++ b/src/main/java/net/landofrails/landofsignals/tile/TileSignalPart.java @@ -45,6 +45,11 @@ public class TileSignalPart extends BlockEntity implements IManipulate { @TagField("offset") private Vec3d offset = Vec3d.ZERO; + @TagField("scaling") + private Vec3d scaling = new Vec3d(1, 1, 1); + + // client-only + private boolean highlighting = false; public TileSignalPart(final String id, final int rot) { this.blockRotate = rot; @@ -53,7 +58,7 @@ public TileSignalPart(final String id, final int rot) { @Override public boolean onClick(Player player, Player.Hand hand, Facing facing, Vec3d hit) { - if (player.isCrouching() || LandOfSignalsUtils.isLandOfSignalsItem(player.getHeldItem(hand))) { + if (player.isCrouching() || LandOfSignalsUtils.isLandOfSignalsItem(player.getHeldItem(Player.Hand.PRIMARY))) { return false; } if (!getWorld().isServer) { @@ -76,7 +81,7 @@ public ItemStack onPick() { @Override public IBoundingBox getBoundingBox() { - return IBoundingBox.BLOCK.offset(offset); + return IBoundingBox.BLOCK; } @Override @@ -133,6 +138,16 @@ public int getRotation() { return getBlockRotate(); } + @Override + public void setScaling(Vec3d scaling) { + this.scaling = scaling; + } + + @Override + public Vec3d getScaling() { + return scaling; + } + /** * server-only * @@ -164,14 +179,14 @@ public void updateSignals(Vec3i pos, String state) { senderSignalStates.put(pos, state); - refreshSignals(true); + refreshSignals(); } /** * server-only */ public void updateSignals() { - refreshSignals(true); + refreshSignals(); } /** @@ -181,10 +196,10 @@ public void updateSignals() { */ public void removeSignal(Vec3i pos) { senderSignalStates.remove(pos); - refreshSignals(true); + refreshSignals(); } - private void refreshSignals(boolean updateClients) { + private void refreshSignals() { boolean first = true; String lastState = null; for (String state : getOrderedStates()) { @@ -195,9 +210,7 @@ private void refreshSignals(boolean updateClients) { } this.texturePath = lastState; - if (updateClients) { - new SignalUpdatePacket(getPos(), texturePath).sendToAll(); - } + new SignalUpdatePacket(getPos(), texturePath).sendToAll(); } @Override @@ -255,4 +268,13 @@ public boolean compatible(TileSignalBox tileSignalBox) { return foundActiveState && foundInactiveState; } + + public void setHighlighting(boolean highlighting) { + this.highlighting = highlighting; + } + + public boolean isHighlighting(){ + return this.highlighting; + } + } diff --git a/src/main/java/net/landofrails/landofsignals/tile/TileSignalPartAnimated.java b/src/main/java/net/landofrails/landofsignals/tile/TileSignalPartAnimated.java index 56837b0f..a435c4ef 100644 --- a/src/main/java/net/landofrails/landofsignals/tile/TileSignalPartAnimated.java +++ b/src/main/java/net/landofrails/landofsignals/tile/TileSignalPartAnimated.java @@ -56,7 +56,7 @@ public ItemStack onPick() { @Override public IBoundingBox getBoundingBox() { - return IBoundingBox.BLOCK.offset(offset); + return IBoundingBox.BLOCK; } @Override @@ -77,6 +77,7 @@ public String getId() { return id; } + @SuppressWarnings("unused") public void setAnimationOrStateTexture(final String name) { if (name == null) animationOrTextureName = "null"; else animationOrTextureName = name; @@ -113,6 +114,17 @@ public int getRotation() { return getBlockRotate(); } + @Override + public void setScaling(Vec3d scaling) { + throw new UnsupportedOperationException("Not yet implemented."); + } + + @Override + public Vec3d getScaling() { + return new Vec3d(1, 1, 1); + } + + @SuppressWarnings("unused") public void setActive(final boolean active) { this.active = active; markDirty(); diff --git a/src/main/java/net/landofrails/landofsignals/utils/HighlightingUtil.java b/src/main/java/net/landofrails/landofsignals/utils/HighlightingUtil.java new file mode 100644 index 00000000..49b79e48 --- /dev/null +++ b/src/main/java/net/landofrails/landofsignals/utils/HighlightingUtil.java @@ -0,0 +1,102 @@ +package net.landofrails.landofsignals.utils; + +import cam72cam.mod.model.obj.OBJModel; +import cam72cam.mod.render.OpenGL; +import cam72cam.mod.render.obj.OBJRender; +import cam72cam.mod.resource.Identifier; +import net.landofrails.landofsignals.LandOfSignals; +import org.lwjgl.opengl.GL11; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Random; +import java.util.stream.Collectors; + +public class HighlightingUtil { + + private static OBJRender render; + private static final Random RANDOM = new Random(); + + private static LocalDateTime colortime = LocalDateTime.now(); + private static HighlightingColors color = HighlightingColors.getRandomColor(); + + private HighlightingUtil(){ + } + + @SuppressWarnings("java:S1141") + public static void renderHighlighting() { + try { + OBJRender render = getOBJRender(); + try (OpenGL.With ignored1 = OpenGL.matrix(); OpenGL.With ignored2 = render.bindTexture(getColor())) { + GL11.glTranslated(0.5,0,0.5); + render.draw(); + } catch (Exception e) { + // Not good, not bad enough to fail + } + } catch (Exception e) { + // Not good, not bad enough to fail + } + } + + private static String getColor(){ + LocalDateTime now = LocalDateTime.now(); + if(colortime.plusSeconds(1).isBefore(now)){ + HighlightingColors newColor; + do{ + newColor = HighlightingColors.getRandomColor(); + }while(newColor.equals(color)); + color = newColor; + colortime = LocalDateTime.now(); + } + return color.getFolder(); + } + + private static OBJRender getOBJRender() throws Exception { + if(render == null){ + OBJModel model = new OBJModel(new Identifier(LandOfSignals.MODID, "models/block/landofsignals/connection-box/connection-box.obj"), 0, HighlightingColors.getAllColorsAsStrings()); + render = new OBJRender(model); + } + return render; + } + + private enum HighlightingColors { + + WHITE(null), + AMBER("amber"), + BLACK("black"), + BLUE_LIGHT("blue_light"), + GRAY("gray"), + GRAY_DARK("gray_dark"), + GREEN_DARK("green_dark"), + GREEN_LIGHT("green_light"), + ORANGE_LIGHT("orange_light"), + RED("red"), + YELLOW_GREEN("yellow_green"); + + private final String folder; + + HighlightingColors(String folder){ + this.folder = folder; + } + + private String getFolder(){ + return this.folder; + } + + public static HighlightingColors getRandomColor(){ + + int randomNumber = RANDOM.nextInt(HighlightingColors.values().length); + return HighlightingColors.values()[randomNumber]; + } + + public static List getAllColorsAsStrings(){ + return Arrays.stream(HighlightingColors.values()) + .map(HighlightingColors::getFolder) + .collect(Collectors.toCollection(ArrayList::new)); + } + + } + +} diff --git a/src/main/java/net/landofrails/landofsignals/utils/IManipulate.java b/src/main/java/net/landofrails/landofsignals/utils/IManipulate.java index 921f8fe5..33f5f478 100644 --- a/src/main/java/net/landofrails/landofsignals/utils/IManipulate.java +++ b/src/main/java/net/landofrails/landofsignals/utils/IManipulate.java @@ -4,9 +4,6 @@ public interface IManipulate { - /** - * Provide new Vec3d for offset - */ void setOffset(Vec3d vec); Vec3d getOffset(); @@ -15,4 +12,8 @@ public interface IManipulate { int getRotation(); + void setScaling(Vec3d scaling); + + Vec3d getScaling(); + } diff --git a/src/main/java/net/landofrails/landofsignals/utils/LandOfSignalsUtils.java b/src/main/java/net/landofrails/landofsignals/utils/LandOfSignalsUtils.java index 6caf13db..9e142b31 100644 --- a/src/main/java/net/landofrails/landofsignals/utils/LandOfSignalsUtils.java +++ b/src/main/java/net/landofrails/landofsignals/utils/LandOfSignalsUtils.java @@ -36,6 +36,7 @@ public static String getUniqueIdOfItemStack(final ItemStack itemStack) { public static boolean isLandOfSignalsItem(final ItemStack itemStack){ return itemStack.is(LOSItems.ITEM_CONNECTOR) || itemStack.is(LOSItems.ITEM_MANIPULATOR) + || itemStack.is(LOSItems.ITEM_MAGNIFYING_GLASS) || itemStack.is(LOSItems.ITEM_COMPLEX_SIGNAL) || itemStack.is(LOSItems.ITEM_DECO) || itemStack.is(LOSItems.ITEM_SIGN_PART) diff --git a/src/main/java/net/landofrails/landofsignals/utils/Static.java b/src/main/java/net/landofrails/landofsignals/utils/Static.java index d4de7070..2d5899e5 100644 --- a/src/main/java/net/landofrails/landofsignals/utils/Static.java +++ b/src/main/java/net/landofrails/landofsignals/utils/Static.java @@ -1,5 +1,7 @@ package net.landofrails.landofsignals.utils; +import cam72cam.mod.math.Vec3d; + import java.math.BigDecimal; import java.math.RoundingMode; @@ -17,6 +19,10 @@ public static double round(final double value, final int places) { return bd.doubleValue(); } + public static Vec3d multiply(final Vec3d first, final Vec3d second){ + return new Vec3d(first.x * second.x, first.y * second.y, first.z * second.z); + } + // Missing ID public static final String MISSING = "missing"; // Missing ID Name diff --git a/src/main/java/net/landofrails/stellwand/utils/exceptions/ContentPackException.java b/src/main/java/net/landofrails/stellwand/utils/exceptions/ContentPackException.java index 379cd55d..11ce3815 100644 --- a/src/main/java/net/landofrails/stellwand/utils/exceptions/ContentPackException.java +++ b/src/main/java/net/landofrails/stellwand/utils/exceptions/ContentPackException.java @@ -12,4 +12,8 @@ public ContentPackException(String text) { super(text); } + public ContentPackException(String text, Throwable throwable) { + super(text, throwable); + } + } diff --git a/src/main/resources/assets/landofsignals/lang/de_DE.lang b/src/main/resources/assets/landofsignals/lang/de_DE.lang index 5e325c33..36397f2c 100644 --- a/src/main/resources/assets/landofsignals/lang/de_DE.lang +++ b/src/main/resources/assets/landofsignals/lang/de_DE.lang @@ -15,8 +15,11 @@ gui.landofsignals:manipulator.unattach=Drücke Shift um zum GUI zurückzukehren gui.landofsignals:manipulator.editingame=Bearbeiten ingame gui.landofsignals:manipulator.editposition=Bearbeite Position gui.landofsignals:manipulator.editrotation=Bearbeite Rotation -gui.landofsignals:manipulator.edithitbox=Bearbeite Hitbox +gui.landofsignals:manipulator.editscaling=Bearbeite Skalierung gui.landofsignals:manipulator.rotationslider=Rotation +gui.landofsignals:manipulator.cascade=Kaskadiere Änderungen +gui.landofsignals:manipulator.leftclick=Linksklick +/- 1.0 +gui.landofsignals:manipulator.rightclick=Rechtsklick +/- 0.1 item.landofsignals:item_signal_so12.name=SO12 item.landofsignals:item_signal_lever.name=Signalhebel diff --git a/src/main/resources/assets/landofsignals/lang/en_US.lang b/src/main/resources/assets/landofsignals/lang/en_US.lang index 91bff762..ab7ea7b4 100644 --- a/src/main/resources/assets/landofsignals/lang/en_US.lang +++ b/src/main/resources/assets/landofsignals/lang/en_US.lang @@ -15,8 +15,11 @@ gui.landofsignals:manipulator.unattach=Press shift to return to GUI gui.landofsignals:manipulator.editingame=Edit ingame gui.landofsignals:manipulator.editposition=Edit position gui.landofsignals:manipulator.editrotation=Edit rotation -gui.landofsignals:manipulator.edithitbox=Edit hitbox +gui.landofsignals:manipulator.editscaling=Edit scaling gui.landofsignals:manipulator.rotationslider=Rotation +gui.landofsignals:manipulator.cascade=Cascade changes +gui.landofsignals:manipulator.leftclick=Left click +/- 1.0 +gui.landofsignals:manipulator.rightclick=Right click +/- 0.1 item.landofsignals:item_signal_so12.name=SO12 item.landofsignals:item_signal_lever.name=Signal Lever diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/amber/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/amber/color.png new file mode 100644 index 00000000..c878e0ad Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/amber/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/black/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/black/color.png new file mode 100644 index 00000000..4b0d37ce Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/black/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/blue_light/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/blue_light/color.png new file mode 100644 index 00000000..f057511d Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/blue_light/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/color.png new file mode 100644 index 00000000..d0937f82 Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/connection-box.mtl b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/connection-box.mtl new file mode 100644 index 00000000..6021df70 --- /dev/null +++ b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/connection-box.mtl @@ -0,0 +1,4 @@ +# Made in Blockbench 3.8.4 +newmtl m_0 +map_Kd color.png +newmtl none \ No newline at end of file diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/connection-box.obj b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/connection-box.obj new file mode 100644 index 00000000..79369eb8 --- /dev/null +++ b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/connection-box.obj @@ -0,0 +1,1190 @@ +# Made in Blockbench 3.8.4 +mtllib connection-box.mtl +o cube +v 0.5 1.03125 -0.5 +v 0.5 1.03125 -0.53125 +v 0.5 1 -0.5 +v 0.5 1 -0.53125 +v -0.5 1.03125 -0.53125 +v -0.5 1.03125 -0.5 +v -0.5 1 -0.53125 +v -0.5 1 -0.5 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +usemtl m_0 +f 1/1/1 3/2/2 2/3/3 +f 3/4/4 4/5/5 2/6/6 +usemtl m_0 +f 5/7/7 7/8/8 6/9/9 +f 7/10/10 8/11/11 6/12/12 +usemtl m_0 +f 5/13/13 6/14/14 2/15/15 +f 6/16/16 1/17/17 2/18/18 +usemtl m_0 +f 8/19/19 7/20/20 3/21/21 +f 7/22/22 4/23/23 3/24/24 +usemtl m_0 +f 6/25/25 8/26/26 1/27/27 +f 8/28/28 3/29/29 1/30/30 +usemtl m_0 +f 2/31/31 4/32/32 5/33/33 +f 4/34/34 7/35/35 5/36/36 +o cube +v 0.5000000000000001 1.03125 0.4999999999999999 +v 0.5312500000000001 1.03125 0.4999999999999999 +v 0.5000000000000001 1 0.4999999999999999 +v 0.5312500000000001 1 0.4999999999999999 +v 0.5312499999999999 1.03125 -0.5000000000000001 +v 0.4999999999999999 1.03125 -0.5000000000000001 +v 0.5312499999999999 1 -0.5000000000000001 +v 0.4999999999999999 1 -0.5000000000000001 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +usemtl m_0 +f 9/37/37 11/38/38 10/39/39 +f 11/40/40 12/41/41 10/42/42 +usemtl m_0 +f 13/43/43 15/44/44 14/45/45 +f 15/46/46 16/47/47 14/48/48 +usemtl m_0 +f 13/49/49 14/50/50 10/51/51 +f 14/52/52 9/53/53 10/54/54 +usemtl m_0 +f 16/55/55 15/56/56 11/57/57 +f 15/58/58 12/59/59 11/60/60 +usemtl m_0 +f 14/61/61 16/62/62 9/63/63 +f 16/64/64 11/65/65 9/66/66 +usemtl m_0 +f 10/67/67 12/68/68 13/69/69 +f 12/70/70 15/71/71 13/72/72 +o cube +v 0.5 1.03125 0.53125 +v 0.5 1.03125 0.5 +v 0.5 1 0.53125 +v 0.5 1 0.5 +v -0.5 1.03125 0.5 +v -0.5 1.03125 0.53125 +v -0.5 1 0.5 +v -0.5 1 0.53125 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +usemtl m_0 +f 17/73/73 19/74/74 18/75/75 +f 19/76/76 20/77/77 18/78/78 +usemtl m_0 +f 21/79/79 23/80/80 22/81/81 +f 23/82/82 24/83/83 22/84/84 +usemtl m_0 +f 21/85/85 22/86/86 18/87/87 +f 22/88/88 17/89/89 18/90/90 +usemtl m_0 +f 24/91/91 23/92/92 19/93/93 +f 23/94/94 20/95/95 19/96/96 +usemtl m_0 +f 22/97/97 24/98/98 17/99/99 +f 24/100/100 19/101/101 17/102/102 +usemtl m_0 +f 18/103/103 20/104/104 21/105/105 +f 20/106/106 23/107/107 21/108/108 +o cube +v -0.5312499999999999 1.03125 0.5000000000000001 +v -0.4999999999999999 1.03125 0.5000000000000001 +v -0.5312499999999999 1 0.5000000000000001 +v -0.4999999999999999 1 0.5000000000000001 +v -0.5000000000000001 1.03125 -0.4999999999999999 +v -0.5312500000000001 1.03125 -0.4999999999999999 +v -0.5000000000000001 1 -0.4999999999999999 +v -0.5312500000000001 1 -0.4999999999999999 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +usemtl m_0 +f 25/109/109 27/110/110 26/111/111 +f 27/112/112 28/113/113 26/114/114 +usemtl m_0 +f 29/115/115 31/116/116 30/117/117 +f 31/118/118 32/119/119 30/120/120 +usemtl m_0 +f 29/121/121 30/122/122 26/123/123 +f 30/124/124 25/125/125 26/126/126 +usemtl m_0 +f 32/127/127 31/128/128 27/129/129 +f 31/130/130 28/131/131 27/132/132 +usemtl m_0 +f 30/133/133 32/134/134 25/135/135 +f 32/136/136 27/137/137 25/138/138 +usemtl m_0 +f 26/139/139 28/140/140 29/141/141 +f 28/142/142 31/143/143 29/144/144 +o cube +v 0.5 0 -0.5 +v 0.5 0 -0.53125 +v 0.5 -0.03125 -0.5 +v 0.5 -0.03125 -0.53125 +v -0.5 0 -0.53125 +v -0.5 0 -0.5 +v -0.5 -0.03125 -0.53125 +v -0.5 -0.03125 -0.5 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +usemtl m_0 +f 33/145/145 35/146/146 34/147/147 +f 35/148/148 36/149/149 34/150/150 +usemtl m_0 +f 37/151/151 39/152/152 38/153/153 +f 39/154/154 40/155/155 38/156/156 +usemtl m_0 +f 37/157/157 38/158/158 34/159/159 +f 38/160/160 33/161/161 34/162/162 +usemtl m_0 +f 40/163/163 39/164/164 35/165/165 +f 39/166/166 36/167/167 35/168/168 +usemtl m_0 +f 38/169/169 40/170/170 33/171/171 +f 40/172/172 35/173/173 33/174/174 +usemtl m_0 +f 34/175/175 36/176/176 37/177/177 +f 36/178/178 39/179/179 37/180/180 +o cube +v -0.5312499999999999 0 0.5000000000000001 +v -0.4999999999999999 0 0.5000000000000001 +v -0.5312499999999999 -0.03125 0.5000000000000001 +v -0.4999999999999999 -0.03125 0.5000000000000001 +v -0.5000000000000001 0 -0.4999999999999999 +v -0.5312500000000001 0 -0.4999999999999999 +v -0.5000000000000001 -0.03125 -0.4999999999999999 +v -0.5312500000000001 -0.03125 -0.4999999999999999 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +usemtl m_0 +f 41/181/181 43/182/182 42/183/183 +f 43/184/184 44/185/185 42/186/186 +usemtl m_0 +f 45/187/187 47/188/188 46/189/189 +f 47/190/190 48/191/191 46/192/192 +usemtl m_0 +f 45/193/193 46/194/194 42/195/195 +f 46/196/196 41/197/197 42/198/198 +usemtl m_0 +f 48/199/199 47/200/200 43/201/201 +f 47/202/202 44/203/203 43/204/204 +usemtl m_0 +f 46/205/205 48/206/206 41/207/207 +f 48/208/208 43/209/209 41/210/210 +usemtl m_0 +f 42/211/211 44/212/212 45/213/213 +f 44/214/214 47/215/215 45/216/216 +o cube +v 0.5 0 0.53125 +v 0.5 0 0.5 +v 0.5 -0.03125 0.53125 +v 0.5 -0.03125 0.5 +v -0.5 0 0.5 +v -0.5 0 0.53125 +v -0.5 -0.03125 0.5 +v -0.5 -0.03125 0.53125 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +usemtl m_0 +f 49/217/217 51/218/218 50/219/219 +f 51/220/220 52/221/221 50/222/222 +usemtl m_0 +f 53/223/223 55/224/224 54/225/225 +f 55/226/226 56/227/227 54/228/228 +usemtl m_0 +f 53/229/229 54/230/230 50/231/231 +f 54/232/232 49/233/233 50/234/234 +usemtl m_0 +f 56/235/235 55/236/236 51/237/237 +f 55/238/238 52/239/239 51/240/240 +usemtl m_0 +f 54/241/241 56/242/242 49/243/243 +f 56/244/244 51/245/245 49/246/246 +usemtl m_0 +f 50/247/247 52/248/248 53/249/249 +f 52/250/250 55/251/251 53/252/252 +o cube +v 0.5000000000000001 0 0.4999999999999999 +v 0.5312500000000001 0 0.4999999999999999 +v 0.5000000000000001 -0.03125 0.4999999999999999 +v 0.5312500000000001 -0.03125 0.4999999999999999 +v 0.5312499999999999 0 -0.5000000000000001 +v 0.4999999999999999 0 -0.5000000000000001 +v 0.5312499999999999 -0.03125 -0.5000000000000001 +v 0.4999999999999999 -0.03125 -0.5000000000000001 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vt 0 1 +vt 0 0.96875 +vt 1 1 +vt 0 0.96875 +vt 1 0.96875 +vt 1 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn 2.220446049250313e-16 0 1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn -2.220446049250313e-16 0 -1 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn -1 0 2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +vn 1 0 -2.220446049250313e-16 +usemtl m_0 +f 57/253/253 59/254/254 58/255/255 +f 59/256/256 60/257/257 58/258/258 +usemtl m_0 +f 61/259/259 63/260/260 62/261/261 +f 63/262/262 64/263/263 62/264/264 +usemtl m_0 +f 61/265/265 62/266/266 58/267/267 +f 62/268/268 57/269/269 58/270/270 +usemtl m_0 +f 64/271/271 63/272/272 59/273/273 +f 63/274/274 60/275/275 59/276/276 +usemtl m_0 +f 62/277/277 64/278/278 57/279/279 +f 64/280/280 59/281/281 57/282/282 +usemtl m_0 +f 58/283/283 60/284/284 61/285/285 +f 60/286/286 63/287/287 61/288/288 +o cube +v 0.53125 1.03125 -0.5 +v 0.53125 1.03125 -0.53125 +v 0.53125 -0.03125 -0.5 +v 0.53125 -0.03125 -0.53125 +v 0.5 1.03125 -0.53125 +v 0.5 1.03125 -0.5 +v 0.5 -0.03125 -0.53125 +v 0.5 -0.03125 -0.5 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +usemtl m_0 +f 65/289/289 67/290/290 66/291/291 +f 67/292/292 68/293/293 66/294/294 +usemtl m_0 +f 69/295/295 71/296/296 70/297/297 +f 71/298/298 72/299/299 70/300/300 +usemtl m_0 +f 69/301/301 70/302/302 66/303/303 +f 70/304/304 65/305/305 66/306/306 +usemtl m_0 +f 72/307/307 71/308/308 67/309/309 +f 71/310/310 68/311/311 67/312/312 +usemtl m_0 +f 70/313/313 72/314/314 65/315/315 +f 72/316/316 67/317/317 65/318/318 +usemtl m_0 +f 66/319/319 68/320/320 69/321/321 +f 68/322/322 71/323/323 69/324/324 +o cube +v -0.5 1.03125 -0.5 +v -0.5 1.03125 -0.53125 +v -0.5 -0.03125 -0.5 +v -0.5 -0.03125 -0.53125 +v -0.53125 1.03125 -0.53125 +v -0.53125 1.03125 -0.5 +v -0.53125 -0.03125 -0.53125 +v -0.53125 -0.03125 -0.5 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +usemtl m_0 +f 73/325/325 75/326/326 74/327/327 +f 75/328/328 76/329/329 74/330/330 +usemtl m_0 +f 77/331/331 79/332/332 78/333/333 +f 79/334/334 80/335/335 78/336/336 +usemtl m_0 +f 77/337/337 78/338/338 74/339/339 +f 78/340/340 73/341/341 74/342/342 +usemtl m_0 +f 80/343/343 79/344/344 75/345/345 +f 79/346/346 76/347/347 75/348/348 +usemtl m_0 +f 78/349/349 80/350/350 73/351/351 +f 80/352/352 75/353/353 73/354/354 +usemtl m_0 +f 74/355/355 76/356/356 77/357/357 +f 76/358/358 79/359/359 77/360/360 +o cube +v -0.5 1.03125 0.53125 +v -0.5 1.03125 0.5 +v -0.5 -0.03125 0.53125 +v -0.5 -0.03125 0.5 +v -0.53125 1.03125 0.5 +v -0.53125 1.03125 0.53125 +v -0.53125 -0.03125 0.5 +v -0.53125 -0.03125 0.53125 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +usemtl m_0 +f 81/361/361 83/362/362 82/363/363 +f 83/364/364 84/365/365 82/366/366 +usemtl m_0 +f 85/367/367 87/368/368 86/369/369 +f 87/370/370 88/371/371 86/372/372 +usemtl m_0 +f 85/373/373 86/374/374 82/375/375 +f 86/376/376 81/377/377 82/378/378 +usemtl m_0 +f 88/379/379 87/380/380 83/381/381 +f 87/382/382 84/383/383 83/384/384 +usemtl m_0 +f 86/385/385 88/386/386 81/387/387 +f 88/388/388 83/389/389 81/390/390 +usemtl m_0 +f 82/391/391 84/392/392 85/393/393 +f 84/394/394 87/395/395 85/396/396 +o cube +v 0.53125 1.03125 0.53125 +v 0.53125 1.03125 0.5 +v 0.53125 -0.03125 0.53125 +v 0.53125 -0.03125 0.5 +v 0.5 1.03125 0.5 +v 0.5 1.03125 0.53125 +v 0.5 -0.03125 0.5 +v 0.5 -0.03125 0.53125 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0.96875 +vt 0.03125 1 +vt 0 0.96875 +vt 0.03125 0.96875 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vt 0 1 +vt 0 0 +vt 0.03125 1 +vt 0 0 +vt 0.03125 0 +vt 0.03125 1 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn 1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn -1 0 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 -1 0 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +vn 0 0 -1 +usemtl m_0 +f 89/397/397 91/398/398 90/399/399 +f 91/400/400 92/401/401 90/402/402 +usemtl m_0 +f 93/403/403 95/404/404 94/405/405 +f 95/406/406 96/407/407 94/408/408 +usemtl m_0 +f 93/409/409 94/410/410 90/411/411 +f 94/412/412 89/413/413 90/414/414 +usemtl m_0 +f 96/415/415 95/416/416 91/417/417 +f 95/418/418 92/419/419 91/420/420 +usemtl m_0 +f 94/421/421 96/422/422 89/423/423 +f 96/424/424 91/425/425 89/426/426 +usemtl m_0 +f 90/427/427 92/428/428 93/429/429 +f 92/430/430 95/431/431 93/432/432 diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/gray/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/gray/color.png new file mode 100644 index 00000000..f210e590 Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/gray/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/gray_dark/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/gray_dark/color.png new file mode 100644 index 00000000..612b5df8 Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/gray_dark/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/green_dark/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/green_dark/color.png new file mode 100644 index 00000000..091eabe0 Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/green_dark/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/green_light/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/green_light/color.png new file mode 100644 index 00000000..a916b395 Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/green_light/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/orange_light/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/orange_light/color.png new file mode 100644 index 00000000..2060e979 Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/orange_light/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/red/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/red/color.png new file mode 100644 index 00000000..fa4aa1bb Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/red/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/yellow_green/color.png b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/yellow_green/color.png new file mode 100644 index 00000000..e73e8a9a Binary files /dev/null and b/src/main/resources/assets/landofsignals/models/block/landofsignals/connection-box/yellow_green/color.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/stellwand/blocksignal/blocktrackunisolated/unisolated.png b/src/main/resources/assets/landofsignals/models/block/stellwand/blocksignal/blocktrackunisolated/unisolated.png index d5a303c5..976f1ccf 100644 Binary files a/src/main/resources/assets/landofsignals/models/block/stellwand/blocksignal/blocktrackunisolated/unisolated.png and b/src/main/resources/assets/landofsignals/models/block/stellwand/blocksignal/blocktrackunisolated/unisolated.png differ diff --git a/src/main/resources/assets/landofsignals/models/block/stellwand/blocksignal/trackmainsignal/right/hsigright.png b/src/main/resources/assets/landofsignals/models/block/stellwand/blocksignal/trackmainsignal/right/hsigright.png index 224db374..08742baa 100644 Binary files a/src/main/resources/assets/landofsignals/models/block/stellwand/blocksignal/trackmainsignal/right/hsigright.png and b/src/main/resources/assets/landofsignals/models/block/stellwand/blocksignal/trackmainsignal/right/hsigright.png differ diff --git a/src/main/resources/assets/landofsignals/textures/items/magnifyingglass.png b/src/main/resources/assets/landofsignals/textures/items/magnifyingglass.png new file mode 100644 index 00000000..c79b8674 Binary files /dev/null and b/src/main/resources/assets/landofsignals/textures/items/magnifyingglass.png differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 835553da..cc1076b1 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "landofsignals", "name": "LandOfSignals", "description": "Adds fancy railroad signals, signs, decor and other stuff to the game. Use best in combination with a train mod.", - "version": "1.0.3", + "version": "1.0.4", "mcversion": "1.12.2", "url": "https://discord.gg/ykAqHKYjVM", "updateUrl": "https://www.curseforge.com/minecraft/mc-mods/landofsignals",